Linux‎ > ‎

route

Linux Route

Add simple route

ip route add 192.168.50.0/24 via 192.168.3.5

Configure for boot time:

Debian: /etc/network/interfaces

up ip route add 10.4.0.0/20 equalize nexthop via 10.2.2.249 weight 1 nexthop via 10.2.2.248 weight 1
down ip route del 10.4.0.0/20 || true

RHEL: /etc/sysconfig/network-scripts/route-eth0 – create the file with the following format

10.4.0.0/20 equalize nexthop via 10.2.2.249 weight 1 nexthop via 10.2.2.248 weight 1

Comments