Community discussions

MikroTik App
 
mode
newbie
Topic Author
Posts: 37
Joined: Sun Jun 03, 2018 12:12 am

Wrong default route when router and modem start at the same time

Fri Sep 13, 2019 12:06 pm

Hi,

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?


BR
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11598
Joined: Thu Mar 03, 2016 10:23 pm

Re: Wrong default route when router and modem start at the same time

Fri Sep 13, 2019 12:16 pm

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:
  1. 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).
  2. 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 ...
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: Wrong default route when router and modem start at the same time

Fri Sep 13, 2019 12:51 pm

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.
 
mode
newbie
Topic Author
Posts: 37
Joined: Sun Jun 03, 2018 12:12 am

Re: Wrong default route when router and modem start at the same time

Fri Sep 13, 2019 2:08 pm

Thanks for your answers. i'll check it out and post the result here.
 
User avatar
Paternot
Forum Veteran
Forum Veteran
Posts: 953
Joined: Thu Jun 02, 2016 4:01 am
Location: Niterói / Brazil

Re: Wrong default route when router and modem start at the same time  [SOLVED]

Fri Sep 13, 2019 5:43 pm

Wouldn't be easier just uncheck the "add default gateway", on the Mikrotik's DHCP client?
 
mode
newbie
Topic Author
Posts: 37
Joined: Sun Jun 03, 2018 12:12 am

Re: Wrong default route when router and modem start at the same time

Fri Sep 13, 2019 11:09 pm

Wouldn't be easier just uncheck the "add default gateway", on the Mikrotik's DHCP client?
Yes, i did this and it works like it should. Thanks!

Who is online

Users browsing this forum: Evaluator, Google [Bot] and 60 guests