Community discussions

MikroTik App
 
litz
just joined
Topic Author
Posts: 5
Joined: Sat Oct 09, 2021 10:05 pm

RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 5:07 pm

Seeing an issue that is slowly crippling my network:

RouterOS 7.6 on RB3011

DHCP Server is failing to assign IPs to Linux servers, and linux based hardware devices (IoT, Android phones, etc etc).

Windows servers work perfectly, no issues at all.

The issue is, client requests IP, and gets an address of 0.0.0.x

No amount of reboot, reset, clear on either DHCP server *or* client fixes the issue. Static assigned IPs do not fix the issue.

Happens with both wired and wireless (external bridge access point, utilizing router's DHCP)

The ONLY fix, so far, is to not use Mikrotik DHCP, which is by far not an acceptable or ideal solution.

Any ideas on what's going on?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 5:22 pm

Do not use 3rd party sites, this forum can handle text and files.
 
erlinden
Forum Guru
Forum Guru
Posts: 2733
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 5:56 pm

Can you please share the config of the Mikrotik (without any privacy information)?
/export file=anynameyoulike
Besides...have you already debugged DHCP on the Mikrotik (or used Wireshark to have a look why it is failing)?
 
litz
just joined
Topic Author
Posts: 5
Joined: Sat Oct 09, 2021 10:05 pm

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 6:19 pm

# oct/20/2022 09:22:47 by RouterOS 7.6
# software id = MA6F-EWD1
#
# model = RB3011UiAS
# serial number = xxxx
/interface bridge
add admin-mac=CC:2D:E0:A2:BE:23 auto-mac=no comment="Main Bridge" name=\
    "main bridge"
/interface ethernet
set [ find default-name=sfp1 ] comment="Comcastic! Internet via MB8611"
/interface bonding
add mode=balance-xor name="Switch Trunk" slaves=ether1,ether2,ether3
/interface list
add comment="Comcastic! Internet" name=WAN
add comment="Main Network" name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=main-dhcp ranges=xx.xx.xx.100-xx.xx.xx.199
/ip dhcp-server
add add-arp=yes address-pool=main-dhcp always-broadcast=yes client-mac-limit=\
    0 interface="main bridge" lease-time=1h name="Main DHCP"
/port
set 0 name=serial0
/routing bgp template
set default disabled=no output.network=bgp-networks
/routing ospf instance
add disabled=no name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/interface bridge port
add bridge="main bridge" ingress-filtering=no interface=\
    ether5
add bridge="main bridge" ingress-filtering=no \
    interface=ether9
add bridge="main bridge" ingress-filtering=no \
    interface="Switch Trunk"
add bridge="main bridge" ingress-filtering=no \
    interface=ether4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add comment="Main Network" interface="main bridge" list=LAN
add comment="Comcastic Internet!" interface=sfp1 list=WAN
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=xx.xx.xx.1/24 comment="Main DHCP" interface="main bridge" \
    network=xx.xx.xx.0
/ip dhcp-client
add comment="Comcastic Internet!" interface=sfp1
/ip dhcp-server lease
add address=xx.xx.xx.2 client-id=1:2c:c8:1b:54:66:fc mac-address=2C:C8:1B:54:66:FC server=\
    "Main DHCP"
add address=xx.xx.xx.4 client-id=1:2c:c8:1b:35:b7:63 mac-address=2C:C8:1B:35:B7:63 server="Main DHCP"
add address=xx.xx.xx.7 client-id=1:78:8c:77:e4:4:f9 mac-address=78:8C:77:E4:04:F9 server="Main DHCP"
add address=xx.xx.xx.8 client-id=1:0:11:32:2b:5f:dd mac-address=00:11:32:2B:5F:DD server="Main DHCP"
add address=xx.xx.xx.9 client-id=1:0:11:32:2e:e8:7d mac-address=00:11:32:2E:E8:7D server="Main DHCP"
add address=xx.xx.xx.10 client-id=1:54:a0:50:d1:39:98 mac-address=54:A0:50:D1:39:98 server="Main DHCP"
add address=xx.xx.xx.23 client-id=1:50:46:5d:9:b1:7 mac-address=50:46:5D:09:B1:07 server="Main DHCP"
add address=xx.xx.xx.0/24 comment="Main Network" gateway=xx.xx.xx.1 netmask=\
    24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall address-list
add address=xx.xx.xx.1-xx.xx.xx.255 list="Main Network"
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" \
    connection-state=established,related,untracked
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="accept ICMP" in-interface-list=LAN \
    protocol=icmp
add action=accept chain=input comment=\
    "accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment=fasttrack \
    connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
    "accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="drop invalid" connection-state=invalid
add action=drop chain=forward comment="drop all from WAN not DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="Comcast WAN: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
/lcd
set default-screen=stat-slideshow
/system clock
set time-zone-name=America/New_York
/system identity
set name="MikroTik RB 3011UiAS"
/system ntp client
set enabled=yes
/system ntp server
set enabled=yes
/system ntp client servers
add address=129.6.15.26
add address=132.163.97.6
add address=132.163.96.6
add address=128.138.141.172
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
 
litz
just joined
Topic Author
Posts: 5
Joined: Sat Oct 09, 2021 10:05 pm

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 6:22 pm

I've attempted to debug as best I can, but I've not seen anything amiss.

As noted above, this *only* happens on Linux based devices. Currently affecting several IoT devices (e.g. smart clock, Ecobee, etc), a Microtik CSS switch, and Android phones.

It does NOT affect any Windows PCs.

There are no "foreign" DHCP servers on the network that could be intercepting requests, either.
 
biomesh
Long time Member
Long time Member
Posts: 574
Joined: Fri Feb 10, 2012 8:25 pm

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 6:37 pm

How about removing

client-mac-limit=0

from your dhcp server.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 6:39 pm

What is this???
/ip dhcp-server lease
add address=xx.xx.xx.2 client-id=1:2c:c8:1b:54:66:fc mac-address=2C:C8:1B:54:66:FC server=\
"Main DHCP"
add address=xx.xx.xx.4 client-id=1:2c:c8:1b:35:b7:63 mac-address=2C:C8:1B:35:B7:63 server="Main DHCP"
add address=xx.xx.xx.7 client-id=1:78:8c:77:e4:4:f9 mac-address=78:8C:77:E4:04:F9 server="Main DHCP"
add address=xx.xx.xx.8 client-id=1:0:11:32:2b:5f:dd mac-address=00:11:32:2B:5F:DD server="Main DHCP"
add address=xx.xx.xx.9 client-id=1:0:11:32:2e:e8:7d mac-address=00:11:32:2E:E8:7D server="Main DHCP"
add address=xx.xx.xx.10 client-id=1:54:a0:50:d1:39:98 mac-address=54:A0:50:D1:39:98 server="Main DHCP"
add address=xx.xx.xx.23 client-id=1:50:46:5d:9:b1:7 mac-address=50:46:5D:09:B1:07 server="Main DHCP"
add address=xx.xx.xx.0/24 comment="Main Network" gateway=xx.xx.xx.1 netmask=\
24

/ip dns

You cut too much...


And also why censore internal IPs?
Can be wrong and can not be checked on this way.
You have all Public IPs for internal network?

Paste this on terminal
/ip dhcp-server
set [find] always-broadcast=no client-mac-limit=""
 
litz
just joined
Topic Author
Posts: 5
Joined: Sat Oct 09, 2021 10:05 pm

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 6:56 pm

Just assume xx.xx.xx is 192.168.0 ... or 10.10.10 ... it's just the subnet being served. The #s bear no relevence.
 
litz
just joined
Topic Author
Posts: 5
Joined: Sat Oct 09, 2021 10:05 pm

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Thu Oct 20, 2022 7:37 pm

This:

/ip dhcp-server
set [find] always-broadcast=no client-mac-limit=""

did not fix the issue. It is still failing to assign addresses to linux based clients.

e.g., on my Pixel phone, it's assigning it 0.0.0.98. I know it's connecting because it's receiving Subnet Mask/DNS information from DHCP. Just not an IP.

(the devices also appear in ARP with 0.0.0 addresses)

e.g.

IP Address MAC Address Interface Bridge Port Host Name
- DC 0.0.0.98 D4:3A:2C:94:C3:0E main bridge
- DC 0.0.0.110 86:A7:74:8E:76:4D main bridge
- D 0.0.0.111 26:27:2D:1B:7E:A3 main bridge
- DC 0.0.0.112 02:0F:B5:DD:A4:8C main bridge
- DC 0.0.0.117 02:0F:B5:D1:A8:4D main bridge

Also, I *know* the DHCP server is seeing the client, because if the client is set up as a static lease, DHCP server is showing a "last seen" value (in addition to the ARP entry)
 
erlinden
Forum Guru
Forum Guru
Posts: 2733
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: RB3011 DHCP server fails to assign IPs to many Linux devices

Sat Oct 22, 2022 10:53 am

Can you start with a DHCP server using default settings (just remove the current and add a new one)?