您的位置:首页 > 运维架构 > Linux

route相关学习

2006-09-29 17:57 253 查看
下载了一本书看看,顺便做些练习
下载地址:http://www.itpub.net/attachment.php?postid=1962731

安装iproute包  Professional tools to control the networking in Linux kernels
 apt-get install iproute

显示链路
ip link list
显示IP地址
ip addr show
显示路由表
ip route show
查看ARP表
ip neigh show
删除ARP缓冲
ip neigh delete 10.0.22.11 dev eth0
查看路由规则
ip rule ls
新建规则
echo 200 john >>/etc/iproute2/rt_tables
ip rule add from 10.0.0.10 table john
ip route add via 195.96.98.253 dev ppp2 table john
ip route flush cache
流量分割
ip route add $P1_NET dev $IF_1 src $IP1 table T1
ip route add default via $P1 table T1
ip route add $P2_NET dev $IF_2 src $IP2 table T2
ip route ad default via $P2 table T2
隧道..IPSEC...不懂
ip route add 224.0.0.0/4 dev eth0
echo 1 > /proc/sys/net/ipv4ip_forward
ping -c 224.0.0.1
队列什么的,更不懂,以后再说。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息