红联Linux门户
Linux帮助

Fedora8能不能做路由器??

发布时间:2008-03-23 11:08:19来源:红联作者:xlch
按网上的方法使用route命令时提示如下“:
[root@localhost xu]# /sbin/route add-host 192.168.1.1 dev eth0:0
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)
[root@localhost xu]# /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
default 192.168.2.254 0.0.0.0 UG 0 0 0 eth0
按这个提示好象是没有网上所说的ADD等命令的,我这个说法正确吗??请大家指点。
文章评论

共有 5 条评论

  1. 13579443 于 2008-05-25 22:45:47发表:

    首先你需要装quagga软件,这是一个日本开发的软件,应该在光盘里面有,我用的RHEL5里面自带的,去网上找一下教程,可以在linux 里面跑OSPF,RIP,BGP等协议,linux完全可以当路由器使用!

  2. xlch 于 2008-03-26 16:02:33发表:

    (6)m:b 没有高手有时间来给我这个菜鸟指点一下吗??

  3. xlch 于 2008-03-24 12:02:53发表:

    我现在的设想这样的:局域网内有两个网关,一个接内网,一个接外网,本机器提供数据转发的功能,自动将内外网数据包转发到指定的网关,外网能访问局域内的服务器,但是不能访问内网,也就是不能通过内网网关访问本地局域网外的网络。内网网段为10.74.172.0,外网网段为192.168.2.0,本地局域网网段为192.168.1.0,所有连接通过一张网卡实现。请大家看看有什么好的方法,谢谢了。

  4. xlch 于 2008-03-24 10:17:21发表:

    能不能详细说明一下路由配置命令,及调试时应该注意的问题,谢谢

  5. kamui0523 于 2008-03-23 21:22:36发表:

    用man route会更详细,打开路由功能,首先需要在/etc/sysctl.conf中把net.ipv4.ip_forward的值设为1