Page 1 of 1

DHCP on physical interface comes out invalid using Wizard

Posted: Sun Oct 18, 2020 8:52 pm
by dpsguard
Hello All,

I removed interface ether9 of my RG493G, from bridge. Then assigned this physical interface an ip address and then created dhcp scope using the wizard. Process completes, but dhcp server comes out as invalid.

main reason, I read is that if there is no IP address assigned to the interface used for dhcp scope or if that interface is part of bridge and then we assign dhcp scope to use the actual port, both of which are not true in my case.

If I create an interface on bridge or on a vlan interface, they come out valid. Though only vlan interface based scopes are working for me. Bridge scope even if not showing any invalid bang, does not work. And now, while trying to troubleshoot the bridge based scope, I removed a port from bridge, assigned it address and created scope for that port directly, but that does not come out invalid. I have read few posts and also wiki and I am really confused as to the reason of all these failures.

The ip address on ether9 is not overlapping any other subnet / interface address.

Any pointers will be appreciated. Thanks

Re: DHCP on physical interface comes out invalid using Wizard

Posted: Sun Oct 18, 2020 10:10 pm
by mkx
Post configuration as output running /export hide-sensitive from command line. It's hard to guess what's exact running config you've got.

Re: DHCP on physical interface comes out invalid using Wizard

Posted: Mon Oct 19, 2020 2:02 am
by dpsguard
Hi mkx,

Thanks. Here is the relevant configuration. The scope on vlan works. The one on ether9 complains.

/interface bridge
add name=bridge1 protocol-mode=none vlan-filtering=yes

/interface bridge port

add bridge=bridge1 ingress-filtering=yes interface=ether2 pvid=120
add bridge=bridge1 ingress-filtering=yes interface=ether3 pvid=120
add bridge=bridge1 ingress-filtering=yes interface=ether4 pvid=120
add bridge=bridge1 ingress-filtering=yes interface=ether5 pvid=120
add bridge=bridge1 ingress-filtering=yes interface=ether6 pvid=1
add bridge=bridge1 ingress-filtering=yes interface=ether7 pvid=1
add bridge=bridge1 ingress-filtering=yes interface=ether8 pvid=1

/interface vlan
add interface=bridge1 name=Guest vlan-id=120

/interface list
add name=WAN
add name=LAN

/ip pool
add name=Guest ranges=
add name=Guest2 ranges=

/ip dhcp-server
add address-pool=Guest disabled=no interface=Guest name=Guest
add address-pool=Guest2 disabled=no interface=ether9 name=Guest2

/ip address
add address= interface=bridge1 network=
add address= interface=Guest network=
add address= interface=ether9 network=

/ip dhcp-client
add disabled=no interface=ether1

/ip dhcp-server network
add address= dns-server= gateway= netmask=23
add address= dns-server= gateway= netmask=24

/ip dns
set servers=,

Re: DHCP on physical interface comes out invalid using Wizard

Posted: Mon Oct 19, 2020 9:09 am
by mkx
I can't see anything wrong in your config. Except for netmask=xx attribute of /ip dhcp-server network, default value is empty (set to 0) and instructs ROS to take netmask from address.

I'd go for a good power-cycle of the unit. If it doesn't get any better, then export configuration, do a factory reset and re-apply configuration. Sometimes some remnants of previous config stay somewhere but it's not seen in configuration export. Factory reset clears that ...

Re: DHCP on physical interface comes out invalid using Wizard

Posted: Mon Oct 19, 2020 3:30 pm
by dpsguard
Thanks you mkx. I was playing with netmask on the dhcp server config and I had tried changing the mask from the default 0 to no avail. I have done reboot few times, but I will sure try you recommendation to do a factory reset and then import the config back in.

So you do confirm that dhcp scope off of a physical interface is supported? This way, I wanted to plug my laptop directly in to ether9 and see if I can get an ip address.

I will probably test in few hours and report back.

Appreciate again your help with this.

Re: DHCP on physical interface comes out invalid using Wizard  [SOLVED]

Posted: Mon Oct 19, 2020 3:43 pm
by mkx
DHCP server can definitely run off a physical interface. It can run off a VLAN interface and probably some other types as well.

Re: DHCP on physical interface comes out invalid using Wizard

Posted: Mon Oct 19, 2020 6:28 pm
by tdw
Do you have anything plugged in to ether9?

If a DHCP server is bound to an interface in the non-running state it appears in red in Winbox / with an invalid flag in /ip dhcp-server print even though it isn't. Physical and some logical interfaces (e.g. VPN tunnels) follow the state of the underlying connection, but many logical and virtual interfaces are always in the running state

Re: DHCP on physical interface comes out invalid using Wizard

Posted: Tue Nov 03, 2020 3:17 am
by dpsguard
@mkx, the router was at a friend's place and I could not go there to test again as they had an elderly person come in to live for 10 days and under current situations, I did not want to visit unless I really needed to.

So I followed your advice and did a factory reset and did some basic config and I could confirm that DHCP scope on the physical interface works, as well as on a bridge of multiple ports, or bridge with vlan interfaces and any individual port set into that vlan with pvid ot that vlan. So dhcp scopes work fine.

@tdw, thanks for chiming in. Yes I had ether9 operational. But as mkx had indicated, there must have been something, probably under bridge set up where I may have same vlan tagged under bridge as well as on physical interface or something like that. I don't now recall and set up simple to confirm that DHCP invalid will happen if address is not assigned or a wrong interface is chosen udner dhcp server or if networks section has issues under dhcp server. I am now on to make multiple VLAN interfaces under a single physical port (not under bridge), trying to have a common dhcp pool that will give out addresses under these multitude of VLANs from this common dhcp pool. There are many posts here on forum, but not a complete example for an end to end solution.

Thanks again @mkx for your great help.