增加一条静态路由:
# route add -net 172.16.0.0 netmask 255.255.0.0 
这样系统中就增加了一条静态路由:  
# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface  
172.16.0.0 * 255.255.0.0 U 0 0 0 eth0 
接下来,配置eth1,eth1与10.0.0.0网段相连,分配给它的地址是10.254.254.254,使用ifconfig命令为它配置参数:
# ifconfig eth1 10.254.254.254 netmask 255.0.0.0
同样编辑/etc/sysconfig/network-scripts目录下的ifcfg-eth1文件,内容如下:
DEVICE = eth1  
ONBOOT = yes  
BROADCAST = 10.255.255.255 
NETWORK = 10.0.0.0 
NETMASK = 255.0.0.0 
IPADDR = 10.254.254.254 
再增加一条静态路由:  
# route add -net 10.0.0.0 netmask 255.0.0.0 
网络中当前的路由表为  
# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 
172.16.0.0 * 255.255.0.0 U 0 0 0 eth0 
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1 
最后配置eth3,它连接192.168.1.0网段,分配的IP地址是192.168.1.254,执行下列命令:
# ifconfig eth2 192.168.1.254 netmask 255.255.255.0
编辑/etc/sysconfig/network-scripts目录下的ifcfg-eth2文件,内容如下:
DEVICE = eth2 
ONBOOT = yes  
BROADCAST = 192.168.1.255 
NETWORK = 192.168.1.0 
NETMASK = 255.255.255.0 
IPADDR = 192.168.1.254 
