SW上配置
1.一个端口镜像到一个端口
观察端口
[SW]observe-port 1 interface GigabitEthernet 0/0/4
被镜像端口
[SW]interfaceGigabitEthernet 0/0/23
[[SW]-GigabitEthernet0/0/23]port-mirroring to observe-port 1 {both | inbound | outbound}
2.多端口镜像 1到5口镜像到4口
[SW]port-group 1
[SW-port-group-1]group-mumber GigabitEthernet 0/0/1 to GigabitEthernet 0/0/5
[SW-port-group-1]port-mirroring to observe-port 1 {both | inbound | outbound} //both进出流量
3.VLAN镜像
[SW]vlan 2
[SW-vlan2]mirroring to observe-port 1 inbound
display observe-port //查看上步所配置的管理口是否配置成功
路由器上配置