<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>网络运维 on MeerStory</title><link>https://linux.meerstory.com/zh/categories/%E7%BD%91%E7%BB%9C%E8%BF%90%E7%BB%B4/</link><description>Recent content in 网络运维 on MeerStory</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Wed, 14 Oct 2026 01:45:51 +0900</lastBuildDate><atom:link href="https://linux.meerstory.com/zh/categories/%E7%BD%91%E7%BB%9C%E8%BF%90%E7%BB%B4/index.xml" rel="self" type="application/rss+xml"/><item><title>Ubuntu bridge 命令实战：网络桥接状态排查与输出深度解析</title><link>https://linux.meerstory.com/zh/ubuntu/20261014_014506_65/</link><pubDate>Wed, 14 Oct 2026 01:45:51 +0900</pubDate><guid>https://linux.meerstory.com/zh/ubuntu/20261014_014506_65/</guid><description>&lt;h2 id="概述">概述&lt;/h2>
&lt;p>在现代 Ubuntu 及各类 Linux 系统中，&lt;code>iproute2&lt;/code> 套件内置的 &lt;code>bridge&lt;/code> 工具是运维工程师洞察网络虚拟桥接链路不可或缺的核心利器。本文将通过一套完整的实验流程，深入讲解如何快速搭建虚拟网桥环境，并针对端口绑定属性、MAC 地址转发表（FDB）流向判定以及基于 802.1Q 的 VLAN 过滤规则展开细致的实操分析与回显解读。&lt;/p>
&lt;h2 id="1-搭建测试网桥与检查端口关联状态bridge-link">1. 搭建测试网桥与检查端口关联状态（bridge link）&lt;/h2>
&lt;p>要运行 &lt;code>bridge&lt;/code> 命令集，系统底层必须具备完整的网络协议栈管理组件。我们首先更新本地源并补全 &lt;code>iproute2&lt;/code> 工具包：&lt;/p>
&lt;p>&lt;img src="https://linux.meerstory.com/ubuntu/20261014_014506_65/captures/s01_c01_apt-get_update_-qq____apt-get_install_-y_iproute2.png"
 alt="apt-get update -qq &amp;amp;&amp;amp; apt-get install -y iproute2"
 
 loading="lazy"
 decoding="async"
 style="max-width: 100%; height: auto;">


&lt;/p>
&lt;p>接着创建名为 &lt;code>br0&lt;/code> 的虚拟网桥设备，并通过拉高接口状态使其具备数据转发能力：&lt;/p>
&lt;p>&lt;img src="https://linux.meerstory.com/ubuntu/20261014_014506_65/captures/s01_c02_ip_link_add_br0_type_bridge____ip_link_set_br0_up.png"
 alt="ip link add br0 type bridge &amp;amp;&amp;amp; ip link set br0 up"
 
 loading="lazy"
 decoding="async"
 style="max-width: 100%; height: auto;">


&lt;/p>
&lt;p>为了模拟物理链路或容器环境中的通信接入点，接下来建立一组相互连通的虚拟以太网端口配对（veth pair）：&lt;/p>
&lt;p>&lt;img src="https://linux.meerstory.com/ubuntu/20261014_014506_65/captures/s01_c03_ip_link_add_veth0_type_veth_peer_name_veth1.png"
 alt="ip link add veth0 type veth peer name veth1"
 
 loading="lazy"
 decoding="async"
 style="max-width: 100%; height: auto;">


&lt;/p>
&lt;p>随后把 &lt;code>veth0&lt;/code> 挂载到主桥 &lt;code>br0&lt;/code> 之下充当接入端口，同时将该端口正式置于工作状态：&lt;/p></description></item></channel></rss>