| 场景 | 核心交换机抓包、跨机房取证 |
|---|---|
| 适用 | 支持远程镜像的交换机 |
| 命令族 | observe-port(跨设备)/ RSPAN / remote mirroring |
华为 VRP
华为 VRP
# 源设备:定义远程观察口(VLAN 方式)
[Huawei] observe-port 1 interface GigabitEthernet 0/0/24 vlan 999
[Huawei-GigabitEthernet0/0/1] mirror to observe-port 1 both
# 中间设备:Trunk 放通 VLAN 999;目的设备在 VLAN 999 内接观察口思科 IOS
思科 IOS
# 源设备
SW-A(config)# vlan 999
SW-A(config)# monitor session 1 source interface Gi1/0/1 both
SW-A(config)# monitor session 1 destination remote vlan 999
# 目的设备
SW-B(config)# monitor session 1 source remote vlan 999
SW-B(config)# monitor session 1 destination interface Gi1/0/24H3C Comware
H3C Comware
# 源设备(远程镜像组,VLAN 承载)
[H3C] mirroring-group 1 remote-source
[H3C] mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 both
[H3C] mirroring-group 1 remote-probe vlan 999 ! 形态随版本有差异RSPAN 类方案的公共要素:专用镜像 VLAN(全路径放通、非用户 VLAN)+ 源设备打标 + 目的设备解封装到观察口。华为用 observe-port ... vlan,思科 monitor session destination remote vlan,H3C 用 remote-source/remote-destination 组。