I get dynamic IP from my ISP and have DHCP client configured in my router. Everything was fine while I was getting ISP’s internal network address. Then I requested an external IP to get access to my network from the outside. Once this was done, I’m getting the following data from the provider:
For some reason, the gateway address is empty, but the internet connection is working - I specified the gateway address manually for the default route for now. Any ideas why this happens? All the other provider data seems to be fine. One of dynamic routes also shows correct gateway address. When I tried to connect my laptop directly to the ISP’s cable, I got everything including the gateway address displayed on the network card’s data. Is that just a UI issue here?
It shows the default route (0.0.0.0/0, labelled as “GW of last resort”) as dynamic (issued by dhcp) and active. I would say that is a pretty good sign!
OK, I see. So what you are saying is in “/ip route” it is missing after the dhcp transaction if you don’t insert it static.
What did your log show about the ether1 dhcp lease request when you start the router? You must enable verbose logging for dhcp as I mentioned above. If it is not clear to you, post all that transaction from the log.
I did not examine the logs yet. Tried to play with configurations first. Will look into the logs tonight. Overall, what I am observing:
If I open the status tab of the DHCP client, I’m not seeing gateway address there.
I don’t have Internet connection with just dynamic routes and with the default route that is supposed to be created by the DHCP client. I have 3 dynamic entries in routing table:
Until I add the static route (first entry above), I don’t have the internet connection.
I don’t quite understand what rows 3 and 4 mean. Entry 3 seems to be non-active. The destination address is my provider’s network x.21.16.128/26. How is it supposed to work? I’m not accessing anything in the provider’s network except the gateway. I would expect that DHCP clinet creates the default dynamic route equal to my static one, but it does not happen for some reason.
I do have Internet connection with my static route, but I would like to understand why I have to apply a static route while using dynamic configuration from my ISP.
You are presuming your ISP is not the problem. If you do not check your logs, you could be chasing a ghost. If your ISP is not sending a gateway in the offer and ack, your router won’t assign one.
I am not presuming that ISP is not a problem. All I know is that I’m getting the gateway address if I connect my laptop directly to the ISP’s wire. And the laptop can go to internet without problems. No doubt, I need to see logs.
Now that was a good test! If other devices work, and the 750 doesn’t, you have a problem with the 750 dhcp client function.
I had a problem with the dhcp server renewal function in ROS versions up to and including v5.25 with some (very few) devices. The client device sent a request to the MikroTik dhcp server that the router didn’t like. The client was told by the router the lease was renewed (ack), but did not update the renewal time in it’s database, and the router expired the lease. This problem is supposed to be corrected in v6.1, but I have not tested that version yet.
I flashed 6.1 right when I purchased the router. So that’s the behavior I got. Anyway, my workaround with the static route works, so it’s not a major problem. Still interested in learning these matters just for fun.
I would highly recommend sending an email to MikroTik support with this issue. If they do not know about it, they won’t try to fix it. Be prepared to send the output of the log. I allowed the MikroTik development team into my router to watch as it failed. That was a big help to them.
I checked the little box “Submit this post as a bug report..” when I submitted this post.
Your ISP is sending classless routes to you on a wrong format. When classless
routes are used then also default route should be encoded in that option.
If you are using RouterOS version 6 you can overcome this problem by setting
add-default-route=special-classless in dhcp client settings
After I applied this option, I got the dynamic default route and gateway address in DHCP status! I knew something’s wrong on the ISP’s side!