问题
在 L3 EdgeCore ECS4620-28P 和 OPNSense 防火墙之间获得一些非常简单的静态路由时,我遇到了相当大的问题。我想从 L3 交换机上的 VLAN 路由到我的防火墙,但让 L3 交换机在必要时处理 VLAN 间路由。
编辑:已知的工作
特别奇怪的是,我的防火墙可以 ping 我的工作站,但我无法 ping 到防火墙或访问互联网。
VLAN
我在设备网络的 L3 交换机上有 5 个 VLAN,标记为:
- 10
- 20
- 30
- 40
- 50
路由接口加一,标记为:
- 100
现在我只是在 VLAN 10 上测试一台机器的连接性,假设跨其他 VLAN 的配置复制将反映功能。
到目前为止,如果我用相应的 VLAN 标记当前的访问端口,我可以访问 10.0.0.254 的防火墙和交换机上的各种 SVI (10.0.x.200)。
系统和网络图
...这是一些配置截图
编辑:
I've revisited this after a while to setup my rules and actually configure my firewall properly. As it turns out, the traffic is indeed being routed through to the LAN interface and not the VLAN interfaces. This is irrelevant however, as the VLAN interfaces created on the OPNsense firewall merely exist so the firewall can recognise the tagged traffic.
In actual fact, I can assign a SOURCE address or net as that of a VLAN on the LAN firewall list. Meanwhile the firewall rules on ALL of the VLAN interfaces created on the firewall are irrelevant and thus not created. The only rules necessary are those created on the LAN interface (the destination of the default route from the L3 switch).
e.g. ACCEPT -> (source) VLAN_10_DHCP -> (destination) ANY -> (gateway) WAN
Here is a visual example:
OK so I have solved the problem and now even more confused than before.
I have changed a few things:
I made the default route in the L3 switch, point to the LAN interface of the firewall, not the virtual interface but the physical address: 10.0.0.254
Despite #1, I still have to create VLAN interfaces in the firewall for all the VLANs on the L3 switch and assign an SVI with ip address. In this case I chose 10.0.x.1 though I suspect it wouldn't matter what the actual ip address is at that interface.
Tagged port 1 of the L3 switch with all of the VLAN tags (10-50).
Removed all the static routes from the firewall.
Removed vlan 100 as it's now superfluous
Config breakdown:
很困惑。它有效,这很好,但我不喜欢它。
任何对这里发生的事情有一些了解的人,我将非常感谢您的澄清。