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.
The management interface cannot be configured as an observing port.
Procedure
- Configure local observing ports.
Configuration
Procedure
Configure a single local observing port.
- Run the system-view command to enter the system view.
- Run the observe-port [ observe-port-index ] interface interface-type interface-number [ untag-packet ] command to configure a single local observing port.
(Recommended) Run the observe-port observe-port-index forwarding disable command to disable the specified observing port from forwarding data packets.
By default, an observing port forwards data packets.
Configure a local 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-8> [ untag-packet ] command to configure a local observing port group.
- (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 local observing port group.
(Recommended) Run the observe-port observe-port-index forwarding disable command to disable the specified observing port from forwarding data packets.
By default, an observing port forwards data packets.
- 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.
(Recommended) Run the observe-port observe-port-index forwarding disable command to disable the specified observing port from forwarding data packets.
By default, an observing port forwards data packets.
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-8> vlan vlan-id command to configure a Layer 2 remote observing port group and specify the Layer 2 remote mirroring VLAN.
- (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.
(Recommended) Run the observe-port observe-port-index forwarding disable command to disable the specified observing port from forwarding data packets.
By default, an observing port forwards data packets.
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 Forwarding : Yes Interface : GigabitEthernet1/0/1 ---------------------------------------------------------------------- Index : 2 Untag-packet : No Forwarding : Yes Interface-range: GigabitEthernet1/0/2 Vlan : 20 ---------------------------------------------------------------------- Index : 3 Untag-packet : No Forwarding : Yes Interface-range: GigabitEthernet1/0/3 to GigabitEthernet1/0/5 ----------------------------------------------------------------------