neutron setting incorrect gateway

asked 2014-11-10 13:14:31 -0600

patrickt33 gravatar image

Juno on CentOS 7, following the RDO quickstart directions as well as the instructions from the question: https://ask.openstack.org/en/question... .

So, I have private and public network:

    [root@os-storage-1 ~(keystone_admin)]# neutron net-list
+--------------------------------------+---------+---------------------------------------------------+
| id                                   | name    | subnets                                           |
+--------------------------------------+---------+---------------------------------------------------+
| f1a1787f-2325-455e-87e1-d8408c1fb405 | public  | 5c55e3ba-f907-4980-b255-d7841bd68752 10.5.8.0/21  |
| f0145e45-5e46-4bad-9f90-813dce771f9a | private | b9fb8332-1bd9-4068-94ed-001212d34f9a 10.50.0.0/16 |
+--------------------------------------+---------+---------------------------------------------------+

The public network, which I want to be routed and used as floating IPs, was created with:

neutron subnet-create public 10.5.8.0/21 --name public_subnet --enable_dhcp=False --allocation-pool start=10.5.8.2,end=10.5.9.254 --gateway=10.5.8.1

The output from the command lists the gateway IP as 10.5.8.1, which is what I want. But the external gateway port that actually gets assigned to the router is 10.5.8.2, and it's listed as down in the Dashboard.

[root@os-storage-1 ~(keystone_admin)]# neutron router-port-list router1
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                        |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| acd9469d-ae02-410c-b508-e768f60ecb89 |      | fa:16:3e:2d:f6:e6 | {"subnet_id": "b9fb8332-1bd9-4068-94ed-001212d34f9a", "ip_address": "10.50.0.1"} |
| fb3b625b-f023-4afb-946d-8f2679f19eaa |      | fa:16:3e:2a:0f:bf | {"subnet_id": "5c55e3ba-f907-4980-b255-d7841bd68752", "ip_address": "10.5.8.2"}  |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+

I don't understand what I'm doing wrong. And to make matters stranger ( and I don't know if it's related) I have a completely unrelated (to anything!) ip assigned to virbr0.

br-ex: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.5.0.20  netmask 255.255.254.0  broadcast 10.5.1.254
        inet6 fe80::862b:2bff:fe78:316c  prefixlen 64  scopeid 0x20<link>
        ether 84:2b:2b:78:31:6c  txqueuelen 0  (Ethernet)
        RX packets 19150  bytes 2861722 (2.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13829  bytes 9368627 (8.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::862b:2bff:fe78:316c  prefixlen 64  scopeid 0x20<link>
        ether 84:2b:2b:78:31:6c  txqueuelen 1000  (Ethernet)
        RX packets 23484  bytes 3243101 (3.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16215  bytes 9588534 (9.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 6a:11:e4:94:d2:21  txqueuelen 0  (Ethernet)
        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

And, just because someone always asks for it when troubleshooting neutron, here's the output of ovs-vsctl show

[root@os-storage-1 ~(keystone_admin)]# ovs-vsctl show
c8c5c457-f735-4893-8ff5-ab2d3fd9f198
    Bridge br-ex
        Port "qg-fb3b625b-f0"
            Interface "qg-fb3b625b-f0"
                type: internal
        Port "eth0"
            Interface "eth0"
        Port br-ex
            Interface br-ex
                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}
    Bridge br-int
        fail_mode: secure
        Port patch-tun
            Interface patch-tun
                type ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-11-10 14:09:34 -0600

dbaxps gravatar image

updated 2014-11-10 14:15:45 -0600

You don't have problem with external gateway port
For instance

[root@juno1 ~(keystone_admin)]# neutron router-port-list router4
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                            |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
| 17ddee14-9f98-4165-a7b3-6db700017bd5 |      | fa:16:3e:6f:a8:e7 | {"subnet_id": "ac209735-54cd-418f-9245-252c56f5eed7", "ip_address": "50.0.0.1"}      |
| 7b037650-10e3-4818-8ff2-4fbd914679d9 |      | fa:16:3e:e5:de:97 | {"subnet_id": "147d5ecd-fe39-489e-8901-3b20a2c50148", "ip_address": "192.168.1.173"} |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+

External public sub_net for router4 was created with --gateway=192.168.1.1 and router4 works fine.

[root@juno1 ~(keystone_admin)]# neutron router-list
+--------------------------------------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id                                   | name    | external_gateway_info                                                                                                                                                                     | distributed | ha    |
+--------------------------------------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| 0da1a1d3-46ec-4c73-a82e-41acf14a26de | router2 | {"network_id": "65cbd354-daae-41bb-9d3c-e58b1062be19", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "147d5ecd-fe39-489e-8901-3b20a2c50148", "ip_address": "192.168.1.151"}]} | False       | False |
| 1cf08ea2-959f-4206-b2f1-a9b4708399c1 | router4 | {"network_id": "65cbd354-daae-41bb-9d3c-e58b1062be19", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "147d5ecd-fe39-489e-8901-3b20a2c50148", "ip_address": "192.168.1.173"}]} | False       | False |
| c33007b0-800f-4d5d-9ef8-45d52cb9237a | router3 | {"network_id": "65cbd354-daae-41bb-9d3c-e58b1062be19", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "147d5ecd-fe39-489e-8901-3b20a2c50148", "ip_address": "192.168.1.172"}]} | False       | False |

Qrouter-namespace routing table :-

    +--------------------------------------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
   [root@juno1 ~(keystone_admin)]# ip netns exec qrouter-1cf08ea2-959f-4206-b2f1-a9b4708399c1 route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 qg-7b037650-10
    50.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 qr-17ddee14-9f
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 qg-7b037650-10

Virbr0 is standard Libvirt gateway . "Virtualization" group has been installed. No reason for trouble

[root@juno1 ~(keystone_admin)]# brctl show
bridge name bridge id       STP enabled interfaces
virbr0      8000.52540030a639   yes     virbr0-nic
edit flag offensive delete link more

Comments

Well, ok, even tho that doesn't make sense to specify a gateway and seemingly have it ignored. But, that address is never getting assigned to a virtual interface and none of the floating IP space is accessible from anywhere, even the hosting server. I may need to go back to scratch...

patrickt33 gravatar imagepatrickt33 ( 2014-11-11 09:06:42 -0600 )edit

So, here's the goal. Each physical node will have an IP on 10.5.0.0/24. The internal/private IP for each virtual machine should be 10.50.0.0/16. The Floating IPs should be 10.5.8.0/21 and I want to allocate different portions of that pool to different projects, potentially. So how to set this up?

patrickt33 gravatar imagepatrickt33 ( 2014-11-11 09:10:39 -0600 )edit

Had this working on Essex, where each node had two interfaces, one private internode, one public and nova assigned the floating IPs to virtual interfaces on the appropriate hosts and bridged the traffic. But I'm having a really rough time translating this concept to Juno.

patrickt33 gravatar imagepatrickt33 ( 2014-11-11 09:14:16 -0600 )edit

And the character limit on these comments is annoying and ridiculous.

patrickt33 gravatar imagepatrickt33 ( 2014-11-11 09:14:41 -0600 )edit

Post your last question as a separate question. You will probably get some feedback faster.

dbaxps gravatar imagedbaxps ( 2014-11-11 09:16:59 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-11-10 13:14:31 -0600

Seen: 374 times

Last updated: Nov 10 '14