Em 13-03-2014 11:32, sven falempin escreveu:
> On Wed, Mar 12, 2014 at 3:33 PM, sven falempin <[email protected]>
> wrote:
>> On Wed, Mar 12, 2014 at 2:01 PM, Stuart Henderson <[email protected]> wrote:
>>> On 2014/03/12 13:47, sven falempin wrote:
>>>>> You might do better with qemu socket network devices (or the L2TPv3
>>>>> support that was recently added to qemu head), which should allow a
>>>>> "direct" connection between the virtual interfaces, rather than using
>>>>> a bridge device that exists outside the VMs.
>>>>>
>>>> qemu is 1.7.0
>>>>
>>>> something like :
>>>>
>>>> vio0(bsd1) <---> socket client 127.0.0.1:5000 <---> socket server
>>>> 127.0.0.1:5000 <---> vio0(bsd2)
>>> The sockets just talk directly to each other, you don't need a server.
>>
>> Because i am an idiot and do not listen GOOD advice, i created two
>> ethernet tunnel with almighty SSH.
>>
>> But apparently LACP is not forwarded, (the round robin works just
>> fine), here is the trunk with the two link0 tun
>> and the LACP packet sended to LACP <slow protocol>
>>
>>
>> tun0: flags=9943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,LINK0,MULTICAST> mtu
>> 1500
>> lladdr fe:e1:ba:d1:62:79
>> priority: 0
>> trunk: trunkdev trunk0
>> groups: tun
>> status: active
>> inet6 fe80::f044:d4c2:63de:2fc4%tun0 prefixlen 64 scopeid 0x8
>> tun1: flags=9943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,LINK0,MULTICAST> mtu
>> 1500
>> lladdr fe:e1:ba:d1:62:79
>> priority: 0
>> trunk: trunkdev trunk0
>> groups: tun
>> status: active
>> inet6 fe80::f044:d4c2:63de:2fc4%tun1 prefixlen 64 scopeid 0xa
>> trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>> lladdr fe:e1:ba:d1:62:79
>> priority: 0
>> trunk: trunkproto lacp
>> trunk id: [(0000,00:00:00:00:00:00,0000,0000,0000),
>> (0000,00:00:00:00:00:00,0000,0000,0000)]
>> trunkport tun1 collecting,distributing
>> trunkport tun0 collecting,distributing
>> groups: trunk
>> media: Ethernet autoselect
>> status: active
>> inet 172.18.1.2 netmask 0xffff0000 broadcast 172.18.255.255
>> inet6 fe80::fce1:baff:fed1:6279%trunk0 prefixlen 64 scopeid 0xb
>> # tcpdump -tteni tun0
>> tcpdump: listening on tun0, link-type EN10MB
>> 1394652132.550634 fe:e1:ba:d7:fb:2e 01:80:c2:00:00:02 8809 124:
>> LACPv1, length: 110
>> 1394652159.024470 fe:e1:ba:d1:62:79 01:80:c2:00:00:02 8809 124:
>> LACPv1, length: 110
>>
>>
>> I guess 01:80:c2:00:00:02 is not sent to the other side ???? is this
>> normal , a tun should forward broadcast, should it not ?
>>
>> *go read qemu socket node*
>>
> Hello again !
>
> Using socket qemu was a bit tricky, trying to get to <socketed>
> interface leads to machine hang when doing ifconfig up on the second
> interface (probably the addr argument is wrong).
> Anyhow , trunk should work on one interface and it does but once again
> only with roundrobin, NO LACP :(
>
> the qemus is now using :
> -net nic,model=virtio,macaddr=52:54:00:12:01:01,addr=0x12 -net
> socket,mcast=230.0.0.1:42421
> and
> -net nic,model=virtio,macaddr=52:54:00:12:01:02,addr=0x12 -net
> socket,mcast=230.0.0.1:42421
>
> Machine number1:
>
> bsd1 # ifconfig vio0 up
> bsd1 # ifconfig trunk0 trunkport vio0 10.100.42.1/24
> bsd1 # ping 10.100.42.2
> PING 10.100.42.2 (10.100.42.2): 56 data bytes
> 64 bytes from 10.100.42.2: icmp_seq=0 ttl=255 time=20.186 ms
> 64 bytes from 10.100.42.2: icmp_seq=1 ttl=255 time=10.495 ms
> 64 bytes from 10.100.42.2: icmp_seq=2 ttl=255 time=9.848 ms
> --- 10.100.42.2 ping statistics ---
> 3 packets transmitted, 3 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 9.848/13.509/20.186/4.730 ms
> bsd1 # ifconfig trunk0 trunkproto lacp
> bsd1 # ping 10.100.42.2
> PING 10.100.42.2 (10.100.42.2): 56 data bytes
> --- 10.100.42.2 ping statistics ---
> 28 packets transmitted, 0 packets received, 100.0% packet loss
> bsd1 # ifconfig trunk0 down
> bsd1 # ifconfig trunk0 up
> bsd1 # ping 10.100.42.2
> PING 10.100.42.2 (10.100.42.2): 56 data bytes
> --- 10.100.42.2 ping statistics ---
> 5 packets transmitted, 0 packets received, 100.0% packet loss
> bsd1 # ifconfig trunk0 trunkproto roundrobin
> bsd1 # ping 10.100.42.2
> PING 10.100.42.2 (10.100.42.2): 56 data bytes
> 64 bytes from 10.100.42.2: icmp_seq=0 ttl=255 time=19.379 ms
> 64 bytes from 10.100.42.2: icmp_seq=1 ttl=255 time=12.347 ms
> 64 bytes from 10.100.42.2: icmp_seq=2 ttl=255 time=10.107 ms
> 64 bytes from 10.100.42.2: icmp_seq=3 ttl=255 time=11.031 ms
> --- 10.100.42.2 ping statistics ---
> 4 packets transmitted, 4 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 10.107/13.216/19.379/3.646 ms
> bsd1 # ifconfig trunk0
> trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr 52:54:00:12:01:01
> priority: 0
> trunk: trunkproto roundrobin
> trunkport vio0 master,active
> groups: trunk
> media: Ethernet autoselect
> status: active
> inet 10.100.42.1 netmask 0xffffff00 broadcast 10.100.42.255
> inet6 fe80::5054:ff:fe12:101%trunk0 prefixlen 64 duplicated scopeid
> 0x6
> bsd1 # ifconfig trunk0 trunkproto lacp
> bsd1 # ping 10.100.42.2
> PING 10.100.42.2 (10.100.42.2): 56 data bytes
> --- 10.100.42.2 ping statistics ---
> 4 packets transmitted, 0 packets received, 100.0% packet loss
> bsd1 # ifconfig
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
> priority: 0
> groups: lo
> inet6 ::1 prefixlen 128
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
> inet 127.0.0.1 netmask 0xff000000
> vio0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST>
> mtu 1500
> lladdr 52:54:00:12:01:01
> priority: 0
> trunk: trunkdev trunk0
> media: Ethernet autoselect
> status: active
> inet6 fe80::f044:d4c2:63de:2fc4%vio0 prefixlen 64 scopeid 0x1
> vio1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr fe:f5:00:88:0a:32
> priority: 0
> media: Ethernet autoselect
> status: active
> inet6 fe80::fcf5:ff:fe88:a32%vio1 prefixlen 64 scopeid 0x2
> inet 192.168.1.209 netmask 0xffffff00 broadcast 192.168.1.255
> enc0: flags=0<>
> priority: 0
> groups: enc
> status: active
> pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33192
> priority: 0
> groups: pflog
> trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr 52:54:00:12:01:01
> priority: 0
> trunk: trunkproto lacp
> trunk id: [(0000,00:00:00:00:00:00,0000,0000,0000),
> (0000,00:00:00:00:00:00,0000,0000,0000)]
> trunkport vio0 collecting,distributing
> groups: trunk
> media: Ethernet autoselect
> status: active
> inet 10.100.42.1 netmask 0xffffff00 broadcast 10.100.42.255
> inet6 fe80::5054:ff:fe12:101%trunk0 prefixlen 64 duplicated scopeid
> 0x6
> bsd1 # ping 10.100.42.2
> PING 10.100.42.2 (10.100.42.2): 56 data bytes
> 64 bytes from 10.100.42.2: icmp_seq=0 ttl=255 time=12.986 ms
> 64 bytes from 10.100.42.2: icmp_seq=1 ttl=255 time=9.361 ms
> 64 bytes from 10.100.42.2: icmp_seq=2 ttl=255 time=13.880 ms
> 64 bytes from 10.100.42.2: icmp_seq=3 ttl=255 time=12.520 ms
> 64 bytes from 10.100.42.2: icmp_seq=4 ttl=255 time=10.595 ms
> 64 bytes from 10.100.42.2: icmp_seq=5 ttl=255 time=9.553 ms
> --- 10.100.42.2 ping statistics ---
> 6 packets transmitted, 6 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 9.361/11.482/13.880/1.739 ms
>
>
> Machine number2:
>
>
> bsd2 # ifconfig vio0 up
> bsd2 # ifconfig trunk0 trunkport vio0 10.100.42.2/24
> bsd2 # ping 10.100.42.1
> PING 10.100.42.1 (10.100.42.1): 56 data bytes
> 64 bytes from 10.100.42.1: icmp_seq=0 ttl=255 time=15.186 ms
> 64 bytes from 10.100.42.1: icmp_seq=1 ttl=255 time=9.083 ms
> 64 bytes from 10.100.42.1: icmp_seq=2 ttl=255 time=11.252 ms
> --- 10.100.42.1 ping statistics ---
> 3 packets transmitted, 3 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 9.083/11.840/15.186/2.527 ms
> bsd2 # ifconfig trunk0 trunkproto lacp
> bsd2 # ping 10.100.42.1
> PING 10.100.42.1 (10.100.42.1): 56 data bytes
> --- 10.100.42.1 ping statistics ---
> 28 packets transmitted, 0 packets received, 100.0% packet loss
> bsd2 # ifconfig trunk0 down
> bsd2 # ifconfig trunk0 up
> bsd2 # ping 10.100.42.1
> PING 10.100.42.1 (10.100.42.1): 56 data bytes
> --- 10.100.42.1 ping statistics ---
> 6 packets transmitted, 0 packets received, 100.0% packet loss
> bsd2 # ifconfig trunk0 trunkproto roundrobin
> bsd2 # ping 10.100.42.1
> PING 10.100.42.1 (10.100.42.1): 56 data bytes
> 64 bytes from 10.100.42.1: icmp_seq=0 ttl=255 time=11.403 ms
> 64 bytes from 10.100.42.1: icmp_seq=1 ttl=255 time=11.248 ms
> 64 bytes from 10.100.42.1: icmp_seq=2 ttl=255 time=13.662 ms
> --- 10.100.42.1 ping statistics ---
> 3 packets transmitted, 3 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 11.248/12.104/13.662/1.106 ms
> bsd2 # ifconfig trunk0
> trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr 52:54:00:12:01:02
> priority: 0
> trunk: trunkproto roundrobin
> trunkport vio0 master,active
> groups: trunk
> media: Ethernet autoselect
> status: active
> inet 10.100.42.2 netmask 0xffffff00 broadcast 10.100.42.255
> inet6 fe80::5054:ff:fe12:102%trunk0 prefixlen 64 duplicated scopeid
> 0x6
> bsd2 # ifconfig trunk0 trunkproto lacp
> bsd2 # ping 10.100.42.1
> PING 10.100.42.1 (10.100.42.1): 56 data bytes
> --- 10.100.42.1 ping statistics ---
> 5 packets transmitted, 0 packets received, 100.0% packet loss
> bsd2 # ifconfig
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
> priority: 0
> groups: lo
> inet6 ::1 prefixlen 128
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
> inet 127.0.0.1 netmask 0xff000000
> vio0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST>
> mtu 1500
> lladdr 52:54:00:12:01:02
> priority: 0
> trunk: trunkdev trunk0
> media: Ethernet autoselect
> status: active
> inet6 fe80::2cb5:6052:6e2e:107c%vio0 prefixlen 64 scopeid 0x1
> vio1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr 76:91:d8:62:db:86
> priority: 0
> media: Ethernet autoselect
> status: active
> inet6 fe80::7491:d8ff:fe62:db86%vio1 prefixlen 64 scopeid 0x2
> inet 192.168.1.212 netmask 0xffffff00 broadcast 192.168.1.255
> enc0: flags=0<>
> priority: 0
> groups: enc
> status: active
> pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33192
> priority: 0
> groups: pflog
> trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr 52:54:00:12:01:02
> priority: 0
> trunk: trunkproto lacp
> trunk id: [(0000,00:00:00:00:00:00,0000,0000,0000),
> (0000,00:00:00:00:00:00,0000,0000,0000)]
> trunkport vio0 collecting,distributing
> groups: trunk
> media: Ethernet autoselect
> status: active
> inet 10.100.42.2 netmask 0xffffff00 broadcast 10.100.42.255
> inet6 fe80::5054:ff:fe12:102%trunk0 prefixlen 64 duplicated scopeid
> 0x6
> bsd2 # ping 10.100.42.1
> PING 10.100.42.1 (10.100.42.1): 56 data bytes
> 64 bytes from 10.100.42.1: icmp_seq=0 ttl=255 time=18.611 ms
> 64 bytes from 10.100.42.1: icmp_seq=1 ttl=255 time=10.399 ms
> 64 bytes from 10.100.42.1: icmp_seq=2 ttl=255 time=11.015 ms
> 64 bytes from 10.100.42.1: icmp_seq=3 ttl=255 time=10.811 ms
> 64 bytes from 10.100.42.1: icmp_seq=4 ttl=255 time=14.271 ms
> --- 10.100.42.1 ping statistics ---
> 5 packets transmitted, 5 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 10.399/13.021/18.611/3.119 ms
>
Hi,
I've been using vio(4) for some time now, and didn't had any
problems. But, I do not use trunk on it. Since vio is still a work in
progress, even on other platforms, I suggest you try changing your
virtualization driver. I've used em(4), pcn(4) and rl(4) in the past
with mixed results. Of course it all depends on which hypervisor you are
using. On qemu/kvm I generally go with vio and, if it do not work that
well, I go with em. YMMV.
Cheers,
--
Giancarlo Razzolini
GPG: 4096R/77B981BC