例如:10。0。10。1和192段的服务器通信通信,需要在192.168.1.2的服务器上加一条路由指向!就象在win下的 route add 10.0.10.0 mask 255.255.255.0 192.168.1.1 。 谁能举个例子!!!!!!!!!!
修改linux静态路由 内网:有两个网段10.10.100.0/24和10.10.101.0/24, 服务器ip: a.b.c.d 外网网关e.f.g.h 服务器内网卡10.10.100.254 内网10.10.101.0/24网段的机器无法访问10.10.100.254这台机器。 登陆服务器查看路由表: [root@www conf]# netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.10.100.0 * 255.255.255.0...
linux静态路由设置 By 人生百味 发表于 2006-9-3 21:05:00 现在有五个设备,PC1接ROUT1,ROUT1再接ROUT2,ROUT2再接ROUT3,ROUT3再接PC2,拓扑图见下: □————○————○————○————□ PC1 ROUT1 ROUT2 ROUT3 PC2 五个设备的静态IP地址分别为: PC1 192.168.1.88/24 ROUT1 192.168.1.128/24 192.168.2.128/24 ROUT2 192.168.2.66/24 192.168.3.66/24 ROUT3 192....
/etc/sysconfig/static-routes eth0 net 192.168.0.0 netmask 255.255.0.0 gw 10.1.1.254 或者 /etc/sysconfig/network-scripts/eth0.route ADDRESS0=192.168.0.0 NETMASK0=255.255.0.0 GATEWAY0=10.1.1.254 ADDRESS1=172.16.0.0 NETMASK1=255.240.0.0 GATEWAY1=10.1.1.254 这样比在 rc.local 里面 route add 或者(ip route add)要好 /sbin/route add -net 192.168.0.0/16 gw 10.1.1.254 重起网络或者重起网卡都可以正常工作 本...
环境如下: PC:DELL OPTIPLEX 330 双网卡 OS:CENTOS 6.4 网络配置: eth0: 10.48.210.3 netmask 255.255.255.248 (内网卡设置,内网卡不设置网关) eth1: 121.*.*.251 netmask 255.255.255.0 gateway 121.*.*.225 (外网卡设置) 为了能实现NAT上网的功能必须开启内网网路由的功能。 静态路由的设置,在/etc/sysconfig/static-routes文件中写入any net 10.0.0.0 netmask 255.0.0.0 gw 10.48.210.2 (内网交换机网口地址) 配置后利...
这段时间在研究linux平台下静态路由添加的问题,目前在我们平台上添加静态路由是通过route add命令来实现的,在使用route add时发现了一些问题,请大家帮忙一起看一下 环境如下: 假设PC1有一张网卡,IP为192.168.1.100,mask为255.255.255.0,gateway为192.168.1.1,dev为eth0 如果没有设定静态路由的话,对google(IP为203.208.39.104)做ping测试发现正常 使用route add -net 203.208.39.104 netmask 255.255.255.255 dev eth...
linux静态路由添加删除 第一种: 添加: route add -net 192.168.13.0/24 gw 192.168.28.1 dev eth0 删除: route del -net 192.168.13.0/24 永久添加: (1). 编辑文件:/etc/sysconfig/static-routes 添加内容:“eth0 net 192.168.13.0/24 gw 192.168.0.1” (2). 把命令写入/etc/rc.local 第二种: 添加: ip route add 192.168.13.0/24 via 192.168.28.1 dev eth0 删除: ip route del 192.168.13.0/24 永久添加: (1). 编...