大网数据广告活动
Windows排障命令

netsh bridge

· 52CE 我爱测

The netsh bridge command manages network adapter bridge settings to combine two or more network segments as one network in Windows.

The netsh bridge command configures network adapter bridge settings in Windows. By creating a network bridge, you can link two or more network segments, allowing devices on separate segments to communicate seamlessly as if they're part of a single network.

Syntax

netsh bridge [add | create | destroy | dump | help | list | remove | set | show | ?]
netsh bridge add <Adapter ID> to <Bridge GUID>
netsh bridge create [<Adapter ID #1> <Adapter ID #2>]
netsh bridge destroy <Bridge GUID>
netsh bridge list
netsh bridge remove <Adapter ID> from <Bridge GUID>
netsh bridge remove all from <Bridge GUID>
netsh bridge set adapter [id=]<integer> [[forcecompatmode=]enable|disable]
netsh bridge show adapter

Parameters

Command Description
bridge add Adds a network adapter, specified by its Adapter ID, to an existing bridge identified by its Bridge GUID.
bridge create Creates a new network bridge that includes two specified network adapters. The newly created bridge is assigned its own unique GUID, which can be retrieved using the netsh bridge list command.
bridge destroy Removes all network adapters from the specified bridge, identified by its bridge GUID, and deletes the bridge.
bridge dump Creates a script containing the current context configuration. The script can be saved to a file and used to restore settings if they're altered or need to be replicated on another system.
bridge list Displays all the created bridges that are uniquely identified by the bridge GUID.
bridge remove Removes a network adapter, specified by its Adapter ID, from a bridge identified by its Bridge GUID. Using the all parameter removes all network adapters from the specified bridge and deletes the bridge.
bridge set adapter Modifies the bridge configuration for the specified adapter. id - The identifier of the network adapter to configure. To view available adapter IDs, use the netsh bridge show adapter command. forcecompatmode - Specifies whether to enable or disable Layer 3 compatibility mode for the adapter: - enable: Turns on Layer 3 mode. - disable: Turns off Layer 3 mode.
bridge show adapter Displays a list of all available network adapters, including their Adapter IDs, current settings, and status flags, indicating which adapters can participate in a network bridge.
help or ? Displays a list of commands and their descriptions in the current context.

Examples

To add a network adapter (Adapter ID 3) to an existing bridge, with Bridge GUID {12345678-ABCD-EF01-2345-6789ABCDEF03}, run the following command:

netsh bridge add adapter=3 bridge={12345678-ABCD-EF01-2345-6789ABCDEF03}

To create a new network bridge with two adapters (Adapter ID 1 and Adapter ID 2), run the following command:**

netsh bridge create adapter=1 adapter=2

To destroy a bridge and remove all its adapters (Bridge GUID {12345678-ABCD-EF01-2345-6789ABCDEF02}), run the following command:

netsh bridge destroy bridge={12345678-ABCD-EF01-2345-6789ABCDEF02}

To display all created network bridges and their GUIDs, run the following command:

netsh bridge list

To remove a network adapter (Adapter ID 2) from an existing bridge, with Bridge GUID {12345678-ABCD-EF01-2345-6789ABCDEF02}, run the following command:

netsh bridge remove adapter=2 bridge={12345678-ABCD-EF01-2345-6789ABCDEF02}

To display all available network adapters, run the following command:

netsh bridge show adapter

To modify an adapter (Adapter ID 1) in a bridge to enable Layer 3 compatibility mode, run the following command:

netsh bridge set adapter id=1 forcecompatmode=enable

See also

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/10/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。