RHEL 6, CENTOS6

how to make rouring in redhat 6

In RHEL6 / CENTOS6 /FEDORA you can add static roure by applying route add command. but it is a temporary route.

for static roure, you can do it by modifying route-eth files..

ath of file : /etc/sysconfig/network-scripts

modify route-eth0 or route-eth1 file on which Ethernet interface you want to add route,

if file is not present create a file

# vi /etc/sysconfig/network-scripts/route-eth0

add following lines :


ADDRESS0=X.X.X.X
NETMASK0=X.X.X.X
GATEWAY0=X.X.X.X
 
 
example : 
ADDRESS0=192.168.10.0       Destination Network Address 
NETMASK0=255.255.255.0      Destination Network Subnet mask
GATEWAY0=192.168.2.1        Gateway address for that network
 
 
IF YOU WANT MORE ROUTES TO BE ADDED, APPLY 1,2,3, ETC.




No comments:

Post a Comment