Using 5.9 + openup , amd64 base config

Assuming two interface s
em1 and em5
and a configuration interconnecting interfaces like this
vether10 10.1.2.10 rdomain 10 <--> bridge10 <--> vlan1010 vlan 10<-> em1
<--cable
cable-> em5 <--> vlan1020 vlan 10 <--> bridge50 <--> vether50 10.1.2.50
rdomain 50

Only by tcpdumping em1 the ping will go trhough:
(notice the kill pid of tcpdump in the middle, when icmp_seq=3  second ping)

# route -T10 exec ping -I 10.1.2.10 10.1.2.50
PING 10.1.2.50 (10.1.2.50): 56 data bytes
64 bytes from 10.1.2.50: icmp_seq=0 ttl=255 time=0.716 ms
64 bytes from 10.1.2.50: icmp_seq=1 ttl=255 time=0.457 ms
64 bytes from 10.1.2.50: icmp_seq=2 ttl=255 time=0.558 ms
64 bytes from 10.1.2.50: icmp_seq=3 ttl=255 time=0.977 ms
64 bytes from 10.1.2.50: icmp_seq=4 ttl=255 time=0.958 ms
--- 10.1.2.50 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.457/0.733/0.977/0.208 ms
# ps axww | grep em1
29673 p0- Sp      0:00.16 tcpdump -tteni em1
 5502 p1  R+      0:00.00 grep em1
# route -T10 exec ping -I 10.1.2.10 10.1.2.50&
[1] 32168
# PING 10.1.2.50 (10.1.2.50): 56 data bytes
64 bytes from 10.1.2.50: icmp_seq=0 ttl=255 time=0.344 ms
64 bytes from 10.1.2.50: icmp_seq=1 ttl=255 time=0.922 ms
64 bytes from 10.1.2.50: icmp_seq=2 ttl=255 time=1.024 ms
k64 bytes from 10.1.2.50: icmp_seq=3 ttl=255 time=0.489 ms
ill64 bytes from 10.1.2.50: icmp_seq=4 ttl=255 time=0.981 ms
 64 bytes from 10.1.2.50: icmp_seq=5 ttl=255 time=0.463 ms
64 bytes from 10.1.2.50: icmp_seq=6 ttl=255 time=0.988 ms
264 bytes from 10.1.2.50: icmp_seq=7 ttl=255 time=0.949 ms
964 bytes from 10.1.2.50: icmp_seq=8 ttl=255 time=0.473 ms
673
# fg
route -T10 exec ping -I 10.1.2.10 10.1.2.50
--- 10.1.2.50 ping statistics ---
22 packets transmitted, 9 packets received, 59.1% packet loss
round-trip min/avg/max/std-dev = 0.344/0.737/1.024/0.268 ms
#

--

function madconfig {
ifconfig vether10 10.1.2.10 rdomain 10
ifconfig vether50 10.1.2.50 rdomain 50
ifconfig bridge10 create
ifconfig bridge50 create
ifconfig vlan1010 vlan 10 vlandev $1
ifconfig vlan1050 vlan 10 vlandev $2
ifconfig bridge10 add vlan1010 add vether10
ifconfig bridge50 add vlan1050 add vether50
for v in vether10 vether50  vlan1010  vlan1050  bridge10  bridge50 $1 $2
do
  ifconfig $v up
done
}

function madtest {
  route -T10 exec ping -I 10.1.2.10 10.1.2.50 &
  sleep 3
  tcpdump -tteni $1
}

madconfig em1 em5
madtest  em1

--
using this you could with a bit of play around see ,
ping may not work unless you remove add vlan interface from bridge (having
them up before insertion may be the source of that)

# tcpdump -tteni em1
tcpdump: listening on em1, link-type EN10MB
^C
0 packets received by filter
0 packets dropped by kernel
# ifconfig bridge10 add vlan1010
# tcpdump -tteni em1
tcpdump: listening on em1, link-type EN10MB
1459545383.791862 fe:e1:ba:d0:f8:45 fe:e1:ba:d1:89:9d 8100 102: 802.1Q vid
10 pri 3 10.1.2.10 > 10.1.2.50: icmp: echo request
1459545384.786795 fe:e1:ba:d0:f8:45 fe:e1:ba:d1:89:9d 8100 102: 802.1Q vid
10 pri 3 10.1.2.10 > 10.1.2.50: icmp: echo request
1459545385.791786 fe:e1:ba:d0:f8:45 fe:e1:ba:d1:89:9d 8100 102: 802.1Q vid
10 pri 3 10.1.2.10 > 10.1.2.50: icmp: echo request
^C
3 packets received by filter
0 packets dropped by kernel
# tcpdump -tteni em5
tcpdump: listening on em5, link-type EN10MB
64 bytes from 10.1.2.50: icmp_seq=201 ttl=255 time=0.574 ms
1459545388.786778 fe:e1:ba:d0:f8:45 fe:e1:ba:d1:89:9d 8100 102: 802.1Q vid
10 pri 3 10.1.2.10 > 10.1.2.50: icmp: echo request
1459545388.786872 fe:e1:ba:d1:89:9d fe:e1:ba:d0:f8:45 8100 102: 802.1Q vid
10 pri 3 10.1.2.50 > 10.1.2.10: icmp: echo reply
64 bytes from 10.1.2.50: icmp_seq=202 ttl=255 time=0.472 ms
1459545389.792210 fe:e1:ba:d0:f8:45 fe:e1:ba:d1:89:9d 8100 102: 802.1Q vid
10 pri 3 10.1.2.10 > 10.1.2.50: icmp: echo request
1459545389.792310 fe:e1:ba:d1:89:9d fe:e1:ba:d0:f8:45 8100 102: 802.1Q vid
10 pri 3 10.1.2.50 > 10.1.2.10: icmp: echo reply

But if i adapt to

function madconfig {
ifconfig vether10 10.1.2.10 rdomain 10
ifconfig vether50 10.1.2.50 rdomain 50
ifconfig bridge10 create
ifconfig bridge50 create
ifconfig vlan1010 vlan 10 vlandev $1
ifconfig vlan1050 vlan 10 vlandev $2
for v in vether10 vether50  vlan1010  vlan1050  bridge10  bridge50 $1 $2
do
  ifconfig $v up
done
ifconfig bridge10 add vlan1010 add vether10
ifconfig bridge50 add vlan1050 add vether50
}

I have more chance to have something working.

I do not know if it specified somewhere that to put an interface in
promiscuous mode it must be up or something.
But maybe the ifconfig / bridge / add could say it.

This may also be the surface of a bigger problem.

(You can ask more test)

-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\

Reply via email to