DHCP server(s) on VLAN issue

Hello,

I’m setting up a CCR2004-16G-2S+ with RouterOS 7.1.1, with one of the 10G lines being a trunk to the inside network. On the trunk I want to have up to 10 VLANs each with it’s own gateway and inside network (with DHCP) that it provides internet through.

The first VLAN I added to the trunk works great, however when I added the second and third VLANs (using the same configuration steps as the first one, but with different addressing) DHCP gives out proper addresses and DNS, but it gets the netmask wrong, and doesn’t set a gateway at all.

I’ll use one of the two VLANs as an example.

  1. I added an interface, vlan9, tagged as vlan 9, on the 10G interface.

  2. I added an address for the router on vlan 9, 10.9.9.254/24 , network 10.9.9.0

  3. I added a DHCP pool, pool9 with addresses 10.9.9.1-10.9.9.10

  4. I added a DHCP server for interface vlan9 called dhcpd9, which uses pool9 for its addresses, 12hr lease, authoritative after 2 seconds.

  5. Elsewhere on the network, I have a port set to vlan 9, and when I plug in a device, I get an address of 10.9.9.1, the DNS entries are correct, but the netmask is set to 255.0.0.0 (I’ve configured a /24) and the gateway is not set at all. The device cannot ping the router, but the router can ping the device.

I’ve used the same technique using individual copper ports with success. Am I getting something wrong using the multiple VLANs on the same trunk port?

Regards,

John

Can you please share your config?


/export file=anynameyoulike

Remove any personal information like serial and public IP addresses

I’ve been playing around with this further. Specifically looking at the VLANs that do work correctly, and the ones that don’t.

Could a firewall rule be allow the device to get an address, but preventing the netmask and gateway information from getting sent as well?

I’ll work on getting the config

You never mention creating a network profile .. its the second tab and not there for good looks.

Hint set the IP into the interface and press the DHCP setup button select that interface and look what it does after you walk thru the questions :slight_smile: