服务器ip(eth0) [root@localhost net]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:9A:15 inet addr:172.18.3.205 Bcast:172.18.3.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fee3:9a15/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4776 errors:0 dropped:0 overruns:0 frame:0 TX packets:3348 errors:0 d...
by zhiming.yk - Linux文档专区 - 2008-08-16 12:39:59 阅读(1055) 回复(0)
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). 编...
以下代码改自net-tools相关代码:
#include
一:使用 route 命令 添加 使用route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法: //添加到主机的路由 # route add –host 192.168.168.110 dev eth0 # route add –host 192.168.168.119 gw 192.168.168.1 //添加到网络的路由 # route add –net IP netmask MASK eth0 # route add –net IP netmask MASK gw IP # route add –net IP/24 eth1 //添加默认网关 # route add default gw IP //删除路由 # route de...
linux下添加路由的方法: 一:使用 route 命令添加 使用route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法: //添加到主机的路由 # route add –host 192.168.168.110 dev eth0 # route add –host 192.168.168.119 gw 192.168.168.1 //添加到网络的路由 # route add –net IP netmask MASK eth0 # route add –net IP netmask MASK gw IP # route add –net IP/24 eth1 //添加默认网关 # route add default gw IP...
linux下添加路由的方法: 一:使用 route 命令添加 使用route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法: //添加到主机的路由 # route add –host 192.168.168.110 dev eth0 # route add –host 192.168.168.119 gw 192.168.168.1 //添加到网络的路由 # route add –net IP netmask MASK eth0 # route add –net IP netmask MASK gw IP # route add –net IP/24 eth1 //添加默认网关 # route add default gw IP ...
用route add -net 10.0.0.0 netmask 255.255.255.0 gw 192.168.0.1命令添加路由后,系统重启后该路由丢失,怎样能让它永久生效。除了写进/etc/rc.d/rc.local还有没有其他的办法。
linux多网卡添加路由 Summary: ifconfig eth0 192.168.128.190 ifconfig ixp0 192.168.127.20 ifconfig ixp1 192.168.127.21 route add -net 192.168.127.0 netmask 255.255.255.0 dev ixp0 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16358/showart_194832.html
我有一台服务器有三张网卡eth0 eth1 eth2分半对应电信联通和移动 eth0 电信 eth1 联通 eth2 移动 也建了三张路由表 ip route add default via 1.1.1.1 table dx ip rule add from 124.193.234.58 table dx ip route add default via 2.2.2.2 table lt ip rule add from 101.36.76.210 table lt ip route add default via 3.3.3.3 table yd ip rule add from 3.3.3.3 table yd 在 /etc/sysconfig/network-script/route-eth0 /et...
linux下添加路由的方法: 一:使用 route 命令添加 使用route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法: //添加到主机的路由 # route add –host 192.168.168.110 dev eth0 # route add –host 192.168.168.119 gw 192.168.168.1 //添加到网络的路由 # route add –net IP netmask MASK eth0 # route add –net IP netmask MASK gw IP # route add –net IP/24 eth1 //添加默认网关 # route add default gw IP ...
编辑/etc/sysconfig/static-routes any net netmask gw 在RHEL4中测试通过 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/77512/showart_1157204.html