Ask Your Question
0

neutron not setting up namespace for floating IPs

asked 2014-12-02 12:43:36 -0500

patrickt33 gravatar image

updated 2014-12-02 14:22:01 -0500

I don't know why this doesn't work now, I had it working at one point, then it quit and now I've reinstalled and I can't get it to work. I created my public and private nets:

Create private net

neutron router-create router1
neutron net-create private
neutron subnet-create --name private_subnet private 10.50.0.0/16 --allocation-pool start=10.50.0.100,end=10.50.254.254
neutron router-interface-add router1 private_subnet

Create public/floating net

neutron net-create public --router:external=True
neutron subnet-create public 10.5.8.0/21 --name public_subnet --enable_dhcp=False --allocation-pool start=10.5.8.11,end=10.5.15.254 --gateway=10.5.8.1
neutron router-gateway-set router1 public

ovs-vsctl show

a3e4d74c-4d59-46de-8fc4-38d18f71fc09
    Bridge br-ex
        Port "qg-2a4bad3b-3f"
            Interface "qg-2a4bad3b-3f"
                type: internal
        Port br-ex
            Interface br-ex
                type: internal
        Port "em1"
            Interface "em1"
    Bridge br-tun
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port br-tun
            Interface br-tun
                type: internal
    Bridge br-int
        fail_mode: secure
        Port "qvo44dfb35d-c8"
            tag: 1
            Interface "qvo44dfb35d-c8"
        Port br-int
            Interface br-int
                type: internal
        Port "tap65fba222-5d"
            tag: 1
            Interface "tap65fba222-5d"
                type: internal
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port "qr-ed08ca8d-73"
            tag: 1
            Interface "qr-ed08ca8d-73"
                type: internal
    ovs_version: "2.1.3"

But when I try to show the namespaces, only one appears. The router ports all show as "down" in the dashboard.

 ip netns
qrouter-7d266a52-a70a-41a6-9f3f-8e2438d10d4c
qdhcp-2c084796-dc3b-407f-a48e-a941e7263fd0

[root@os-node-1 ~(keystone_admin)]# ip netns
qrouter-7d266a52-a70a-41a6-9f3f-8e2438d10d4c
qdhcp-2c084796-dc3b-407f-a48e-a941e7263fd0
[root@os-node-1 ~(keystone_admin)]# ip netns exec qrouter-7d266a52-a70a-41a6-9f3f-8e2438d10d4c ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qg-2a4bad3b-3f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.5.8.11  netmask 255.255.248.0  broadcast 10.5.15.255
        inet6 fe80::f816:3eff:fe21:94f4  prefixlen 64  scopeid 0x20<link>
        ether fa:16:3e:21:94:f4  txqueuelen 0  (Ethernet)
        RX packets 3909  bytes 241346 (235.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 53  bytes 2670 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qr-ed08ca8d-73: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.50.0.1  netmask 255.255.0.0  broadcast 10.50.255.255
        inet6 fe80::f816:3eff:fe85:ad23  prefixlen 64  scopeid 0x20<link>
        ether fa:16:3e:85:ad:23  txqueuelen 0  (Ethernet)
        RX packets 148  bytes 14418 (14.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 121  bytes 12696 (12.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@os-node-1 ~(keystone_admin)]# ip netns exec qrouter-7d266a52-a70a-41a6-9f3f-8e2438d10d4c netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.5.8.1        0.0.0.0 ...
(more)
edit retag flag offensive close merge delete

Comments

Oh, and my physical net is 10.5.0.0/23.

patrickt33 gravatar imagepatrickt33 ( 2014-12-02 12:44:36 -0500 )edit

Please, take a look at my answer. br-ex is supposed to be on 10.5.0.0/23

dbaxps gravatar imagedbaxps ( 2014-12-02 14:33:25 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-12-02 12:49:22 -0500

GLaupre gravatar image

Hello,

The qrouter and qdhcp are used for the namespace in your private_subnet 10.50.0.0/16.

You have

--enable_dhcp=False

for your public network, therefore no qdhcp will be created.

edit flag offensive delete link more

Comments

Ok, which is the correct setting for a floating IP segment, right? So I guess the real question is, why can't I access my floating IPs? default secgroup allows ICMP and ssh, no firewalls involved, I can't even ping it from the host machine. Also no iptables rules not other than neutron gen'd ones.

patrickt33 gravatar imagepatrickt33 ( 2014-12-02 13:10:55 -0500 )edit
0

answered 2014-12-02 13:32:52 -0500

dbaxps gravatar image

If your physical net is 10.5.0.0/23. I would recreate public subnet :-

neutron subnet-create public 10.5.0.0/23 --name public_subnet --enable_dhcp=False \
--allocation-pool start=10.5.0.11,end=10.5.1.254 --gateway=10.5.0.1

due to em1 is OVS port of br-ex,properly configuring /etc/sysconfig/ifcfg-br-ex && /etc/sysconfig/ifcfg-em1
for Juno. Gateway IP on public should match real gateway on 10.5.0.0/23.
qdhcp-namespace doesn't show up in ip netns until your first VM will start on private subnet.
Please, update ovs-vsctl show && ifconfig in question field.

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-12-02 12:43:36 -0500

Seen: 883 times

Last updated: Dec 02 '14