2 Replies Latest reply on Nov 22, 2019 6:39 AM by Zhuchenko Valery

    trunk pass through to vm

    Zhuchenko Valery

      Hi, ALL

       

      At OVS server (3.4.5) I have two LACP interfaces (eth0, eth1) with trunk and bond0=eth0+eth1 (Bond Mode=Link aggregation)

      I can create vlan interfaces for separated vlans (Networking, VLAN Interfaces, for example, bond0.500) and vm's can work normally with networks based on this vlan interfaces.

       

      But now I need pass through FULL trunk to new vm (oracle linux 7), how can I do this, it is possible?

      I tried to create network based on bond0 and vm with this network can work with only vlans which not used as separated vlans.

       

      For example (192.168.23.221 and 192.168.25.221 is default gateways):

       

      at vm I can create eth0.300 192.168.23.238/24 brd 192.168.23.255 and ping -c 1 192.168.23.221 1 packets transmitted, 1 received, 0% packet loss

      at ovs tcpdump -i bond0 -n -n vlan 300 and icmp

      12:28:28.174510 IP 192.168.23.238 > 192.168.23.221: ICMP echo request, id 2066, seq 1, length 64

      12:28:28.175070 IP 192.168.23.221 > 192.168.23.238: ICMP echo reply, id 2066, seq 1, length 64

       

      but

       

      for eth0.500 192.168.25.238/24 brd 192.168.25.255 ping -c 1 192.168.25.221 1 packets transmitted, 0 received, 100% packet loss

      at ovs server empty output for tcpdump -i bond0 -n -n vlan 500 and icmp (tcpdump -i any -n -n icmp also)

       

       

        • 1. Re: trunk pass through to vm
          budachst

          OVM always uses bridges for connecting its guests to the network, when using regular, virtual networks. If you want to passthrough a trunk, then you will probably have to passthrough a complete PCI-NIC to this guest. Take a look at the other post, where this has been asked as well.

           

          Cheers,

          budy

          • 2. Re: trunk pass through to vm
            Zhuchenko Valery

            Thank you.

             

            I was looking for a post about trunk passthrough but couldn't find anything.

             

            I created a virtual network based on bond0.

            At OVM Manager I see this network with id=1084edaabe.

             

            I also created a virtual network based on bond0.500.

            At OVM Manager I see this network with id=1014516d7f.

             

            My virtual machine has only one vnic related with network id=1084edaabe.

             

            At OVS I see:

             

            ip addr show

            bond0: ... master 1084edaabe state UP

            bond0.500@bond0: ... master 1014516d7f state UP

            13: 1014516d7f:  ... state UP

            34: 1084edaabe:  ... state UP

            vif36.0: ... master 1084edaabe state UP

             

            brctl show

            bridge name bridge id  STP enabled interfaces

            1014516d7f  8000.48df3792109a no  bond0.500

            1084edaabe  8000.48df3792109a no  bond0

                                                                          vif36.0

             

            Virtual machine eth0 associated with 1084edaabe.

            From this virtual machine I can ping gateways:

            ping -c 1 192.168.23.221

            1 packets transmitted, 1 received

            ping -c 1 192.168.25.221

            1 packets transmitted, 1 received

             

            At this virtual machine I create an interface for vlan 300:

            ip link add link eth0 name eth0.300 type vlan id 300

            ip addr add 192.168.23.238/24 dev eth0.300

            ping -c 1 192.168.23.221

            1 packets transmitted, 1 received, 0% packet loss

            It works.

             

            At this virtual machine, I create an interface for vlan 500:

            ip link add link eth0 name eth0.500 type vlan id 500

            ip addr add 192.168.25.238/24 dev eth0.500

            ping -c 1 192.168.25.221

            From 192.168.25.238 icmp_seq=1 Destination Host Unreachable

            It doesn't work.

             

            I understand correctly that bond0.500 intercepts all vlan 500 at the OVS layer and virtual machine can work with vlan 500 only if I add to this virtual machine vnic belonging to the network with id=1014516d7f (bridge with bond0.500)?