DHCP in a multi VLAN environment

Hello, dear all.

Maybe someone can help. We have the following situation - physical server with Ubuntu 20.04 on it and MAAS on top. Server has 2 physical NICs which are connected to the switch and we have another server (client) which is connected to the same switch. MAAS discovered those NIC as a fabrics and discovered the subnets. IP settings on Ubuntu applied with Netplan:

network:
  version: 2
  ethernets:
    eno1: (for LAN)
      dhcp4: no
      addresses: [10.0.0.2/22]
      gateway4: 10.0.0.1
    eno2: (for MAAS DHCP)
      dhcp4: no
      addresses: [172.20.0.1/16]

With all default settings, we have DHCP dynamic range configured in MAAS on interface eno2 for subnet 172.20, both server and client connected to the Default VLAN on the switch and the client is able to get an IP from MAAS DHCP.

We created with Netplan a VLAN 100 (the configuration is below) and want to use this VLAN for DHCP. Once this VLAN was created, MAAS server discovered it and I can see both subnets (172.20 and 172.16) in MAAS under the fabric-1.

network:
  version: 2
  ethernets:
    eno1: (LAN)
      dhcp4: no
      addresses: [10.0.0.2/22]
      gateway4: 10.0.0.1
    eno2: 
      dhcp4: no
      addresses: [172.20.0.1/16]
  vlans:
    test: (for MAAS DHCP)
      id: 100
      link: eno2
      addresses: [172.16.0.1/16]

We configured in MAAS the DHCP dynamic range on the subnet we want to use (172.16), we created VLAN 100 on a switch and we added the ports of the server and the client to VLAN 100. So, the current state on a switch is:

  1. MAAS NIC eno2 is connected to port 1, which is tagged to VLAN 1 and 100
  2. Client server is connected to port 4, which is untagged to VLAN 100

The current state on a MAAS server is:

  1. fabric-1, subnet 172.20 has a DHCP dynamic range
  2. fabric-1, subnet 172.16 has a DHCP dynamic range

In that state, the client is not able to get an IP from 172.16.
If we remove port 4 on a switch (client is connected to) from VLAN 100 and add port 4 back to a Default VLAN 1 (untagged), the client is able to get an IP from 172.20 like its should be.

We have checked the MAAS dhcpd.conf file and can see the applied settings are reflected in that file (we can see both pools for 172.20 and 172.16).

Is it possible the MAAS server will be able to provide DHCP service in not in a Default VLAN 1?

PS: I read the documentation, and I saw its mention something about an untagged VLAN which is MAAS using by default. But looks like this is a MAAS definition of untagged. There is no clear explanation (for me at least) what does this untagged means. Not sure if its related or not. In addition, the VLAN 100 we created with Netplan is shown in MAAS server as a TYPE NUMA NODE VLAN (which is ok I guess), but its not saying anything about VLAN ID 100 itself.

Thank you in advance.

Hello, dear all.

Maybe someone can help? Perhaps moderators?

@leo345345t, by “client”, do you mean the downstream nodes being managed by MAAS? or literally a non-MAAS client on the same subnet managed by the switch? also, do you have DHCP enabled in MAAS in both cases?

@leo345345t Can you also clarify which version of MAAS you’re using, and whether that was installed from repositories (PPA) or via Snaps?

I can attempt to build a reproducer to model what you’re describing, if I have those details.

Thanks!

@billwear - We have DHCP enabled everywhere. ‘Client’ is another non-managed by MAAS server, which we want to commission. It’s just connected to the same switch and should get DHCP and boot from it.

@setuid - The latest one 2.9 installed via Snap.

Hello, dear @setuid and @billwear.

Did you get a chance to test it somewhere or do you have any other idea what can I do?

Thanks.

@leo345345t

Apologies for the delays, I haven’t had time to spin up a test just yet, as I’ve been pulled into some priority work here. I’ll carve out some time this week to try to model your scenario and see what I can come up with.

1 Like

@setuid, thank you very much! appreciate.

Did you make any progress on this?

I have a setup like that in my home lab, and it works.

Can you provide the the output of ‘maas $profile subnets read’ and ‘maas $profile rack-controllers read’?

And if possible, can you share the configuration of the switch? My guess would that the problem is there. You write, that MAAS is connected to a port that has 1 and 100 as tagged VLANs, while your netplan is setup as 1 as untagged, and 100 as tagged.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.