Configuration ideas
1. Configure the ETHERNET0/0/20 interface as an observation port (monitoring port )
2. Configure the ETHERNET0/0/1----ETHERNET0/0/10 interface as a mirrored port
Configuration steps
1. Configure the observation port
<Switch> System-view
[Switch] Observe-port 1 Interface gigabitethernet 0/0/20
Command format:
Observe-port index interface interface-type interface-number [ VLAN Vlan-id ]
Parameter description:
Parameters |
Parameter description |
Take value |
index |
Specifies the index of the viewing interface. |
s5300ei Series products Value range Span lang= "en-us" xml:lang= "en-US" >1~4. s5300si Series product value 1. |
interface-type interface-number |
specify s5300 the interface type and interface number on the device, interface type gigabitethernet and xgigabitethernet. |
- |
VLAN Vlan-id |
Used to specify a remote mirroring VLAN. IP mode, the configured Vlan-id is used to add tags to the two-layer header of the GRE tunnel . |
In integer form, the value range is 1~4094. |
When you configure the watch port, if you do not specify a VLAN, the type of the observed port is local mirroring, and if you specify a VLAN, the type of the watch port is the remote mirror.
2. Configure the Mirror Port
#将ETHERNET0/0/1----ETHERNET0/0/10 interface is configured as a mirrored port
[Switch] Interface gigabitethernet 0/0/1
[SWITCH-ETHERNET0/0/1] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/2
[SWITCH-ETHERNET0/0/2] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/3
[SWITCH-ETHERNET0/0/3] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/4
[SWITCH-ETHERNET0/0/4] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/5
[SWITCH-ETHERNET0/0/5] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/6
[SWITCH-ETHERNET0/0/6] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/7
[SWITCH-ETHERNET0/0/7] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/8
[SWITCH-ETHERNET0/0/8] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/9
[SWITCH-ETHERNET0/0/9] port-mirroring to Observe-port 1 both
[Switch] Interface gigabitethernet 0/0/10
[SWITCH-ETHERNET0/0/10] port-mirroring to Observe-port 1 both
Command format:
port-mirroring to Observe-port index { both | Inbound | Outbound }
Parameter description:
Parameters |
Parameter description |
Take value |
Index |
Represents the index of the global Watch interface. |
The value range of the S5300ei series is 1~4. The S5300SI series products are valued at 1. |
Both |
Supports out /in dual-direction interface mirroring. |
- |
3. Check the configuration results
Viewing the usage of observation ports |
Display Observe-port |
View the interface image Information list |
Display port-mirroring |
View Switch again the configuration file
[Switch] Dis Curr
Huawei S5300 Switch Configuration interface-based local port mirroring