route路由失败,为何?

ellawu@ellawu-desktop:~$ su -
口令:
root@ellawu-desktop:~# route add -net 192.168.76.2 netmask 255.255.255.0 dev eth0
route: netmask doesn’t match route address
Usage: route [-nNvee] [-FC] [] List kernel routing tables
route [-v] [-FC] {add|del|flush} … Modify routing table for AF.

route {-h|–help} [] Detailed usage syntax for specified AF.
route {-V|–version} Display version/author and exit.

-v, --verbose be verbose
-n, --numeric don’t resolve names
-e, --extend display other/more information
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB

=Use '-A ’ or ‘–’; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
x25 (CCITT X.25)

其实是根据书添加路由表,可是书也没有说为什么要添加路由表,不懂。

Re: route路由失败,为何?
#2帖子 由 ebok » 2008-10-09 21:59
-net 后加的是网段,不是IP。
试试 192.168.76.0
:em06
Somebody think they are full of niubility, so they play a zhuangbility, but only reflect their shability.

Re: route路由失败,为何?
#3帖子 由 elle29 » 2008-10-09 22:24
成功了,thanks!
能不能解释一下这个.2 和.0的区别啊,前面的.76是不是也有什么规矩阿?还有就是为什么要添加路由表呢?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值