linux route命令的使用
来源:互联网 发布:mac 大写 编辑:程序博客网 时间:2024/05/17 04:09
2、 route
(1) 添加到主机的路由
#route add –host 192.168.1.2 dev eth0:0
#route add –host 10.20.30.148 gw 10.20.30.40
意思是: 发往target host的数据包经过指定的gateway或者网络设备
(2) 添加到网络的路由
#route add –net 10.20.30.40 netmask 255.255.255.248 eth0
#route add –net 10.20.30.48 netmask 255.255.255.248 gw 10.20.30.41
#route add –net 192.168.1.0/24 eth1
意思是: 发往target network的数据包包经过指定的gateway或者网络设备
(3) 添加默认网关
#route add default gw 192.168.1.1
(4)查看内核路由表的配置。
#route
(5)删除路由。
#route del –host 192.168.1.2 dev eth0:0
#route del –host 10.20.30.148 gw 10.20.30.40
#route del –net 10.20.30.40 netmask 255.255.255.248 eth0
#route del –net 10.20.30.48 netmask 255.255.255.248 gw 10.20.30.41
#route del –net 192.168.1.0/24 eth1
#route del default gw 192.168.1.1
- linux route命令的使用
- linux route命令使用
- linux route命令使用
- linux route命令使用
- linux route命令使用
- linux route命令使用
- linux route命令使用
- linux route命令使用
- linux route命令的使用详解
- linux route命令的使用详解
- linux route命令的使用详解
- linux route命令的使用详解
- linux route命令的使用详解
- linux route命令的使用详解
- Linux route命令的使用详解
- linux route命令的使用详解
- linux route命令的使用详解
- linux route命令的使用详解
- 删除数据库重复记录
- expdp,impdp学习
- Oracle 字符集的查看和修改
- cygwin下编译boost1.45
- 很多国人毕其一生也没能读明白的故事
- linux route命令的使用
- PlayBook vmware虚拟机的手势guesture
- 如何修改MYSQL的系统变量
- WPF中的命令简述——出自《IT168》
- Word学习(三)
- oracle小技巧
- ADC位数与LSB误差(转)
- android界面之Activity的Title设置
- linux的strace命令(详解)