Setting up a connection between a VTEP and a Neutron network

Use this procedure to set up a connection between a VTEP and a Neutron network in MidoNet.

For this procedure you will need to know the VTEP’s management IP and port, the physical port on the VTEP and the VLAN ID at this port to which you are connecting, the UUID of the Neutron network which you want to connect to the VTEP, and the IP addresses of all the hosts on the Neutron network that you want to communicate with the VTEP.

  1. Create a tunnel zone of type vtep.

    All hosts that want to communicate with the VTEP using VXLAN tunnels are required to belong to a tunnel zone of type VTEP, using the IP that each of them will use as VXLAN tunnel endpoint.

    To create a tunnel zone issue the following command in the MidoNet CLI:

    midonet> tunnel-zone create name vtep_zone type vtep
    tzone0

    As you can see you just created a vtep type tunnel zone, tzone1.

  2. Add a VTEP to MidoNet and assign it to the vtep tunnel zone that you created, using the local IP that this host it meant to use in VXLAN tunnels to the VTEP. Note that this IP may be the same that the host uses to communicate with other MidoNet hosts.

    midonet> vtep add management-ip 192.168.2.10 management-port 6632 tunnel-zone tzone0
    vtep0

    You can determine the state of the VTEP connection by listing the current VTEPs. If your VTEP had been added successfully you should see a similar message, saying connection-state connected.

    vtep vtep0 name VTEP-NAME description OVS VTEP Emulator management-ip 192.168.2.10 management-port 6632 tunnel-zone tzone0 connection-state connected
  3. Create a binding between the VTEP and a Neutron network behind a MidoNet bridge. For that, you will need the UUID of the Neutron network behind that bridge. To find out the UUID use these commands:

    midonet> list bridge
    bridge bridge0 name public state up
    midonet> show bridge bridge0 id
    765cf657-3cf4-4d79-9621-7d71af38a298

    The Neutron network you are binding the VTEP to is behind bridge0, and it has the UUID of 765cf657-3cf4-4d79-9621-7d71af38a298 as you can see in the output of the command.

  4. For the hosts on the Neutron network to be able to communicate with the VTEP, their IP addresses have to be in the same tunnel zone as the VTEP.

    1. To find out their addresses, use these commands:

      midonet> host list
      host host0 name rhos5-allinone-jenkins.novalocal alive true
      midonet> host host0 list interface
      iface veth1 host_id host0 status 3 addresses [u'172.16.0.2', u'fe80:0:0:0:fc2a:9eff:fef2:aa6c'] mac fe:2a:9e:f2:aa:6c mtu 1500 type Virtual endpoint DATAPATH
      ...
    2. Add the host’s IP address to the same tunnel zone as the VTEP:

      midonet> tunnel-zone tzone0 add member host host0 address 172.16.0.2

    Repeat these steps for every host in the Neutron network that you want to communicate with the VTEP.

    [Important]Important

    Normally, a host may only be assigned to one tunnel zone, gre or vxlan type. A host connecting to a VTEP is an exception because you may assign it to two tunnel zones, a gre/vxlan one and a vtep one. Note that a host can still use the same IP for both tunnel zones.

  5. Create a binding between the VTEP’s VLAN 10 and the Neutron network behind the bridge0.

    In this example you are connecting the hosts on VLAN 10 with the Neutron network 765cf657-3cf4-4d79-9621-7d71af38a298 behind the bridge0:

    midonet> vtep vtep0 add binding network-id 765cf657-3cf4-4d79-9621-7d71af38a298 physical-port swp1 vlan 10

Congratulations, you have just created a binding between the network behind the VTEP’s VLAN 10 physical port swp1 and the Neutron network with the UUID 765cf657-3cf4-4d79-9621-7d71af38a298 in MidoNet.

[Tip]Tip

To be able to test the connection between the VTEP and MidoNet (i.e. to ping MidoNet from a host on the VTEP) you have to modify the default ingress security rule, by adding to it the IP address of the host (pinging the host from MidoNet should work without any additional configuration). For more information, see the section called “Enabling connection between VTEP and MidoNet hosts”.

Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.


loading table of contents...