zl程序教程

您现在的位置是:首页 >  工具

当前栏目

route路由失败,为何?

路由 失败 为何 Route
2023-09-11 14:14:47 时间

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是不是也有什么规矩阿?还有就是为什么要添加路由表呢?