为什么要做端口镜像
如果我们要查看生产一个或者多个接口的端口数据信息,我们不可能将光纤或者网线直接拔下来来抓包吧。如果这样,你就等着问责吧,锅肯定是你的。哈哈…… 如果我们将需要分析的端口的流量复制到没有使用的端口呢?这就是端口镜像
配置
其实配置有很多的。我这里只列举最简单的,原理其实一样。譬如远程span,可能不同的厂商不同,需要自行查看doc哦。
- Cisco系列
monitor session 1 source interface Fa0/1 - 2
monitor session 1 destination interface Gi0/4
- HuaWei
#单个口
observe-port 1 interface GigabitEthernet 0/0/24 观察24口
interface g0/0/23
port-mirroring to observe-port 1 {both | inbound | outbound}
#多个口
observe-port 1 interface GigabitEthernet 0/0/24 观察24口
port-group 1
group-mumber GigabitEthernet 0/0/11 to GigabitEthernet 0/0/15
port-mirroring to observe-port 1 {both | inbound | outbound}
-H3C
mirroring-group 1 local
mirroring-group 1 monitor-port g0/1
mirroring-group 1 mirroring-port G0/48 both
-Juniper
这里说下,junpier不同型号的端口镜像差别还是蛮大的。这里只列举了一种。
set ethernet-switching-options analyzer jingx input ingress interface ge-0/0/0
set ethernet-switching-options analyzer jingx input egress interface ge-0/0/0
set ethernet-switching-options analyzer jingx output interface ge-0/0/23
博客介绍了端口镜像的作用,即当需要查看生产接口的端口数据信息时,可将需分析端口的流量复制到未使用端口,避免直接拔线抓包。同时还列举了Cisco、HuaWei、H3C、Juniper等系列的简单配置,指出不同厂商及型号配置可能有差异。
1332

被折叠的 条评论
为什么被折叠?



