Hi,
I have these routing settings in ROS v6 (there is no bridge/switch, rather all ports are independent):
[XXXXX@YYYYY] > /ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 192.168.254.254 20
1 ADC 192.168.0.0/17 192.168.127.254 ether2 0
2 ADC 192.168.128.0/24 192.168.128.254 ether3 0
3 DC 192.168.129.0/24 192.168.129.254 ether4 255
4 DC 192.168.200.0/24 192.168.200.254 ether5 255
5 A S 192.168.253.0/24 192.168.128.254 ether3 10
6 ADC 192.168.254.0/24 192.168.254.253 ether1 0
Why is the distance of #1, #2, and #6 not modifiable in GUI (it’s grayed), whereas that of #5 and #0 is very well modifiable ?
How can I set the distance of #1 higher than that of #5 ?
And: why is it saying Dynamic for #1, #2, #3, #4, #6, but not for #5?
Actually IMO all of them should be Static instead of Dynamic. How can I set them to Static?
Routes to direct connected networks (the whole subnet of the assigned IP address of the interface) have a distance of 0, because they are just there at no distance, local to the interface.
Dynamic, because that route is not defined in the config, but added because of the local IP address?
Should also print the IP addresses of the interfaces to be able to check this. This info is missing here.
Local subnet distance cannot be greater than 0, because you are there in that subnet already, unless that interface is down.
The routing will not work as expected if these subnets do overlap. However smaller subnets will precede over larger subnets
[XXXXX@YYYYY] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 192.168.127.254/17 192.168.0.0 ether2
1 192.168.254.253/24 192.168.254.0 ether1
2 192.168.200.254/24 192.168.200.0 ether5
3 192.168.128.254/24 192.168.128.0 ether3
4 I 192.168.132.254/24 192.168.132.0 wlan3
5 192.168.129.254/24 192.168.129.0 ether4
6 I 192.168.133.254/24 192.168.133.0 wlan4
I have a net 192.168.253.0/24 behind another router. Via its WAN link (IP 192.168.128.253/24) it’s attached to this above router’s ether3 (IP 192.168.128.254) gateway.
In routing it should have precedence over the other routes, b/c otherwise the packets go to the default uplink, but which is the wrong route, therefore the need to modify the distances accordingly…
Smaller subnets always have priority over larger, distance is only used when there are multiple subnets of the same size.
The static route (#5 of /ip route print) looks incorrect - the gateway should be next hop address, not the interface:
/ip route
add dst-address=192.168.253.0/24 gateway=192.168.128.253
You are right! It works! Thx!
This below now works fine:
I need the net 192.168.253.0/24 connected to the net 192.168.128.0/24.
Just imagine some dumb switch devices (8 or 16 port) are attached to these router ports for attaching PCs (as well one or more downlinks) into that particular segment (net)…