DHCP don't works

Hi,

We cannot find why the DHCP would works
In the LAN are the PC’s not able the get the IP from the DHCP server.
For the Wlan works the DHCP releasing correct.


What going wrong here?
What we should correct in the script?

btw: this is the intial script of the Mikrotik RB2011UAS-2HnD
The installed version is 6.10

The following packages are installed:

  • Advanced-tools
  • DHCP
  • Hotspot
  • LCD
  • NTP
    - Security
  • System
  • User-Manager
  • Wireless




    See Script and picture:
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN
set [ find default-name=sfp1 ] disabled=yes
/interface wireless
set [ find default-name=wlan1 ] l2mtu=2290
/ip neighbor discovery
set ether1 comment=WAN
set ether2 comment=LAN
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
    mac-cookie-timeout=3d
/ip pool
add name=DHCPpool ranges=192.168.90.100-192.168.90.150
/ip dhcp-server
add add-arp=yes address-pool=DHCPpool disabled=no interface=ether2 name=server1
/port
set 0 name=serial0
/ip address
add address=192.168.0.100/32 comment="To internet" interface=ether1 network=\
    192.168.0.100
add address=192.168.90.1/24 comment="To LAN" interface=ether2 network=\
    192.168.90.0
/ip dhcp-server lease
add address=192.168.90.150 client-id=1:0:e:8:d3:a2:21 mac-address=\
    00:0E:08:D3:A2:21 server=server1
/ip dhcp-server network
add address=192.168.90.0/24 dns-server=8.8.8.8 gateway=192.168.90.1 netmask=24
/ip upnp
set allow-disable-external-interface=no
/lcd interface
set sfp1 interface=sfp1
set ether1 interface=ether1
set ether2 interface=ether2
set ether3 interface=ether3
set ether4 interface=ether4
set ether5 interface=ether5
set ether6 interface=ether6
set ether7 interface=ether7
set ether8 interface=ether8
set ether9 interface=ether9
set ether10 interface=ether10
set wlan1 interface=wlan1
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set wlan1 disabled=yes display-time=5s
set sfp1 disabled=yes display-time=5s
set ether1 disabled=yes display-time=5s
set ether2 disabled=yes display-time=5s
set ether3 disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s
set ether6 disabled=yes display-time=5s
set ether7 disabled=yes display-time=5s
set ether8 disabled=yes display-time=5s
set ether9 disabled=yes display-time=5s
set ether10 disabled=yes display-time=5s
/system routerboard settings
set boot-delay=5s

mikrotik.png

Post your full export. Is there a bridge setup?

Hi,

There is no bridge and this is the full initial script of Mikrotik router

There needs to be a bridge. Add a bridge, add wlan1 and eth2 to it… then put the DHCP server on the bridge.

We had i to the bridge, but we having the same issue.

See picture and script

/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN
set [ find default-name=sfp1 ] disabled=yes
/interface bridge
add l2mtu=1598 name=bridge1
/interface wireless
set [ find default-name=wlan1 ] l2mtu=2290
/ip neighbor discovery
set ether1 comment=WAN
set ether2 comment=LAN
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
    mac-cookie-timeout=3d
/ip pool
add name=DHCPpool ranges=192.168.90.100-192.168.90.150
/ip dhcp-server
add add-arp=yes address-pool=DHCPpool disabled=no interface=bridge1 name=\
    server1
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=wlan1
/ip address
add address=192.168.0.100/32 comment="To internet" interface=ether1 network=\
    192.168.0.100
add address=192.168.90.1/24 comment="To LAN" interface=bridge1 network=\
    192.168.90.0
/ip dhcp-server lease
add address=192.168.90.150 client-id=1:0:e:8:d3:a2:21 mac-address=\
    00:0E:08:D3:A2:21 server=server1
/ip dhcp-server network
add address=192.168.90.0/24 dns-server=8.8.8.8 gateway=192.168.90.1 netmask=\
    24
/ip service
set "" disabled=no port=22
/ip upnp
set allow-disable-external-interface=no
/lcd interface
set sfp1 interface=sfp1
set ether1 interface=ether1
set ether2 interface=ether2
set ether3 interface=ether3
set ether4 interface=ether4
set ether5 interface=ether5
set ether6 interface=ether6
set ether7 interface=ether7
set ether8 interface=ether8
set ether9 interface=ether9
set ether10 interface=ether10
add interface=bridge1
set wlan1 interface=wlan1
/lcd interface pages
add interfaces="sfp1,ether1,ether2,ether3,ether4,ether5,ether6,ether7,ether8,e\
    ther9,ether10,bridge1"
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set bridge1 disabled=yes display-time=5s
set wlan1 disabled=yes display-time=5s
set sfp1 disabled=yes display-time=5s
set ether1 disabled=yes display-time=5s
set ether2 disabled=yes display-time=5s
set ether3 disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s
set ether6 disabled=yes display-time=5s
set ether7 disabled=yes display-time=5s
set ether8 disabled=yes display-time=5s
set ether9 disabled=yes display-time=5s
set ether10 disabled=yes display-time=5s
/system routerboard settings
set boot-delay=5s

mikrotik001.png

I’m not familiar with the 2011, but the default configuration shows the ethernet ports on a switch. You should post “/interface ethernet” to determine if or how they are switched.

Hi,

For us they are correct switched.

You don’t need to post the images. The export is sufficient. You are posting the whole export? e.g. “/export” ?.. I’m not seeing anything obviously wrong.

So ether2 to ether10 are all on the same switch with ether2 as the master? The default configuration shows there should be two switch groups.
http://wiki.mikrotik.com/wiki/Manual:Default_Configurations

If the dhcp server is not working on the ethernet interfaces, something must be wrong.

I don’t think you can actually set them all to the same switch group on the 2011. It has two switch chips. One for the GigE ports and one for the FastE ports. The default config has 2 to 5 in one group and 6 to 10 in another and bridges the two master ports together.

Thanks, efaden! Then considering that, the ether6 to ether10 switch does not have a dhcp server.

Yeah. That’s a valid point.

Sent from my SCH-I545 using Tapatalk

Then put ether6 to the bridge and set it as master port for 7-10

That was my point! :smiley:

We cannot understand why it is so difficult to add a DHCP on the RB2011.
Who can help me?

Please send me a modified script

The pictures are worthless. I can’t read anything on them.

The export shows you have a dhcp server on bridge1 (ether2 to ether5 and wlan1). I see no indication there is one on ether6 to ether10. Do your computers on ether2-5 get an ip?

This is considering that ether2 to ether5 are still switched with ether 2 as the master port, and ether6 to ether10 are switched with ether6 as the master port.

You need to add ether6 to bridge1 if you want them all on one localnet. Otherwise assign another ip/subnet to ether6 and set up a dhcp server on ether6.

hi,

My PC’s don’t get an IP on ether2-5?
When we look in the leases of the DHCP, we see that the DHCP will try (offering) giving a correct IP to the PC.
After 30 sec he try again and again.

ps: we using only the ethernet ports 2 and 3.

This we find in the log file:

21:08:04 dhcp,debug,packet dhcp_server_lan_sw1 received discover with id 1550153034 from 0.0.0.0
21:08:04 dhcp,debug,packet ciaddr = 0.0.0.0
21:08:04 dhcp,debug,packet chaddr = 00:0E:08:D3:A2:21
21:08:04 dhcp,debug,packet Msg-Type = discover
21:08:04 dhcp,debug,packet Client-Id = 01-00-0E-08-D3-A2-21
21:08:04 dhcp,debug,packet Address-Request = 192.168.88.101
21:08:04 dhcp,debug,packet Host-Name = “SipuraSPA”
21:08:04 dhcp,debug,packet Class-Id = “LINKSYS SPA-922”
21:08:04 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,NTP-Server,Domain-Server,Unknown(7),Domain-Name,Renewal-Time,Unkno
wn(59),NETBIOS-Name-Server,Unknown(66),Unknown(150),Unknown(2),Unknown(151)
21:08:04 dhcp,debug,packet dhcp_server_lan_sw1 sending offer with id 1550153034 to 192.168.88.101
21:08:04 dhcp,debug,packet ciaddr = 0.0.0.0
21:08:04 dhcp,debug,packet yiaddr = 192.168.88.101
21:08:04 dhcp,debug,packet siaddr = 192.168.88.1
21:08:04 dhcp,debug,packet chaddr = 00:0E:08:D3:A2:21
21:08:04 dhcp,debug,packet Msg-Type = offer
21:08:04 dhcp,debug,packet Server-Id = 192.168.88.1
21:08:04 dhcp,debug,packet Address-Time = 259200
21:08:04 dhcp,debug,packet Subnet-Mask = 255.255.255.0
21:08:04 dhcp,debug,packet Router = 192.168.88.1
21:08:04 dhcp,debug,packet NTP-Server = 91.207.136.55
21:08:04 dhcp,debug,packet Domain-Server = 192.168.88.1,8.8.8.8,195.130.130.3
21:08:07 dhcp,debug,packet dhcp_server_lan_sw1 received discover with id 1550153034 from 0.0.0.0
21:08:07 dhcp,debug,packet secs = 3
21:08:07 dhcp,debug,packet ciaddr = 0.0.0.0
21:08:07 dhcp,debug,packet chaddr = 00:0E:08:D3:A2:21
21:08:07 dhcp,debug,packet Msg-Type = discover
21:08:07 dhcp,debug,packet Client-Id = 01-00-0E-08-D3-A2-21
21:08:07 dhcp,debug,packet Address-Request = 192.168.88.101
21:08:07 dhcp,debug,packet Host-Name = “SipuraSPA”
21:08:07 dhcp,debug,packet Class-Id = “LINKSYS SPA-922”
21:08:07 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,NTP-Server,Domain-Server,Unknown(7),Domain-Name,Renewal-Time,Unkno
wn(59),NETBIOS-Name-Server,Unknown(66),Unknown(150),Unknown(2),Unknown(151)
21:08:07 dhcp,debug,packet dhcp_server_lan_sw1 sending offer with id 1550153034 to 192.168.88.101
21:08:07 dhcp,debug,packet ciaddr = 0.0.0.0
21:08:07 dhcp,debug,packet yiaddr = 192.168.88.101
21:08:07 dhcp,debug,packet siaddr = 192.168.88.1
21:08:07 dhcp,debug,packet chaddr = 00:0E:08:D3:A2:21
21:08:07 dhcp,debug,packet Msg-Type = offer
21:08:07 dhcp,debug,packet Server-Id = 192.168.88.1
21:08:07 dhcp,debug,packet Address-Time = 259200
21:08:07 dhcp,debug,packet Subnet-Mask = 255.255.255.0
21:08:07 dhcp,debug,packet Router = 192.168.88.1
21:08:07 dhcp,debug,packet NTP-Server = 91.207.136.55
21:08:07 dhcp,debug,packet Domain-Server = 192.168.88.1,8.8.8.8,195.130.130.3
21:08:15 dhcp,debug,packet dhcp_server_lan_sw1 received discover with id 1550153034 from 0.0.0.0
21:08:15 dhcp,debug,packet secs = 10
21:08:15 dhcp,debug,packet ciaddr = 0.0.0.0
21:08:15 dhcp,debug,packet chaddr = 00:0E:08:D3:A2:21
21:08:15 dhcp,debug,packet Msg-Type = discover
21:08:15 dhcp,debug,packet Client-Id = 01-00-0E-08-D3-A2-21
21:08:15 dhcp,debug,packet Address-Request = 192.168.88.101
21:08:15 dhcp,debug,packet Host-Name = “SipuraSPA”
21:08:15 dhcp,debug,packet Class-Id = “LINKSYS SPA-922”
21:08:15 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,NTP-Server,Domain-Server,Unknown(7),Domain-Name,Renewal-Time,Unkno
wn(59),NETBIOS-Name-Server,Unknown(66),Unknown(150),Unknown(2),Unknown(151)
21:08:15 dhcp,debug,packet dhcp_server_lan_sw1 sending offer with id 1550153034 to 255.255.255.255
21:08:15 dhcp,debug,packet ciaddr = 0.0.0.0
21:08:15 dhcp,debug,packet yiaddr = 192.168.88.101
21:08:15 dhcp,debug,packet siaddr = 192.168.88.1
21:08:15 dhcp,debug,packet chaddr = 00:0E:08:D3:A2:21
21:08:15 dhcp,debug,packet Msg-Type = offer
21:08:15 dhcp,debug,packet Server-Id = 192.168.88.1
21:08:15 dhcp,debug,packet Address-Time = 259200
21:08:15 dhcp,debug,packet Subnet-Mask = 255.255.255.0
21:08:15 dhcp,debug,packet Router = 192.168.88.1
21:08:15 dhcp,debug,packet NTP-Server = 91.207.136.55
21:08:15 dhcp,debug,packet Domain-Server = 192.168.88.1,8.8.8.8,195.130.130.3

Now, since I don’t understand which is your current config, let’s talk about the first one (the picture does not show that one, but one with a bridge).

Your DHCP server works ONLY on interface eth2, as configured..
So, to get is working on all LAN ports, you need to configure ALL your LAN interfaces to use interface ether2 as master (do this under interfaces, double click each ether from 3 to whatever you need, go to the general tab and set Master Port to ether2).
Or do it by CLI:

/interface ethernet
set ether3 master-port=ether2
set ether4 master-port=ether2
set ether5 master-port=ether2
...

In your export there’s nothing doing this…

Where is 192.168.88.1/24 assigned? Is there a dhcp server issuing those ips? All those offers are for 192.168.88.101.

:laughing: That’s another good question!
If I look at export, to the pictures and to the log, it seems they are coming from 3 different routers.