Community discussions

MikroTik App
 
User avatar
shawnsBrain
just joined
Topic Author
Posts: 12
Joined: Sun Mar 21, 2010 1:08 am

Can't set route distance on dynamic link

Thu Jan 26, 2023 1:40 am

I have my MT configured for 2 IPS's on ether1 and ether2.
Ether1 uses a static IP from my ISP and I want it to be the primary connection.
Ether2 uses a dynamic IP from ISP #2 and I want it to be secondary.
When I go to IP > Routes to set the distance for the dynamic link, everything is greyed out and I can't set it.
How can I do this?

attachment=0]dip.jpg[/attachment]
You do not have the required permissions to view the files attached to this post.
Last edited by shawnsBrain on Thu Jan 26, 2023 7:08 pm, edited 1 time in total.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19105
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Can't set route distance on dynamic link

Thu Jan 26, 2023 2:34 am

How are you setting the routes.......
Are you using IP DHCP client for both or just ISP 2 etc.......
Need to see the config
/export file=anynameyouwish ( minus router serial# and any publicWANIP information)
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1275
Joined: Tue Jun 23, 2015 2:35 pm

Re: Can't set route distance on dynamic link

Thu Jan 26, 2023 3:05 am

as anav said, u can manage that here:

/ip dhcp-client/set default-route-distance=x
 
User avatar
shawnsBrain
just joined
Topic Author
Posts: 12
Joined: Sun Mar 21, 2010 1:08 am

Re: Can't set route distance on dynamic link

Thu Jan 26, 2023 5:42 pm

# jan/26/2023 09:40:55 by RouterOS 6.49.7
# software id = ZRRP-QJKG
#
# model = RB2011iL
# serial number = xxx123xxx123
/interface bridge
add name=bridge3-10
/interface ethernet
set [ find default-name=ether1 ] comment=FIBER
set [ find default-name=ether2 ] comment=VERIZON
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.2.100-192.168.2.250
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge3-10 lease-time=10h name=\
    dhcp1
/interface bridge port
add bridge=bridge3-10 interface=ether4
add bridge=bridge3-10 interface=ether5
add bridge=bridge3-10 interface=ether6
add bridge=bridge3-10 interface=ether7
add bridge=bridge3-10 interface=ether8
add bridge=bridge3-10 interface=ether9
add bridge=bridge3-10 interface=ether10
add bridge=bridge3-10 interface=ether3
/interface list member
add interface=ether1 list=WAN
add list=LAN
add interface=bridge3-10 list=LAN
/ip address
add address=192.168.4.101/24 interface=ether1 network=192.168.4.0
add address=192.168.2.1/24 interface=bridge3-10 network=192.168.2.0
/ip dhcp-client
add comment=VERIZON disabled=no interface=ether2
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=1.1.1.1,8.8.8.8 gateway=192.168.2.1
/ip dns
set servers=1.1.1.1,8.8.8.8
/ip firewall nat
add action=masquerade chain=srcnat comment=FIBER out-interface=ether1 \
    src-address=192.168.2.0/24
add action=masquerade chain=srcnat comment=VERIZON out-interface=ether2 \
    src-address=192.168.2.0/24
/ip route
add check-gateway=ping distance=1 gateway=192.168.4.1
/ip service
set telnet disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=America/Chicago
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Can't set route distance on dynamic link  [SOLVED]

Thu Jan 26, 2023 5:47 pm

Paste this on terminal:
/ip dhcp-client
set [find where comment=VERIZON and interface=ether2] default-route-distance=10
If something is dynamic, like the route created from dhcp-client, you must go where the route is created, on this case the dhcp-client.
Last edited by rextended on Thu Jan 26, 2023 5:48 pm, edited 1 time in total.
 
User avatar
shawnsBrain
just joined
Topic Author
Posts: 12
Joined: Sun Mar 21, 2010 1:08 am

Re: Can't set route distance on dynamic link

Thu Jan 26, 2023 5:48 pm

as anav said, u can manage that here:

/ip dhcp-client/set default-route-distance=x
what does it want for "numbers" ?
Image
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Can't set route distance on dynamic link

Thu Jan 26, 2023 5:49 pm

what does it want for "numbers" ?
Ignore, he wrote it without even checking what he wrote...

Who is online

Users browsing this forum: CJWW, EmuAGR, GoogleOther [Bot], NetHorror, sas2k, TheCat12 and 78 guests