You plug a laptop into port 4 and it gets 192.168.20.53, while the office network is supposed to be there. Or a printer gets nothing and ends up on an address starting with 169.254. Or you agreed on a fixed address and the device gets something else anyway.
Those are three different problems from the same family of causes: the port is in a different network than you thought, or the DHCP server answering is not the one you meant.
The quick checks, in this order
- Which server handed out the address?
/ip dhcp-server lease print. A good answer: a lease with your device's MAC on the server belonging to that network,dhcp-vlan10-lanfor instance. On another server means the port is in the wrong VLAN. - Which servers exist?
/ip dhcp-server print. A good answer: one server per network, each on its own interface. Two servers on one interface is always wrong. - Which pool belongs to it?
/ip pool printand/ip dhcp-server network print. A good answer: the pool falls inside that network's subnet, andgatewayholds the router address of the same network. - Which VLAN is the port in?
/interface bridge port printand look atpvid, then/interface bridge vlan printfor the tagged and untagged lists. A good answer: that port's pvid is the VLAN you meant, and the port is underuntaggedfor the same id. - Is the device asking at all?
/log print where topics~"dhcp"shows whether a request came in. If nothing appears, use/tool torchon that interface to see whether there is any traffic. - Is somebody else answering?
/ip dhcp-server alert printcan report a second DHCP server on the network. An old modem still handing out addresses is a classic.
The usual causes
- The port is not in the port assignment list. Ports you do not name in the VLANs section become access ports of the first VLAN in the table. If your guest network is at the top, all of those ports land on the guest network.
- A stale pvid. Delete a VLAN and ports still point at it. The tool cleans that up, but a script you edited by hand can keep a pvid that no longer appears in the bridge VLAN table, and with ingress filtering on, all traffic from that port disappears.
- A fixed address inside the pool. A lease set by hand on .50 while the pool starts at .10 will sooner or later clash with a device that got .50 from the server.
- DHCP is off for that network. The device then invents an address in 169.254.x.x and nothing works.
- Only leases may talk. Turn on ARP entries only for DHCP leases and a device with a hand-set address can no longer communicate. That is the point of the option, but it does surprise you.
What the configurator does about it
If you place servers, clients or virtual machines with a fixed address on the network board, the tool does the arithmetic on those addresses. An address outside its VLAN's network, an address two devices both claim, the network or broadcast address, the router's own address: all of those are reported, with the device's name attached. A fixed address inside the DHCP range is a note with the range quoted: keep fixed addresses outside it, or the router may hand out the same address. See Checks about addresses.
The first VLAN in the site table deserves its own check. If that one is isolated, so a guest network, it is an error: wired ports default to the first VLAN, which puts your whole wired network on the guest network. Put a VLAN for the main network at the top.
Overlapping subnets within one device, a VLAN and the WAN touching each other for example, are an error as well. And if the LAN subnet is too small for a pool, the LAN and DHCP section says so.
What the tool cannot see is a second DHCP server on your network that is not yours. That is what dhcp-snooping on the bridge is for, which you can switch on in the Bridge and ports section, and /ip dhcp-server alert on the router.
When it is not your router
- The modem is still handing out addresses. Not in bridge mode means a second server on your network. See Behind two routers.
- The device has a fixed address of its own. Printers and cameras are often set by hand and never ask for anything.
- A switch with its own VLAN layout. It can put the port in a different VLAN than the one you expect on your router.
Further reading: LAN and DHCP, VLANs and Planning addresses.