Linux‎ > ‎Networking‎ > ‎

~Adding Static Routes To Access Hosts In Other Networks

Create a file  /etc/sysconfig/network-scripts/route-eth0 and add the below entry (add more as needed)

GATEWAY4=192.168.1.1

NETMASK4=255.255.255.255
ADDRESS4=128.xxx.xxx.xxx
GATEWAY3=192.168.1.1
NETMASK3=255.255.255.255
ADDRESS3=122.xxx.xxx.xxx
GATEWAY2=192.168.1.1
NETMASK2=255.255.255.255
ADDRESS2=121.xxx.xxx.xxx
GATEWAY1=192.168.1.1
NETMASK1=255.255.255.255
ADDRESS1=110.xxx.xxx.xxx
GATEWAY0=192.168.1.1
NETMASK0=255.255.255.255
ADDRESS0=128.50.xxx.xxx


ADDRESS = The Destination Host Address
NETMASK = Subnet Mask, Defaults to 255.255.255.255 if nothing else is specified
GATEWAY = The Gateway that you want your source node to use to get to the destination node (ADDRESSn)
 
Comments