The observe-port command configures Layer 2 remote observing ports.
The undo observe-port command deletes Layer 2 remote observing ports.
By default, no Layer 2 remote observing ports are configured.
Configure a single Layer 2 remote observing port:
observe-port [ observe-port-index ] interface interface-type interface-number vlan vlan-id
Configure a Layer 2 remote observing port group:
observe-port [ observe-port-index ] interface-range { interface-type interface-number [ to interface-type interface-number ] } &<1-n> vlan vlan-id(Only supported by S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S; n in &<1-n> is 4 on an S5720-EI, S6720-EI, and S6720S-EI and 8 on an S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S.)
observe-port observe-port-index interface-range { add | delete } interface-type interface-number ( Only S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.)
undo observe-port observe-port-index
Parameter | Description | Value |
---|---|---|
observe-port-index |
Specifies the index of an observing port. |
The value is an integer. The value ranges from 1 to 8 on the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S, ranges from 1 to 4 on the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, and ranges from 1 to 6 on other devices. |
interface-type interface-number |
Specifies the type and number of an interface. |
- |
add |
Adds observing ports to the observing port group. |
- |
delete |
Deletes observing ports from the observing port group. |
- |
vlan vlan-id |
Specifies the Layer 2 remote mirroring VLAN. |
The value is an integer in the range from 1 to 4094. |
Usage Scenario
In Layer 2 remote mirroring, a monitoring device and the device where an observing port resides are connected through a Layer 2 network. The device where the observing port resides adds a specified VLAN tag to mirrored packets, and then the observing port broadcasts the mirrored packets in the Layer 2 remote mirroring VLAN so that the monitoring device can receive the mirrored packets. There are two modes for configuring observing ports: configure a single observing port and configure an observing port group. Observing port group is often used in 1:N mirroring to simplify the configuration and save observing port indexes. This is because an observing port group occupies only one observing port index regardless of how many ports are configured in the group.
Precautions
The management interface cannot be configured as an observing port.
# Configure GigabitEthernet0/0/1 as a Layer 2 remote observing port.
<HUAWEI> system-view [HUAWEI] observe-port 1 interface gigabitethernet 0/0/1 vlan 10
<HUAWEI> system-view [HUAWEI] observe-port 2 interface-range gigabitethernet 0/0/1 to gigabitethernet 0/0/3 vlan 10