1 computer on LAN can't connect to router/internet

I have almost finished configuring our RB2011UiAS for 2 WAN PCC load balancing and NAT hair-pinning. The last thing I have done is enable the DHCP server and disable the DHCP server on the previous router we were using. All of the devices on our LAN have been able to connect except one, a Macbook Pro running 10.9.5. This machine gets an IP from the server, but it can’t connect to the internet. The logs in the RB2011 show the following:

17:52:59 dhcp,info DHCP assigned 10.0.2.82 to 90:FD:61:EC:D5:BE
17:55:28 dhcp,info DHCP deassigned 10.0.2.82 from 90:FD:61:EC:D5:BE

The first line is when I connected, and the last line I think is when I disconnected. However during the time I was connected I did not have an internet connection and I could not ping the RB2011 from a terminal.

I see some people have had similar issues here: http://forum.mikrotik.com/t/apple-devices-wont-connect/87675/1
I tried changing the Authoritative setting to “yes” but this did not change anything. The access point is an Airport Extreme Base station, and as far as I can tell TKIP is not enabled.

What could the problem be here? How can I get this Macbook Pro online?

So I have changed the Macbook Pro to have a static IP that connects to the old router on the same subnet. This works fine, but when I change it back to DHCP it gets an IP from the RB2011 but there is no connection to the internet.

I could really do with getting this device online - does anyone have any ideas what it could be?

I just tried to connect via ethernet cable to our switch and the Macbook Pro has the same problem, so it’s nothing to do with our Access Point.

I then just tried logging in to the router and removing the DHCP lease assigned to the computer. The computer now has an internet connection! However, it still has the same IP address as before (10.0.2.82) but this is not reported in the DHCP lease table, so I am cautious as to whether this is actually fixed or not.

The issue has returned unfortunately. The same Macbook Pro which couldn’t connect before had been working fine until this morning. Once again I removed the DHCP lease via the Webfig interface and it was back online, again with the same IP address. I really need to fix this, as I am not always around to remove the DHCP lease, and obviously I shouldn’t have to.

Can anyone help with this?

Can you ping gateway ( Mikrotik’s LAN interface) from that MacBook while internet is not working?
Is " Add arp for leases" enabled?
Whats your lease time? According to log, address was used for 2min 29s.

I think some Apple products may have some option for “DHCP security” or whatever.
I switched a DHCP/NAT network to a MikroTik router today and I have seen the same thing: there is one computer
that refuses to accept the lease from the MikroTIk, which has the same IP as the previous router.
I think the computer stores identity information about the DHCP server (like its MAC address or unique ID) and
detects that this has changed, and presumably it detects this as an attempt to spoof.
I have no idea if this is really true and if this is an option somewhere. Hundreds of other systems just migrated
without effort (asking for their previous IP address and getting that assigned from the MikroTik), only one is failing.
It looks like it just ignores the offer. I see it making a DHCP request, it gets a DHCP offer, and then nothing.
After 10 seconds the MikroTik removes the entry from the visible leases table, but of course the MAC/IP pair is
remembered and the next time the device tries it, the same IP is offered and ignored. Strange, but could be the above.

I had a similar issue a number of years ago with some mac devices. I found a solution was to copy the mac address and put it in the DHCP client id option under dhcp and the apple device would get an IP instantly. may be worth a try.

In the Mac? Or is this a change you made in the router?

On apple devices if you open the network settings and go to dhcp option you will find the setting.

Ok that is a bit unpractical here, it is a “guest network” that visitors use to access internet while in te office.
I expect that the problem will go away by itself when the leasetime that was offered by the previous router has
expired.

It seems there are issues with other computers on the network too. Lots of them (mostly Mac’s) can’t ping the router’s IP, although they receive an IP address. Also a PC on the network can’t access the internet. This machine has trouble with DNS servers. I am using Google’s servers (8.8.8.8 and 8.8.4.4.)

Perhaps there is something wrong with my config, although it was working for a few days last week without issue. I have posted it below.

/interface bridge
add name=bridge
/interface ethernet
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
set [ find default-name=ether4 ] name=ether04
set [ find default-name=ether5 ] name=ether05
set [ find default-name=ether6 ] name=ether06
set [ find default-name=ether7 ] name=ether07
set [ find default-name=ether8 ] name=ether08
set [ find default-name=ether9 ] name=ether09
/ip neighbor discovery
set WAN1 discover=no
set WAN2 discover=no
set WAN3 discover=no
/ip pool
add name=LAN-DHCP ranges=10.0.2.2-10.0.2.199
add name=LAN-SERVERS ranges=10.0.2.201-10.0.2.254
/ip dhcp-server
add add-arp=yes address-pool=LAN-DHCP interface=bridge lease-time=1h name=DHCP
/interface bridge port
add bridge=bridge interface=ether04
add bridge=bridge interface=ether05
add bridge=bridge interface=ether06
add bridge=bridge interface=ether07
add bridge=bridge interface=ether08
add bridge=bridge interface=ether09
add bridge=bridge interface=ether10
add bridge=bridge interface=sfp1
/ip address
add address=192.168.10.2/24 interface=WAN1 network=192.168.10.0
add address=192.168.11.2/24 interface=WAN2 network=192.168.11.0
add address=10.0.2.200/24 interface=bridge network=10.0.2.0
/ip dhcp-client
add dhcp-options=hostname,clientid interface=WAN1
add dhcp-options=hostname,clientid interface=WAN2
/ip dhcp-server network
add address=10.0.2.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=10.0.2.200 netmask=24 wins-server=10.0.2.200
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall address-list
add address=1.2.3.4 list=site-exempted-from-pcc
/ip firewall mangle
add chain=prerouting dst-address-list=site-exempted-from-pcc
add chain=prerouting dst-address=192.168.10.0/24 in-interface=bridge
add chain=prerouting dst-address=192.168.11.0/24 in-interface=bridge
add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=WAN1 new-connection-mark=WAN1_conn
add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=WAN2 new-connection-mark=WAN2_conn
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-type=!local in-interface=bridge new-connection-mark=WAN1_conn per-connection-classifier=src-address:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-type=!local in-interface=bridge new-connection-mark=WAN2_conn per-connection-classifier=src-address:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=bridge new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=bridge new-routing-mark=to_WAN2
add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat dst-address=10.0.2.249 dst-port=80 out-interface=bridge protocol=tcp src-address=10.0.2.0/24
add action=masquerade chain=srcnat dst-address=10.0.2.249 dst-port=443 out-interface=bridge protocol=tcp src-address=10.0.2.0/24
add action=dst-nat chain=dstnat dst-address=1.2.3.4 dst-port=80 protocol=tcp to-addresses=10.0.2.249
add action=dst-nat chain=dstnat dst-address=1.2.3.4 dst-port=443 protocol=tcp to-addresses=10.0.2.249
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
/ip route
add check-gateway=ping distance=1 gateway=192.168.10.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.11.1 routing-mark=to_WAN2
add distance=1 gateway=192.168.10.1
add check-gateway=ping distance=1 gateway=WAN1
add check-gateway=ping distance=1 gateway=192.168.10.1
add check-gateway=ping distance=2 gateway=WAN2
add distance=2 gateway=192.168.11.1
add check-gateway=ping distance=2 gateway=192.168.11.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www address=10.0.2.0/24
set ssh port=1234
set www-ssl address=10.0.2.0/24 disabled=no
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/London
/system console
set [ find ] disabled=yes
/system routerboard settings
set protected-routerboot=disabled
/tool graphing interface
add interface=WAN1
add interface=WAN2

Also, some further testing on the original Mac that had trouble:

I do get an IP address, but I cannot ping the Mikrotik router at 10.0.2.200. However, when I click ‘renew DHCP lease’ in Network Preferences on the Mac, the router responds to the ping command still running in the terminal. I get the same IP address, then I can’t ping the router again.

Did you try the above solution posted by dgnevans?

Yes I tried entering the MAC address of the client computer but it didn’t work. Also, I can’t realistically expect guests to know how to do this.

is it possible to setup a computer on your network or another devices as a temporary dhcp server to ensure the router is not at fault. If the temp dhcp server works. Try removing and reconfiguring the dhcp on the router again.

This situation sounds eerily similar to some behaviors we saw back when iPhones first came to be EVERY-FREAKING-WHERE.

I don’t recall the exact symptoms, and there was a hotspot involved… I do remember seeing the error message about lease offered unsuccessfully…

Anyway, Apple devices would have issues getting DHCP where others wouldn’t. I seem to recall that we eventually discovered that the Hotspot needed to allow connections for CRL checks that Apple was doing against our GoDaddy-issued hotspot certificate. To this day, I don’t know why it manifested itself as refusal to obtain a lease… and I don’t know if various updates along the way on both Mikrotik’s side and on Apple’s side just happened to make the DHCP thing go away right around the time we figured out to whitelist GoDaddy’s CRL addresses in the IP Walled Garden…

I have changed the DHCP server to authoritative=yes instead of “after 2 second delay” and the one Apple device
that would not get a lease now works OK.
I don’t know, however, if the changes has made it work or if it has started to work due to expiry of the lease it got
from the previous router.
So you could try this as well and see if there is a difference…

So I tried disabling the DHCP server and setting a manual address on my Macbook, however I was having trouble pinging the router and getting an internet connection. The router itself appears to be fine and I can ping the internet from the router via Winbox.

I tried changing the routers response to ICMP packets as mentioned in this post here:

https://aacable.wordpress.com/2011/12/07/mikrotik-howto-give-ping-icmp-high-priority/

after which I could then ping the router from my Macbook. But still no internet connection!

I then unplugged the router from the switch and plugged it into a different switch socket (it’s a Netgear JGS524 unmanaged switch) and the Internet connection came back and everything started working fine again!

This lasted 5 minutes, and then my internet connection disappeared and I can’t ping the router any more!!

What could be going on here?

FWIW my current config looks like this (but with the DHCP server disabled via Winbox):

/interface bridge
add name=bridge
/interface ethernet
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
set [ find default-name=ether4 ] name=ether04
set [ find default-name=ether5 ] name=ether05
set [ find default-name=ether6 ] name=ether06
set [ find default-name=ether7 ] name=ether07
set [ find default-name=ether8 ] name=ether08
set [ find default-name=ether9 ] name=ether09
/ip neighbor discovery
set WAN1 discover=no
set WAN2 discover=no
set WAN3 discover=no
/ip pool
add name=LAN-DHCP ranges=10.0.2.2-10.0.2.199
add name=LAN-SERVERS ranges=10.0.2.201-10.0.2.254
/ip dhcp-server
add address-pool=LAN-DHCP interface=bridge lease-time=1h name=DHCP
/queue simple
add max-limit=128k/128k name=ICMP_Priority packet-marks=icmp-pkt
/interface bridge port
add bridge=bridge interface=ether04
add bridge=bridge interface=ether05
add bridge=bridge interface=ether06
add bridge=bridge interface=ether07
add bridge=bridge interface=ether08
add bridge=bridge interface=ether09
add bridge=bridge interface=ether10
add bridge=bridge interface=sfp1
/ip address
add address=192.168.10.2/24 interface=WAN1 network=192.168.10.0
add address=192.168.11.2/24 interface=WAN2 network=192.168.11.0
add address=10.0.2.200/24 interface=bridge network=10.0.2.0
/ip dhcp-client
add dhcp-options=hostname,clientid interface=WAN1
add dhcp-options=hostname,clientid interface=WAN2
/ip dhcp-server network
add address=10.0.2.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=10.0.2.200 netmask=24 wins-server=10.0.2.200
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall address-list
add address=1.2.3.4 list=site-exempted-from-pcc
/ip firewall mangle
add chain=prerouting dst-address-list=site-exempted-from-pcc
add chain=prerouting dst-address=192.168.10.0/24 in-interface=bridge
add chain=prerouting dst-address=192.168.11.0/24 in-interface=bridge
add action=mark-connection chain=prerouting new-connection-mark=icmp-con protocol=icmp
add action=mark-packet chain=prerouting connection-mark=icmp-con new-packet-mark=icmp-pkt passthrough=no protocol=icmp
add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=WAN1 new-connection-mark=WAN1_conn
add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=WAN2 new-connection-mark=WAN2_conn
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-type=!local in-interface=bridge new-connection-mark=\
    WAN1_conn per-connection-classifier=src-address:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-type=!local in-interface=bridge new-connection-mark=\
    WAN2_conn per-connection-classifier=src-address:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=bridge new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=bridge new-routing-mark=to_WAN2
add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat dst-address=10.0.2.249 dst-port=80 out-interface=bridge protocol=tcp src-address=10.0.2.0/24
add action=masquerade chain=srcnat dst-address=10.0.2.249 dst-port=443 out-interface=bridge protocol=tcp src-address=10.0.2.0/24
add action=dst-nat chain=dstnat dst-address=1.2.3.4 dst-port=80 protocol=tcp to-addresses=10.0.2.249
add action=dst-nat chain=dstnat dst-address=1.2.3.4 dst-port=443 protocol=tcp to-addresses=10.0.2.249
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
/ip route
add check-gateway=ping distance=1 gateway=192.168.10.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.11.1 routing-mark=to_WAN2
add distance=1 gateway=192.168.10.1
add check-gateway=ping distance=1 gateway=WAN1
add check-gateway=ping distance=1 gateway=192.168.10.1
add check-gateway=ping distance=2 gateway=WAN2
add distance=2 gateway=192.168.11.1
add check-gateway=ping distance=2 gateway=192.168.11.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www address=10.0.2.0/24
set ssh port=1234
set www-ssl address=10.0.2.0/24 disabled=no
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/London
/system console
set [ find ] disabled=yes
/system routerboard settings
set protected-routerboot=disabled

Have you tried connecting your computer directly to the router bypassing the switch. Could be a faulty port on the switch or faulty switch