The bridge-domain command associates a Layer 2 sub-interface with a BD.
The undo bridge-domain command restores the default settings.
By default, no Layer 2 sub-interface is associated with a BD.
Parameter | Description | Value |
---|---|---|
bd-id | Specifies the ID of the BD that is associated with a Layer 2 sub-interface. |
The value is an integer that ranges from 1 to 16777215. |
Usage Scenario
VXLAN needs to be deployed on a downlink interface to provide access services and an uplink interface to establish a VXLAN tunnel.
To create a BD based on encapsulation mode, create a Layer 2 sub-interface first. Then run the encapsulation (Layer 2 sub-interface view) command to configure a supported encapsulation mode on the sub-interface. After you run the bridge-domain (Layer 2 sub-interface view) command to associate a Layer 2 sub-interface with a BD, packets containing the same VLAN tag from different LANs can communicate at Layer 2.
Prerequisites
Run the command bridge-domain to create the BD.
Run the command interface to create the Layer 2 VXLAN sub-interface.
Precautions
One Layer 2 sub-interface can be associated with only one BD.
For the BD that bind to the Layer 2 sub-interfaces which use dot1q encapsulation, the VBDIF interface of this BD cannot be created on the device.
<HUAWEI> system-view [HUAWEI] bridge-domain 10 [HUAWEI-bd10] quit [HUAWEI] interface GigabitEthernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type hybrid [HUAWEI-GigabitEthernet0/0/1] quit [HUAWEI] interface gigabitethernet 0/0/1.1 mode l2 [HUAWEI-GigabitEthernet0/0/1.1] bridge-domain 10