i am using a dsl modem with a mikrotik router. The router establishes a pppoe connection. When powercycling router and modem at the same time the router boots faster while the modem is still syncing with the dslam. But the modem has a dhcp server and gives a local ip 192.168. to the mikrotik router (only for connecting to the webif of the modem) The Router sets its default gateway to this ip. Even if the router established the pppoe connection the default route is not set to wan IP.
To fix this i have to reboot the router while the modem is synced. Then the correct default route to wan ip is set.
How can i fix this, so that i can boot the router while the dsl modem is not synced?
Set IP address to Mikrotik statically. Take any address from the same IP subnet as modem uses except from modem’s own address (and network and broadcast addresses obviously).
pppoe-client on Mikrotik should add default route … but be sure to enable “add default route” on PPPoE client configuration.
If the whole setup depends on default route pointing to modem’s address, then it probably means that modem is establishing PPPoE as well. In this case you have two possibilities:
Keep running PPPoE client on modem. Disable PPPoE client on Mikrotik. Drawback is that you actually have double NAT (once by Mikrotik and once by modem). It doesn’t matter much if you don’t have any use of port forwarding (either for accessing your LAN from internet or for some on-line games).
disable PPPoE client on modem and properly configure Routerboard. Apart form enabling “add default route” on PPPoE client config, you’ll probably have to add the pppoe-out1 (or whatever it is named in your setup) interface to interface list named “WAN”. This is necessary for all the firewall perform properly (it affects both firewall filter rules and NAT).
The benefit is that you only have NAT performed once, so you can establish some port-forwaring just by configuring Mikrotik.
You will still be able to access modem’s administrative page …
Don’t do it so difficult… just set a higher “default route distance” in the Advanced tab on the DHCP client.
The DHCP client will add a default route with high distance (2 or higher) and later when your PPPoE client comes up it will set its normal distance 1 default route which will be used.