RouterOS ignores DHCP offer

Hi, I have the following setup:

=====> ADSL Modem ====> Linksys Router ====> LAN

The ADSL modem is configured as Half-Bridge, forwarding the public IP to the Linksys router WAN interface.

I want to replate the Linksys router with a RouterOS box, but for some reason it ignores the DHCP offer from the DSL modem.

I have captured the traffic between ADSL modem and the routers and mikrotik.

This capture is from Linksys:

No.     Time        Source                Destination           Protocol Info
    189 43.818604   0.0.0.0               255.255.255.255       DHCP     DHCP Discover - Transaction ID 0x307da006

Frame 189 (590 bytes on wire, 590 bytes captured)
Ethernet II, Src: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x307da006
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Discover
    Option: (t=61,l=7) Client identifier
    Option: (t=12,l=7) Host Name = "WRT54GS"
    Option: (t=60,l=12) Vendor class identifier = "udhcp 1.14.4"
    Option: (t=57,l=2) Maximum DHCP Message Size = 576
    Option: (t=55,l=7) Parameter Request List
    End Option
    Padding

No.     Time        Source                Destination           Protocol Info
    194 45.820354   0.0.0.0               XXX.XXX.XXX.XXX        DHCP     DHCP Offer    - Transaction ID 0x307da006

Frame 194 (320 bytes on wire, 320 bytes captured)
Ethernet II, Src: Comtrend_XX:XX:XX (00:30:da:XX:XX:XX), Dst: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Bootstrap Protocol
    Message type: Boot Reply (2)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x307da006
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Offer
    Option: (t=54,l=4) DHCP Server Identifier = 0.0.0.0
    Option: (t=51,l=4) IP Address Lease Time = 30 seconds
    Option: (t=1,l=4) Subnet Mask = 255.255.255.252
    Option: (t=3,l=4) Router = XXX.XXX.XXX.XXX
    Option: (t=6,l=8) Domain Name Server
    End Option

No.     Time        Source                Destination           Protocol Info
    195 45.821958   0.0.0.0               255.255.255.255       DHCP     DHCP Request  - Transaction ID 0x307da006

Frame 195 (590 bytes on wire, 590 bytes captured)
Ethernet II, Src: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x307da006
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Request
    Option: (t=61,l=7) Client identifier
    Option: (t=12,l=7) Host Name = "WRT54GS"
    Option: (t=60,l=12) Vendor class identifier = "udhcp 1.14.4"
    Option: (t=50,l=4) Requested IP Address = XXX.XXX.XXX.XXX
    Option: (t=54,l=4) DHCP Server Identifier = 0.0.0.0
    Option: (t=55,l=7) Parameter Request List
    End Option
    Padding

No.     Time        Source                Destination           Protocol Info
    196 45.823468   0.0.0.0               XXX.XXX.XXX.XXX        DHCP     DHCP ACK      - Transaction ID 0x307da006

Frame 196 (320 bytes on wire, 320 bytes captured)
Ethernet II, Src: Comtrend_XX:XX:XX (00:30:da:XX:XX:XX), Dst: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Bootstrap Protocol
    Message type: Boot Reply (2)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x307da006
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Cisco-Li_XX:XX:XX (00:14:bf:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP ACK
    Option: (t=54,l=4) DHCP Server Identifier = 0.0.0.0
    Option: (t=51,l=4) IP Address Lease Time = 30 seconds
    Option: (t=1,l=4) Subnet Mask = 255.255.255.252
    Option: (t=3,l=4) Router = XXX.XXX.XXX.XXX
    Option: (t=6,l=8) Domain Name Server
    End Option

This capture if from RouterOS:

No.     Time        Source                Destination           Protocol Info
      6 0.577866    0.0.0.0               255.255.255.255       DHCP     DHCP Discover - Transaction ID 0x9b05bfa5

Frame 6 (342 bytes on wire, 342 bytes captured)
Ethernet II, Src: Routerbo_XX:XX:XX (00:0c:42:XX:XX:XX), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x9b05bfa5
    Seconds elapsed: 55
    Bootp flags: 0x8000 (Broadcast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Routerbo_XX:XX:XX (00:0c:42:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Discover
    Option: (t=61,l=7) Client identifier
    Option: (t=55,l=6) Parameter Request List
    Option: (t=12,l=8) Host Name = "MikroTik"
    End Option
    Padding

No.     Time        Source                Destination           Protocol Info
      7 0.579170    0.0.0.0               255.255.255.255       DHCP     DHCP Offer    - Transaction ID 0x9b05bfa5

Frame 7 (316 bytes on wire, 316 bytes captured)
Ethernet II, Src: Comtrend_XX:XX:XX (00:30:da:XX:XX:XX), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Bootstrap Protocol
    Message type: Boot Reply (2)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x9b05bfa5
    Seconds elapsed: 0
    Bootp flags: 0x8000 (Broadcast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 192.168.1.2 (192.168.1.2)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Routerbo_XX:XX:XX (00:0c:42:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Offer
    Option: (t=54,l=4) DHCP Server Identifier = 0.0.0.0
    Option: (t=51,l=4) IP Address Lease Time = 10 seconds
    Option: (t=1,l=4) Subnet Mask = 255.255.255.0
    Option: (t=3,l=4) Router = 192.168.1.1
    Option: (t=6,l=4) Domain Name Server = 192.168.1.1
    End Option

Frame 9 (342 bytes on wire, 342 bytes captured)
Ethernet II, Src: Routerbo_XX:XX:XX (00:0c:42:XX:XX:XX), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x9b05bfa5
    Seconds elapsed: 57
    Bootp flags: 0x8000 (Broadcast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Routerbo_XX:XX:XX (00:0c:42:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Discover
    Option: (t=61,l=7) Client identifier
    Option: (t=55,l=6) Parameter Request List
    Option: (t=12,l=8) Host Name = "MikroTik"
    End Option
    Padding

No.     Time        Source                Destination           Protocol Info
     10 2.618902    0.0.0.0               255.255.255.255       DHCP     DHCP Offer    - Transaction ID 0x9b05bfa5

Frame 10 (316 bytes on wire, 316 bytes captured)
Ethernet II, Src: Comtrend_XX:XX:XX (00:30:da:XX:XX:XX), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Bootstrap Protocol
    Message type: Boot Reply (2)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x9b05bfa5
    Seconds elapsed: 0
    Bootp flags: 0x8000 (Broadcast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 192.168.1.2 (192.168.1.2)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Routerbo_XX:XX:XX (00:0c:42:XX:XX:XX)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option: (t=53,l=1) DHCP Message Type = DHCP Offer
    Option: (t=54,l=4) DHCP Server Identifier = 0.0.0.0
    Option: (t=51,l=4) IP Address Lease Time = 10 seconds
    Option: (t=1,l=4) Subnet Mask = 255.255.255.0
    Option: (t=3,l=4) Router = 192.168.1.1
    Option: (t=6,l=4) Domain Name Server = 192.168.1.1
    End Option

The diference between them is that Mikrotik sets the broadcast flag, so the server sends the offer to FF:FF:FF:FF:FF:FF but RouterOS ignores it.

Please help! :slight_smile:

I have just had a similar problem with the MikroTik router ignoring a DHCP request from a bridged device on the LAN side. The device was a WaveRider CCU in switched mode which needed to use DHCP Relay to forward DHCP traffic to the MikroTik. The MikroTik needed to have the IP address of the CCU entered as an accepted relay.

I am not sure what you would use as a relay address for the ADSL Modem but I recall that the MikroTik allowed the use of 255.255.255.255 as the relay address. This means that it should accept DHCP Relay from ANY relay device.

I can’t be sure that this will help, but it should only take a few minutes to check.

EDIT: I have to learn to read more carefully, you are using DHCP Client, I was using DHCP Server.