Monday, July 30, 2018

Working with Route Table

1. Checking route table
# ip route show

2.Adding static route
# ip route add 10.10.20.0/24 via 192.168.50.100 dev eth0

3. Remove static route
# ip route del 10.10.20.0/24

4. To add persistent static routes
# vi /etc/sysconfig/network-scripts/route-eth0
10.10.20.0/24 via 192.168.50.100 dev eth0

5. To add a default gateway
# ip route add default via 192.168.50.100

No comments: