Community discussions

MikroTik App
 
dpsguard
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Sun Apr 26, 2020 12:50 am

DHCP on physical interface comes out invalid using Wizard

Sun Oct 18, 2020 8:52 pm

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
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: DHCP on physical interface comes out invalid using Wizard

Sun Oct 18, 2020 10:10 pm

Post configuration as output running /export hide-sensitive from command line. It's hard to guess what's exact running config you've got.
 
dpsguard
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Sun Apr 26, 2020 12:50 am

Re: DHCP on physical interface comes out invalid using Wizard

Mon Oct 19, 2020 2:02 am

Hi mkx,

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

Thanks
/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=10.10.120.2-10.10.121.254
add name=Guest2 ranges=10.10.150.2-10.10.150.254

/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=10.10.10.1/24 interface=bridge1 network=10.10.10.0
add address=10.10.120.1/23 interface=Guest network=10.10.120.0
add address=10.10.150.1/24 interface=ether9 network=10.10.150.0

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

/ip dhcp-server network
add address=10.10.120.0/23 dns-server=10.10.120.1 gateway=10.10.120.1 netmask=23
add address=10.10.150.0/24 dns-server=10.10.150.1 gateway=10.10.150.1 netmask=24

/ip dns
set servers=8.8.8.8,1.1.1.1

 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: DHCP on physical interface comes out invalid using Wizard

Mon Oct 19, 2020 9:09 am

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 ...
 
dpsguard
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Sun Apr 26, 2020 12:50 am

Re: DHCP on physical interface comes out invalid using Wizard

Mon Oct 19, 2020 3:30 pm

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.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

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

Mon Oct 19, 2020 3:43 pm

DHCP server can definitely run off a physical interface. It can run off a VLAN interface and probably some other types as well.
 
tdw
Forum Guru
Forum Guru
Posts: 1855
Joined: Sat May 05, 2018 11:55 am

Re: DHCP on physical interface comes out invalid using Wizard

Mon Oct 19, 2020 6:28 pm

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
 
dpsguard
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Sun Apr 26, 2020 12:50 am

Re: DHCP on physical interface comes out invalid using Wizard

Tue Nov 03, 2020 3:17 am

@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.

Who is online

Users browsing this forum: Syn and 58 guests