FreeBSD 10.1路由问题

我的校园里有基于FreeBSD的路由器。

这些types的路由器的简单configuration:两个接口,其中一个接口连接到外部networking,另一个连接到本地networking。

在我的本地网有三个子网:192.168.0.0/24,192.168.1.0/24,192.168.200.0/24。 ipfwconfiguration为透明nat,启用sysctl转发。

本地接口根据子网configuration为三个IP别名:192.168.0.1,192.168.1.1和192.168.200.1。 它也连接到单一的l2可pipe理惠普交换机。 交换机默认configuration为单个vlan。

从192.168.0.0/24子网客户端,我可以达到192.168.1.0/24客户端,反之亦然。 但是对于192.168.200.0/24中的客户端来说,其他两个子网是无法访问的,尽pipe通过默认网关192.168.200.1可以访问互联网

通过初始devise,所有内部子网必须互相可达。

在FreeBSD路由器上输出netstat -rn

 Routing tables Internet: Destination Gateway Flags Netif Expire default xxx.xxx.xxx.xxx UGS xl0 127.0.0.1 link#4 UH lo0 192.168.0.0/24 link#1 U bge0 192.168.0.1 link#1 UHS lo0 192.168.0.2 link#1 UHS lo0 192.168.1.0/24 link#1 U bge0 192.168.1.1 link#1 UHS lo0 192.168.200.0/24 link#1 U bge0 192.168.200.1 link#1 UHS lo0 xxx.xxx.xxx.xxx/30 link#3 U xl0 xxx.xxx.xxx.xxx link#3 UHS lo0 

输出为ipfw

 00050 1123362356 950030754266 nat 123 ip4 from any to any via xl0 00100 26229559 14516116395 allow ip from any to any via lo0 00200 0 0 deny ip from any to 127.0.0.0/8 00300 0 0 deny ip from 127.0.0.0/8 to any 00400 0 0 deny ip from any to ::1 00500 0 0 deny ip from ::1 to any 00600 0 0 allow ipv6-icmp from :: to ff02::/16 00700 0 0 allow ipv6-icmp from fe80::/10 to fe80::/10 00800 0 0 allow ipv6-icmp from fe80::/10 to ff02::/16 00900 0 0 allow ipv6-icmp from any to any ip6 icmp6types 1 01000 0 0 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136 65000 734630742 621499874050 allow ip from any to any 65535 9 589 deny ip from any to any 

那么从192.168.200.0/24机器到另一个机器192.168 / 16的跟踪路由是什么样子的:路由器是在路由器结束还是在吃其他东西?

如果它在路由器上结束,请尝试调出ipfw的详细程度(使用pf你可以在drop / deny规则中添加一个日志选项)。