Configuring Observing Ports
Context
You must dedicate observing ports for mirroring use and do not configure other services on them to prevent mirrored traffic and other service traffic from affecting each other.
- Configure a single observing port.
- Configure an observing port group. This method 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.
Only S5720EI, S5720HI, S5730HI, S6720EI, S6720HI, and S6720S-EI support the configuration of an observing port group.
The management interface cannot be configured as an observing port.
Procedure
- Configure local observing ports.
- Configure Layer 2 remote observing ports.
Configuration Command Configure a single Layer 2 remote observing port. - Run the system-view command to enter the system view.
- Run the observe-port [ observe-port-index ] interface interface-type interface-number vlan vlan-id command to configure a single Layer 2 remote observing port and specify the Layer 2 remote mirroring VLAN.
Configure a Layer 2 remote observing port group. - Run the system-view command to enter the system view.
Run the observe-port [ observe-port-index ] interface-range { interface-type interface-number [ to interface-type interface-number ] } &<1-n> vlan vlan-id command to configure a Layer 2 remote observing port group and specify the Layer 2 remote mirroring VLAN.
In &<1-n>, n is 4 on S5720EI, S6720EI, and S6720S-EI or 8 on S5720HI, S5730HI, and S6720HI.
- (Optional) Run the observe-port observe-port-index interface-range { add | delete } interface-type interface-number command to add or delete specified observing ports to or from the Layer 2 remote observing port group.
Verifying the Configuration
# Run the display observe-port command to view the observing port configuration. The following is a sample command output.
<HUAWEI> display observe-port ---------------------------------------------------------------------- Index : 1 Untag-packet : No Interface : GigabitEthernet0/0/1 ---------------------------------------------------------------------- Index : 2 Untag-packet : No Interface-range: GigabitEthernet0/0/2 Vlan : 20 ---------------------------------------------------------------------- Index : 3 Untag-packet : No Interface-range: GigabitEthernet0/0/3 to GigabitEthernet0/0/5 ----------------------------------------------------------------------