AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1685726
Accepted
BitShift
BitShift
Asked: 2021-11-06 03:29:44 +0800 CST2021-11-06 03:29:44 +0800 CST 2021-11-06 03:29:44 +0800 CST

L3 交换机和防火墙之间的静态路由问题

  • 772

问题

在 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)。


系统和网络图

下面是网络图: 网络图

...这是一些配置截图

Edgecore(L3交换机):

系统路由表

路由表

静态路由

静态路由

VLAN 10 SVI

VLAN 10 SVI

VLAN 100 SVI

VLAN 100 SVI

设备端口

设备端口

切换到防火墙端口

切换到防火墙端口

此交换机上的所有 VLAN

VLAN


OPNsense 防火墙:

NAT表

NAT

VLAN 100 防火墙规则

VLAN 100 防火墙规则

返回 VLAN 的静态路由

在此处输入图像描述

VLAN_100_STATIC 接口

在此处输入图像描述

networking routing
  • 1 1 个回答
  • 198 Views

1 个回答

  • Voted
  1. Best Answer
    BitShift
    2021-11-06T07:36:51+08:002021-11-06T07:36:51+08:00

    编辑:

    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:

    1. 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

    2. 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.

    3. Tagged port 1 of the L3 switch with all of the VLAN tags (10-50).

    4. Removed all the static routes from the firewall.

    5. Removed vlan 100 as it's now superfluous


    Config breakdown:

    • Port 1 has all VLANS
    • Any port which I want to assign to a VLAN gets that VLAN
    • 每个 VLAN 在交换机 (10.0.x.200) 上也有一个 SVI,在防火墙 (10.0.x.1) 上也有一个看似对应的 SVI,交换机上的 SVI 是相应 VLAN 上设备的默认 GW
    • 交换机的默认 GW 是防火墙的 LAN 接口 (0.0.0.0 -> 10.0.0.254)
    • 防火墙中没有静态路由
    • 每个 VLAN 接口的防火墙规则都不存在,一切似乎都通过 LAN 接口防火墙规则处理

    很困惑。它有效,这很好,但我不喜欢它。

    任何对这里发生的事情有一些了解的人,我将非常感谢您的澄清。

    • 0

相关问题

  • 三台电脑,没有路由器/交换机怎么组网?

  • 用户使用 FileZilla 连接到 SFTP 服务器拒绝连接

  • NAT 后面的 NAT 如何工作(路由器的 NAT 和 ISP 的 NAT)?

  • Win10 1803:如何让移动热点成为专用网络?

  • nc如何识别服务名称

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve