Ask Your Question
0

how to have vxlan and flat network on same interface

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

don gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-26 12:06:21 -0500

don gravatar image

The answer turns out to be, i needed to put a bridge_mappings line in [ovs] section, and use the mapped name

[ovs]
bridge_mappings = physnet1:br-ex
tunnel_type=vxlan
tunnel_id_ranges=1001:2000
tenant_network_type=vxlan,flat
local_ip=10.129.247.8
enable_tunneling=True

and

neutron net-create --provider:physical_network=physnet1 --provider:network_type=flat --shared --router:external=True ext-net
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-26 11:00:42 -0500

Seen: 1,593 times

Last updated: Jul 26 '14