I'm trying to add a custom route between 2 routers from Router1 to Router2:
Router1
Router2
Router1 route table:
I need to add a static route on Router1 to the LAN on Router2.
If I add the route manually all works perfetly:
But if I add the route using router GUI:
The first line is transforming to command (adding particular gateway)
and after issuing the second command:
I get the error:
route: SIOCADDRT: Network is unreachable
How can I add a static route to particular network via particular gateway using GUI?
Router1
WAN - 10.10.218.1/255.255.255.0LAN - 192.168.121.0/255.255.255.0Router2
WAN - 10.10.170.18/255.255.255.0LAN - 192.168.145.0/255.255.255.0Router1 route table:
Kernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Iface0.0.0.0 10.10.218.1 0.0.0.0 UG 0 0 0 eth010.10.218.0 0.0.0.0 255.255.255.0 U 0 0 0 eth010.10.218.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo192.168.121.0 0.0.0.0 255.255.255.0 U 0 0 0 br0I need to add a static route on Router1 to the LAN on Router2.
If I add the route manually all works perfetly:
route add -host 10.10.170.18 dev eth0route add -net 192.168.145.0 netmask 255.255.255.0 gw 10.10.170.18 eth0Kernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Iface0.0.0.0 10.10.218.1 0.0.0.0 UG 0 0 0 eth010.10.170.18 0.0.0.0 255.255.255.255 UH 0 0 0 eth010.10.218.0 0.0.0.0 255.255.255.0 U 0 0 0 eth010.10.218.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo192.168.121.0 0.0.0.0 255.255.255.0 U 0 0 0 br0192.168.145.0 10.10.170.18 255.255.255.0 UG 0 0 0 eth0But if I add the route using router GUI:
IP-address Network mask Gateway Metric Interface10.10.170.18 255.255.255.255 0.0.0.0 - WAN192.168.145.0 255.255.255.0 10.10.170.18 - WANThe first line is transforming to command (adding particular gateway)
route add -host 10.10.170.18 gw 10.10.218.1 dev eth0Kernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Iface0.0.0.0 10.10.218.1 0.0.0.0 UG 0 0 0 eth010.10.170.18 10.10.218.1 255.255.255.255 UGH 0 0 0 eth010.10.218.0 0.0.0.0 255.255.255.0 U 0 0 0 eth010.10.218.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo192.168.121.0 0.0.0.0 255.255.255.0 U 0 0 0 br0and after issuing the second command:
route add -net 192.168.145.0 netmask 255.255.255.0 gw 10.10.170.18 eth0I get the error:
route: SIOCADDRT: Network is unreachable
How can I add a static route to particular network via particular gateway using GUI?
