IP routing involves forwarding of IP datagrams. Its a simple process in which the host sends the IP datagram directly to the destination if the destination host is connected. For example, through a point to point link or through a shared network. If the destination host is not directly connected then the host sends the IP datagram to the default router and lets the router decide where to send the IP datagram further.
Show Route List
# route -n
Add New Static Route
If you add new route with “route add” command, this value is deleted when network service restart or reboot system.
# route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.1.110
If you want to persistent route, you can make configuretion like below.
Add New Persistent Static Route
# vi /etc/sysconfig/network-scripts/route-eth0
Add below lines.
GATEWAY0=192.168.1.110
NETMASK0=255.255.255.0
ADDRESS0=192.168.10.0Note : If you use bonding, you have to use route-bond0 that bond0 is your bond interface name.
# service network restart
# route -n