Hi Guys,
i have two networks on the same LAN:
#1 192.168.0.0/29 (The Router is .1)
#2 192.168.1.5/29 (All IPs are useable 1-7)
There is only one default-gateway on LAN#1 but both networks are on the same LAN (so no VLAN is configured).
My Router is 192.168.1.5 and i can do an arp-ping to 192.168.0.1 (Default-Gateway) on the same Interface.
When i add the route 192.168.0.0/29 via interface ether1 i can ping the router on Network #1 .
But when i install default route 0.0.0.0/0 via 192.168.0.1 it tells me that the route is unreachable.
When i install default route via interface route ether1 it tells me that the route is reachable, but ping to 8.8.8.8 wont work.
When i install default route via 192.168.0.1%ether1 it tells me that the route is unreachable and ping to 8.8.8.8 also want work.
So, how can i install a recursive default-route?
mrz
March 1, 2019, 1:28pm
2
Hi,
i have done the scope-settings, but it will not work as expected.
Can you please have a look on that?
[admin@MikroTik] > ip route print detail
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
0 S dst-address=0.0.0.0/0 pref-src=93.240.147.69 gateway=87.190.23.57
gateway-status=87.190.23.57 unreachable distance=1 scope=30 target-scope=30
1 ADC dst-address=10.198.10.0/24 pref-src=10.198.10.150 gateway=ether8-to-private-network
gateway-status=ether8-to-private-network reachable distance=0 scope=10
2 A S dst-address=87.190.23.57/32 gateway=ether1-telekom-glasfaser
gateway-status=ether1-telekom-glasfaser reachable distance=1 scope=10 target-scope=10
3 ADC dst-address=93.240.147.64/29 pref-src=93.240.147.69 gateway=ether1-telekom-glasfaser
gateway-status=ether1-telekom-glasfaser reachable distance=0 scope=10
4 ADC dst-address=172.17.0.22/31 pref-src=172.17.0.22 gateway=br-firewall-wanko
gateway-status=br-firewall-wanko reachable distance=0 scope=10
5 A S dst-address=185.58.30.128/28 gateway=br-firewall-wanko
gateway-status=br-firewall-wanko reachable distance=1 scope=30 target-scope=10
87.190.23.57/32 is the Gateway, which is connected to the network 87.190.23.56/29.
93.240.147.69/29 is the IP-Address of this box.
What are the correct settings to get this work?
Within Linux this should do the trick:
/sbin/ip route add default via 87.190.23.57 dev ether1 onlink
[admin@MikroTik] > ping 87.190.23.57
SEQ HOST SIZE TTL TIME STATUS
0 87.190.23.57 56 255 1ms
1 87.190.23.57 56 255 0ms
2 87.190.23.57 56 255 0ms
3 87.190.23.57 56 255 0ms
sent=4 received=4 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=1ms
[admin@MikroTik] > ip address print detail
Flags: X - disabled, I - invalid, D - dynamic
0 address=93.240.147.69/29 network=93.240.147.64 interface=ether1-telekom-glasfaser
actual-interface=ether1-telekom-glasfaser
1 address=172.17.0.22/31 network=172.17.0.22 interface=br-firewall-wanko
actual-interface=br-firewall-wanko
2 address=10.198.10.150/24 network=10.198.10.0 interface=ether8-to-private-network
actual-interface=ether8-to-private-network
mrz
March 4, 2019, 8:23am
4
Recursive route cannot be resolved if gateway is interface (not IP address). It is suggested to avoid using gateway interfaces on broadcast networks, since it can lead to unexpected behavior.
That means, that Mikrotik is not the correct router for this situation?
So i have to switch to a other vendor like ubiquiti?
But why is my first route not working?
dst-address=0.0.0.0/0 gateway=IP-ADDRESS%INTERFACE
That should do the trick, but why it wont work?
I am a little bit confused.
But there is no gateway on the 93.240.147.64/29 subnet.
That is why i need an interface-route.
Hi,
i have done the scope-settings, but it will not work as expected.
Can you please have a look on that?
[admin@MikroTik] > ip route print detail
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
0 S dst-address=0.0.0.0/0 pref-src=93.240.147.69 gateway=87.190.23.57
gateway-status=87.190.23.57 unreachable distance=1 scope=30 target-scope=30
1 ADC dst-address=10.198.10.0/24 pref-src=10.198.10.150 gateway=ether8-to-private-network
gateway-status=ether8-to-private-network reachable distance=0 scope=10
2 A S dst-address=87.190.23.57/32 gateway=ether1-telekom-glasfaser
gateway-status=ether1-telekom-glasfaser reachable distance=1 scope=10 target-scope=10
3 ADC dst-address=93.240.147.64/29 pref-src=93.240.147.69 gateway=ether1-telekom-glasfaser
gateway-status=ether1-telekom-glasfaser reachable distance=0 scope=10
4 ADC dst-address=172.17.0.22/31 pref-src=172.17.0.22 gateway=br-firewall-wanko
gateway-status=br-firewall-wanko reachable distance=0 scope=10
5 A S dst-address=185.58.30.128/28 gateway=br-firewall-wanko
gateway-status=br-firewall-wanko reachable distance=1 scope=30 target-scope=10
87.190.23.57/32 is the Gateway, which is connected to the network 87.190.23.56/29.
93.240.147.69/29 is the IP-Address of this box.
What are the correct settings to get this work?
Within Linux this should do the trick:
/sbin/ip route add default via 87.190.23.57 dev ether1 onlink
[admin@MikroTik] > ping 87.190.23.57
SEQ HOST SIZE TTL TIME STATUS
0 87.190.23.57 56 255 1ms
1 87.190.23.57 56 255 0ms
2 87.190.23.57 56 255 0ms
3 87.190.23.57 56 255 0ms
sent=4 received=4 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=1ms
[admin@MikroTik] > ip address print detail
Flags: X - disabled, I - invalid, D - dynamic
0 address=93.240.147.69/29 network=93.240.147.64 interface=ether1-telekom-glasfaser
actual-interface=ether1-telekom-glasfaser
1 address=172.17.0.22/31 network=172.17.0.22 interface=br-firewall-wanko
actual-interface=br-firewall-wanko
2 address=10.198.10.150/24 network=10.198.10.0 interface=ether8-to-private-network
actual-interface=ether8-to-private-network
Why is your default route has pref source from the subnet 93?