免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: mao1001
打印 上一主题 下一主题

[FreeBSD] 我的互联路由该如何设置 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2010-05-04 17:59 |只看该作者
/sbin/route add -net 0.0.0.0/24 192.168.111.254
不知道lz的-net 0.0.0.0/24代表什么呢?
congli 发表于 2010-05-04 17:51


默认路由,route上如此config,freebsd就不清楚了

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
12 [报告]
发表于 2010-05-04 23:04 |只看该作者
本帖最后由 lsstarboy 于 2010-05-04 23:08 编辑

把freebsd和linux/win搞混了。

FreeBSD下:
>netstat -r
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            221.2.x.x      UGS         0 506374748   fxp0
localhost          localhost          UH          0      242    lo0
192.168.1.0        link#3             UC          0        0   fxp1
192.168.10.0       link#6             UC          0        0 vlan10
192.168.20.0       link#7             UC          0        0 vlan20
192.168.30.0       link#8             UC          0        0 vlan30
192.168.40.0       link#9             UC          0        0 vlan40
192.168.50.0       link#10            UC          0        0 vlan50
192.168.60.0       link#11            UC          0        0 vlan60


没有出现0.0.0.0

winXP下:

C:\Documents and Settings\abc>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...6c f0 49 05 91 5c ...... Realtek PCIe GBE Family Controller - 数据包计
程序微型端口
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0   192.168.202.18  192.168.202.200      20
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
    192.168.202.0    255.255.255.0  192.168.202.200  192.168.202.200      20
  192.168.202.200  255.255.255.255        127.0.0.1       127.0.0.1       20
  192.168.202.255  255.255.255.255  192.168.202.200  192.168.202.200      20
        224.0.0.0        240.0.0.0  192.168.202.200  192.168.202.200      20
  255.255.255.255  255.255.255.255  192.168.202.200  192.168.202.200      1
Default Gateway:    192.168.202.18
===========================================================================
Persistent Routes:
  None

有0.0.0.0

没有linux的机器。

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
13 [报告]
发表于 2010-05-04 23:09 |只看该作者
另外你可以直接把所有的路由都加到192.168.111.254上,它负责网络间包的转发也可以。

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
14 [报告]
发表于 2010-05-05 08:05 |只看该作者
给ls补一个Linux的
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     10.0.3.254      255.255.255.0   UG    0      0        0 eth0
10.0.0.0        *               255.255.0.0     U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         10.0.0.20       0.0.0.0         UG    0      0        0 eth0

论坛徽章:
2
狮子座
日期:2013-08-26 15:25:32金牛座
日期:2013-09-05 15:45:36
15 [报告]
发表于 2010-05-05 15:19 |只看该作者
楼上的兄弟们
发现有10.177
你们是电力系统么
哇咔咔

论坛徽章:
0
16 [报告]
发表于 2010-05-05 18:50 |只看该作者
回复 12# lsstarboy

netstat -nrfinet
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP