Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nova-network xenserver vlan

I am trying to configure nova-network VLAN works with Xenserver 6.2, here's the configuration:

    /etc/nova/nova.conf
    network_manager=nova.network.manager.VlanManager
    xenapi_vif_driver=nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
    #xenapi_vif_driver=nova.virt.xenapi.vif.XenAPIBridgeDriver
    flat_interface=eth1
    vlan_interface=eth1
    public_interface=eth0
    gateway=172.16.150.1
    #flat_network_bridge = xenbr1
    multi_host=True
    force_dhcp_release=True
    send_arp_for_ha=True
    flat_injected=False
    xenapi_ovs_integration_bridge=xenbr1

compute_driver = xenapi.XenAPIDriverxenapi_connection_url = http://10.11.21.35
xenapi_connection_username = root
xenapi_connection_password = xxxxxxxx

nova net-list:

root@compute-xen:~# nova net-list
+--------------------------------------+-----------------+-----------------+
| ID                                   | Label           | CIDR            |
+--------------------------------------+-----------------+-----------------+
| 0125ea7e-9b7c-41e1-b808-f6e80b6f8339 | vmware-net      | 10.11.4.0/24    |
| d7fa6c25-7200-4a31-a743-8236cae2eb35 | xen-vlan150-net | 172.16.150.0/24 |
| 2641fe38-881a-4b6e-89f9-a9f96e7f2f7f | xen-vlan200-net | 172.16.200.0/24 |
+--------------------------------------+-----------------+-----------------+
root@compute-xen:~# nova network-show xen-vlan150-net
+---------------------+--------------------------------------+
| Property            | Value                                |
+---------------------+--------------------------------------+
| bridge              | xapi14                               |
| bridge_interface    | eth1                                 |
| broadcast           | 172.16.150.255                       |
| cidr                | 172.16.150.0/24                      |
| cidr_v6             | -                                    |
| created_at          | 2014-09-20T14:33:02.000000           |
| deleted             | 0                                    |
| deleted_at          | -                                    |
| dhcp_start          | 172.16.150.3                         |
| dns1                | 8.8.4.4                              |
| dns2                | -                                    |
| gateway             | 172.16.150.254                       |
| gateway_v6          | -                                    |
| host                | -                                    |
| id                  | d7fa6c25-7200-4a31-a743-8236cae2eb35 |
| injected            | False                                |
| label               | xen-vlan150-net                      |
| multi_host          | True                                 |
| netmask             | 255.255.255.0                        |
| netmask_v6          | -                                    |
| priority            | -                                    |
| project_id          | 5f42cedeae954d658501b591252be8bc     |
| rxtx_base           | -                                    |
| updated_at          | 2014-09-20T14:43:54.000000           |
| vlan                | 150                                  |
| vpn_private_address | 172.16.150.2                         |
| vpn_public_address  | 10.11.21.37                          |
| vpn_public_port     | 1001                                 |
+---------------------+--------------------------------------+
root@compute-xen:~#

root@compute-xen:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br100           8000.3a208d52e612       no              eth1
virbr0          8000.000000000000       yes
vlan150         8000.000000000000       no
xapi14          8000.3a208d52e612       no              eth1.150
xapi15          8000.fa163e1968b5       no              vlan200
root@compute-xen:~# ifconfig -a
br100     Link encap:Ethernet  HWaddr 3a:20:8d:52:e6:12
          inet addr:10.11.4.4  Bcast:10.11.4.255  Mask:255.255.255.0
          inet6 addr: fe80::d093:4fff:fe15:45ea/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1403 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:73730 (73.7 KB)  TX bytes:774 (774.0 B)

eth0      Link encap:Ethernet  HWaddr 16:cd:71:4a:e8:92
          inet addr:10.11.21.37  Bcast:10.11.21.255  Mask:255.255.255.0
          inet6 addr: fe80::14cd:71ff:fe4a:e892/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:281868 errors:0 dropped:23 overruns:0 frame:0
          TX packets:175687 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:78058746 (78.0 MB)  TX bytes:45979281 (45.9 MB)

eth1      Link encap:Ethernet  HWaddr 3a:20:8d:52:e6:12
          inet6 addr: fe80::3820:8dff:fe52:e612/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:179 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9197 (9.1 KB)  TX bytes:3592 (3.5 KB)

eth2      Link encap:Ethernet  HWaddr 0a:28:e0:dd:a0:ef
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1.150  Link encap:Ethernet  HWaddr 3a:20:8d:52:e6:12
          inet6 addr: fe80::3820:8dff:fe52:e612/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:774 (774.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13312 (13.3 KB)  TX bytes:13312 (13.3 KB)

virbr0    Link encap:Ethernet  HWaddr 7a:42:97:b5:f6:44
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vlan150   Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet6 addr: fe80::1cf2:63ff:fe18:bbfe/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:774 (774.0 B)

vlan200   Link encap:Ethernet  HWaddr fa:16:3e:19:68:b5
          inet6 addr: fe80::f816:3eff:fe19:68b5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1944 (1.9 KB)

xapi14    Link encap:Ethernet  HWaddr 3a:20:8d:52:e6:12
          inet addr:172.16.150.4  Bcast:172.16.150.255  Mask:255.255.255.0
          inet6 addr: fe80::3820:8dff:fe52:e612/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:139 errors:0 dropped:0 overruns:0 frame:0
          TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11199 (11.1 KB)  TX bytes:11392 (11.3 KB)

xapi15    Link encap:Ethernet  HWaddr fa:16:3e:19:68:b5
          inet addr:172.16.200.4  Bcast:172.16.200.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe19:68b5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1674 (1.6 KB)

root@compute-xen:~#

Xenserver:

[root@xenserver-fskqadde ~]# ovs-vsctl show
0869b277-2a0a-4f8a-b147-eec7fdd8877a
    Bridge "xenbr1"
        fail_mode: standalone
        Port "xapi15"
            tag: 200
            Interface "xapi15"
                type: internal
        Port "xapi14"
            tag: 150
            Interface "xapi14"
                type: internal
        Port "xenbr1"
            Interface "xenbr1"
                type: internal
        Port "eth1"
            Interface "eth1"
        Port "xapi10"
            tag: 5
            Interface "xapi10"
                type: internal
        Port "vif16.0"
            Interface "vif16.0"
        Port "vif1.1"
            trunks: [150, 200]
            Interface "vif1.1"
        Port "vif1.3"
            tag: 4
            Interface "vif1.3"
        Port "xapi9"
            tag: 4
            Interface "xapi9"
                type: internal
    Bridge "xenbr0"
        fail_mode: standalone
        Port "vif1.0"
            Interface "vif1.0"
        Port "xapi1"
            tag: 10
            Interface "xapi1"
                type: internal
        Port "eth0"
            Interface "eth0"
        Port "xenbr0"
            Interface "xenbr0"
                type: internal
    ovs_version: "1.4.6"
[root@xenserver-fskqadde ~]#

I am trying to setup vm in net label xen-vlan150-net ( tag 150) of Openstack which the vm should be in the network label xen-vlan150-net (tag 150) of Xenserver,that means:

Vm in openstack xen-vlan150-net(tag 150), should be in Xenserver network label xen-vlan150-net (tag 150) Vm in openstack xen-vlan200-net(tag 150),should be in Xenserver network label nova-vlan200 (tag 200).

but it is not working. If configure the following int /etc/nova/nova.conf

xenapi_ovs_integration_bridge=xenbr1

then all VMs would in the bridge xenbr1 of Openvswitch of Xenserver.

Here's the openvswitch in Xenserver:

        bridge xapi14 is for xen-vlan150-net (tag 150)
        bridge xapi15 is for xen-vlan200-net (tag 200)

xe network-list:

uuid ( RO)                : 523d322a-d251-ac69-8d60-074c43eed91f
          name-label ( RW): xen-vlan150-net
    name-description ( RW):
              bridge ( RO): xapi14
uuid ( RO)                : 06143574-b1ac-5045-2b9a-f533241922b7
          name-label ( RW): nova-vlan200
    name-description ( RW):
              bridge ( RO): xapi15
[root@xenserver-fskqadde ~]# ovs-vsctl br-to-vlan xapi14
150
[root@xenserver-fskqadde ~]# ovs-vsctl br-to-vlan xapi15
200
[root@xenserver-fskqadde ~]# ovs-vsctl br-to-parent xapi14
xenbr1
[root@xenserver-fskqadde ~]# ovs-vsctl br-to-parent xapi15
xenbr1

So, how to realize following ?

Vm in openstack xen-vlan150-net(tag 150), should be in Xenserver network label xen-vlan150-net (tag 150)
Vm in openstack xen-vlan200-net(tag 150),should be in Xenserver network label nova-vlan200 (tag 200).

Thanks in advance.