Monday, February 1, 2010

Route Add...

Dynamic…..

route add -net 10.0.0.23 netmask 255.255.255.255 gw 192.168.1.1

Static…

Create following file

vim /etc/sysconfig/network-scripts/route-eth1

add route like following

10.0.0.23 via 192.168.1.1

Save and close file

Ifdown eth1

Ifup eth1

Or

Service network restart

Or

/etc/init.d/network restart

1 comment:

  1. Add defualt gateway to virtual ip
    route add default gw 172.16.1.254 eth0:0

    ReplyDelete