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] [<AF>] List kernel routing tables
route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] 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
<AF>=Use '-A <af>' or '--<af>'; 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)
其实是根据书添加路由表,可是书也没有说为什么要添加路由表,不懂。
route路由失败,为何?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- elle29
- 帖子: 101
- 注册时间: 2008-09-09 17:10
- ebok
- 帖子: 852
- 注册时间: 2008-02-15 0:09
Re: route路由失败,为何?
-net 后加的是网段,不是IP。
试试 192.168.76.0

试试 192.168.76.0

Somebody think they are full of niubility, so they play a zhuangbility, but only reflect their shability.
- elle29
- 帖子: 101
- 注册时间: 2008-09-09 17:10
Re: route路由失败,为何?
成功了,thanks!
能不能解释一下这个.2 和.0的区别啊,前面的.76是不是也有什么规矩阿?还有就是为什么要添加路由表呢?
能不能解释一下这个.2 和.0的区别啊,前面的.76是不是也有什么规矩阿?还有就是为什么要添加路由表呢?
