Simple Static Routes Example
This is a newbie tutorial. If you wonder how to ping an IP address in the network and you are not sure if you configured your static routes OK, this little article should help you understand it all.
/ip address add address=192.168.2.2/24 interface=ether1 /ip route add dst-address=192.168.0.0/16 gateway=192.168.2.180
This adds an IP address 192.168.2.2 with subnet mask 255.255.255.0 (/24) to interface ether1. The route means: all packets destined to 192.168.x.x will be sent to router 192.168.2.180 which will forward them to the their destination when we add the below configuration:
/ip address add address=192.168.1.69/24 interface=ether1 /ip route add dst-address=192.168.0.0/16 gateway=192.168.1.180
/ip address add address=192.168.2.180/24 interface=ether1 /ip address add address=192.168.21.1/24 interface=ether2 /ip route add dst-address=192.168.1.0/24 gateway=192.168.21.2
The route entry makes all packets with dst-address 192.168.1.x received from any interface, be sent through gateway 192.168.21.2.
/ip address add address=192.168.21.2/24 interface=ether1 /ip address add address=192.168.1.180/24 interface=ether2 /ip route add dst-address=192.168.2.0/24 gateway=192.168.21.1
The route entry makes all packets with dst-address 192.168.2.x received from any interface, be sent through gateway 192.168.21.1.
This way we get ping and trace to all hosts from all hosts in this network.
Alternative: Bridge setup.