Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

DHCP not working in VLAN subinterfaces

I have a fresh install of RDO (Rocky) all-in-one in a CentOS Linux release 7.6.1810 (Core). Unfortunately i'm not being able to get a DHCP assigned IP address when connected through br-vlan.300 interface.

public network ------ | R1 | ------- private_network (GW 192.168.2.1)
                      |    | ------- management_network (VLAN 300 GW 192.168.3.254)
                      |    | ------- storage_network (VLAN 400 GW 192.168.4.254)

The GWs of the management and storage network are not the default .1 ones because .1 was taken by a static address provisioned in Openstack (this was due to some testing where the GW for these networks was a pfsense instance).

Moving on, the host server has two NICs eno1 which is linked to the bridge br-ex (public network) and enp2s0 which is linked to br-vlan. The enp2s0 interface is linked to a physicall switch via a trunk interface, the DHCP Requests are coming from a machine connected to an access port of this physicall switch.

Packet captures show the DHCP request but no response from the DHCP server. If i set the IP manually on the source of the DHCP request i can ping the IP of the DHCP server and the GW.

[edsa@openstack ~(keystone_admin)]$ ip netns
qrouter-b7bd349b-b4e2-4fbf-9567-cf2ff680242b (id: 2)
qdhcp-0b05bf9d-ed96-4b3c-b00d-9fc624465e3f (id: 1)

[edsa@openstack ~(keystone_admin)]$ sudo ip netns exec qrouter-b7bd349b-b4e2-4fbf-9567-cf2ff680242b ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
13: qr-04897fa0-c7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:ba:ed:d3 brd ff:ff:ff:ff:ff:ff
14: qr-11412e39-f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:d6:35:53 brd ff:ff:ff:ff:ff:ff
15: **qr-c56c14f7-22**: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:03:cc:38 brd ff:ff:ff:ff:ff:ff
16: qg-3749cea5-17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:d1:ad:9d brd ff:ff:ff:ff:ff:ff

[edsa@openstack ~(keystone_admin)]$ sudo ip netns exec qrouter-b7bd349b-b4e2-4fbf-9567-cf2ff680242b tcpdump -nni qr-c56c14f7-22 port 67 or port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on qr-c56c14f7-22, link-type EN10MB (Ethernet), capture size 262144 bytes
10:33:56.892301 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from d4:be:d9:3f:91:48, length 300
10:34:00.766967 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from d4:be:d9:3f:91:48, length 300

[edsa@openstack ~(keystone_admin)]$ sudo ip netns exec qdhcp-0b05bf9d-ed96-4b3c-b00d-9fc624465e3f ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
12: **tap8404c38c-95**: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:cd:d5:30 brd ff:ff:ff:ff:ff:ff

[edsa@openstack ~(keystone_admin)]$ sudo ip netns exec qdhcp-0b05bf9d-ed96-4b3c-b00d-9fc624465e3f tcpdump -nni tap8404c38c-95 port 67 or port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tap8404c38c-95, link-type EN10MB (Ethernet), capture size 262144 bytes
10:31:14.506723 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from d4:be:d9:3f:91:48, length 300
10:31:22.081806 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from d4:be:d9:3f:91:48, length 300

Network configuration

[edsa@openstack ~(keystone_admin)]$ sudo ovs-vsctl show
47ec1c38-a326-48e3-ac1a-b32bf2757f35
    Manager "ptcp:6640:127.0.0.1"
        is_connected: true
    Bridge br-ex
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port br-ex
            Interface br-ex
                type: internal
        Port "enp2s0"
            Interface "enp2s0"
        Port phy-br-ex
            Interface phy-br-ex
                type: patch
                options: {peer=int-br-ex}
    Bridge br-vlan
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port br-vlan
            Interface br-vlan
                type: internal
        Port "eno1"
            Interface "eno1"
        Port phy-br-vlan
            Interface phy-br-vlan
                type: patch
                options: {peer=int-br-vlan}
    Bridge br-tun
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port br-tun
            Interface br-tun
                type: internal
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
    Bridge br-int
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port "qr-c56c14f7-22"
            tag: 2
            Interface "qr-c56c14f7-22"
                type: internal
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port br-int
            Interface br-int
                type: internal
        Port "tap8404c38c-95"
            tag: 2
            Interface "tap8404c38c-95"
                type: internal
        Port "qr-11412e39-f6"
            tag: 3
            Interface "qr-11412e39-f6"
                type: internal
        Port "qg-3749cea5-17"
            tag: 4
            Interface "qg-3749cea5-17"
                type: internal
        Port "qr-04897fa0-c7"
            tag: 1
            Interface "qr-04897fa0-c7"
                type: internal
        Port int-br-ex
            Interface int-br-ex
                type: patch
                options: {peer=phy-br-ex}
        Port int-br-vlan
            Interface int-br-vlan
                type: patch
                options: {peer=phy-br-vlan}
    ovs_version: "2.10.1"

[edsa@openstack ~(keystone_admin)]$ sudo ip -d link show br-vlan.300
9: br-vlan.300@br-vlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether c0:3f:d5:66:c1:ec brd ff:ff:ff:ff:ff:ff promiscuity 0
    vlan protocol 802.1Q id 300 <REORDER_HDR> addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
[edsa@openstack ~(keystone_admin)]$ sudo ip -d link show br-vlan.400
10: br-vlan.400@br-vlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether c0:3f:d5:66:c1:ec brd ff:ff:ff:ff:ff:ff promiscuity 0
    vlan protocol 802.1Q id 400 <REORDER_HDR> addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

/etc/neutron/plugins/ml2/openvswitch_agent.ini:238:bridge_mappings=extnet:br-ex,phynet:br-vlan
/etc/neutron/plugins/ml2/ml2_conf.ini:235:network_vlan_ranges=phynet

[edsa@openstack ~(keystone_admin)]$ openstack network show management_network
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | UP                                   |
| availability_zone_hints   |                                      |
| availability_zones        | nova                                 |
| created_at                | 2019-02-06T17:00:27Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 0b05bf9d-ed96-4b3c-b00d-9fc624465e3f |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | None                                 |
| is_vlan_transparent       | None                                 |
| mtu                       | 1500                                 |
| name                      | management_network                   |
| port_security_enabled     | True                                 |
| project_id                | 9936fea4d0794028bd1532d2f7f43b7d     |
| provider:network_type     | vlan                                 |
| provider:physical_network | phynet                               |
| provider:segmentation_id  | 300                                  |
| qos_policy_id             | None                                 |
| revision_number           | 6                                    |
| router:external           | Internal                             |
| segments                  | None                                 |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | 690502c2-4ea8-478d-b793-3974e309b136 |
| tags                      |                                      |
| updated_at                | 2019-02-07T18:39:31Z                 |
+---------------------------+--------------------------------------+
[edsa@openstack ~(keystone_admin)]$ openstack network show storage_network
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | UP                                   |
| availability_zone_hints   |                                      |
| availability_zones        | nova                                 |
| created_at                | 2019-02-06T17:01:02Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | cb22d73b-af95-44fb-994c-d31901bceb2c |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | None                                 |
| is_vlan_transparent       | None                                 |
| mtu                       | 1500                                 |
| name                      | storage_network                      |
| port_security_enabled     | True                                 |
| project_id                | 9936fea4d0794028bd1532d2f7f43b7d     |
| provider:network_type     | vlan                                 |
| provider:physical_network | phynet                               |
| provider:segmentation_id  | 400                                  |
| qos_policy_id             | None                                 |
| revision_number           | 6                                    |
| router:external           | Internal                             |
| segments                  | None                                 |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | 199443b3-4753-4e6e-b589-8e86e2629f41 |
| tags                      |                                      |
| updated_at                | 2019-02-07T18:40:01Z                 |
+---------------------------+--------------------------------------+