Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2014-07-26 11:00:42 -0600

don gravatar image

how to have vxlan and flat network on same interface

Running icehouse on ubuntu 14.04. My machine has 2 physical interfaces (em1, p3p1). I am using em1 for 'control' and 'p3p1' as the neutron interface. I have created an ovs bridge (br-ex) with p3p1 in it. br-ex has an ip address on the external subnet. From the host, i can ping the external router.

em1 subnet == 10.129.246/24 p3p1 subnet == 10.129.247/24 [my ip == .8, gw==.1]

I would like to have a 'flat' network to be able to reach my gateway (and thus the world), as well as run vxlan between my nova/neutron nodes.

But i am finding my 'flat' network does not work, i cannot ping the 10.129.247.1 router from within the neutron router namespace [neutron assigns 10.129.247.32 to this interface, the namespace and interface come up ok].

suggestions?

ml2 is setup as:

[ml2]
type_drivers = vxlan,flat
tenant_network_types = vxlan,flat
mechanism_drivers = openvswitch
[ml2_type_flat]
flat_networks = *
[ml2_type_vlan]
[ml2_type_gre]
[ml2_type_vxlan]
vni_ranges = 1001:2000
vxlan_group = 239.1.1.2
[database]
sql_connection = mysql://stack:secret@127.0.0.1:3306/neutron

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver


[OVS]
tunnel_type=vxlan
tunnel_id_ranges=1001:2000
tenant_network_type=vxlan,flat
local_ip=10.129.247.8
enable_tunneling=True
[AGENT]
tunnel_types = vxlan
polling_interval=2
[SECURITYGROUP]
firewall_driver=neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

setup my external router as:

neutron net-create --provider:physical_network=br-ex --provider:network_type=flat --shared --router:external=True ext-net

neutron subnet-create ext-net --name ext-subnet \
    --allocation-pool start=10.129.247.32,end=10.129.247.254 \
    --disable-dhcp --gateway 10.129.247.1 10.129.247/24

so far so good. I then check the ext-net, and it can not ping either my gateway (external to this machine), or the interface on the machine.

$ ip netns list
qrouter-e236e677-454c-44a8-b26d-4af483ba4caf
$ sudo ip netns exec qrouter-e236e677-454c-44a8-b26d-4af483ba4caf /bin/bash
# ifconfig
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:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:616 (616.0 B)  TX bytes:616 (616.0 B)

qg-686f8dcc-4a Link encap:Ethernet  HWaddr fa:16:3e:13:58:45  
          inet addr:10.129.247.32  Bcast:10.129.247.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe13:5845/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:990 (990.0 B)

# ping 10.129.247.1
PING 10.129.247.1 (10.129.247.1) 56(84) bytes of data.
^C
--- 10.129.247.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

# ping 10.129.247.8
PING 10.129.247.8 (10.129.247.8) 56(84) bytes of data.
^C
--- 10.129.247.8 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

# ping 10.129.247.32
PING 10.129.247.32 (10.129.247.32) 56(84) bytes of data.
64 bytes from 10.129.247.32: icmp_seq=1 ttl=64 time=0.038 ms
^C
--- 10.129.247.32 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.038/0.038/0.038/0.000 ms

My ovs-vsctl show:

$ sudo ovs-vsctl show
b223d9db-f2b6-4fdc-9410-687336d886d6
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
        Port "p3p1"
            Interface "p3p1"
    Bridge br-int
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port br-int
            Interface br-int
                type: internal
        Port "qg-686f8dcc-4a"
            tag: 4095
            Interface "qg-686f8dcc-4a"
                type: internal
    Bridge br-tun
        Port br-tun
            Interface br-tun
                type: internal
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
    ovs_version: "2.0.1"