Routes

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

 

Check

history | grep route

netstat -nr
netstat -r
route -n
ip route show

Add dynamic route

route add -net 172.33.0.0/16 gw 172.33.77.242 -interface eno33557248                     - it will remove after restart OS

Add static route

vi /etc/sysconfig/network-scripts/route-ethX

192.168.0.0/16 via 172.33.77.242
172.16.0.0/16 via 172.33.77.242
172.30.0.0/16 via 172.33.77.242
10.0.0.0/8 via 172.33.77.242
192.16.0.0/16 via 172.33.77.242

ADDRESS0=192.168.0.0
NETMASK0=255.255.0.0
GATEWAY0=172.33.77.242

ADDRESS1=10.10.0.0
NETMASK1=255.255.0.0
GATEWAY1=172.33.77.242

ADDRESS2=172.16.0.0
NETMASK2=255.255.0.0
GATEWAY2=172.33.77.242

ADDRESS3=172.33.0.0
NETMASK3=255.255.0.0
GATEWAY3=172.33.77.242

192.168.0.0/16 via 192.168.14.142
172.16.0.0/16 via 192.168.14.142
172.33.0.0/16 via 192.168.14.142
10.0.0.0/8 via 192.168.14.142
192.16.0.0/16 via 192.168.14.142

172.33.77.0/24 dev eth0 table 220
192.168.14.4 via 172.33.77.242 dev eth0
default via 172.33.77.242 dev eth0 table 220

service network restart
/etc/init.d/network restart

Newsletter

Enter your email to join our mailing list

Quick Contact