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...
by kevensky - Linux文档专区 - 2009-04-14 11:49:12 阅读(644) 回复(0)
编辑/etc/sysconfig/static-routes any net netmask gw 在RHEL4中测试通过 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/77512/showart_1157204.html
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 ...
请参看下文 http://www.linuxaid.com.cn/forum/showelite.jsp?l=1&i=55674 我想加一条192.168.0.0/16 到192.168.0.1的路由!请问怎么做?
请参看下文 http://www.linuxaid.com.cn/forum/showelite.jsp?l=1&i=55674 我想加一条192.168.0.0/16 到192.168.0.1的路由!请问怎么做?
服务器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...
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
我以前做过笔记现在却看不明白了 第1步:在rc.local里添加 第2步:在network里添加到末尾 第3步:/etc/sysconfig/static-route 我都不知道该添写什么东西了,晕! 大家帮忙 谢谢
我以前做过笔记现在却看不明白了 第1步:在rc.local里添加 第2步:在network里添加到末尾 第3步:/etc/sysconfig/static-route 我都不知道该添写什么东西了,晕! 大家帮忙 谢谢