H3C沟通机做端口镜像办法汇总
一、端口镜像概念:
Port Mirror(端口镜像)是用于进行网络功用监测。能够这么了解:在端口A 和端口B 之间树立镜像联络,这么,经过端口A 传输的数据将一同复制到端口B ,以便于在端口B 上联接的剖析仪或许剖析软件进行功用剖析或缺点差异。
二、端口镜像装备
『环境装备参数』
1. PC1接在沟通机E0/1端口,IP地址1.1.1.1/24
2. PC2接在沟通机E0/2端口,IP地址2.2.2.2/24
3. E0/24为沟通机上行端口
4. Server接在沟通机E0/8端口,该端口作为镜像端口
『组网需求』
1. 经过沟通机端口镜像的功用运用server对两台pc的事务报文进行监控。
2. 依照镜像的纷歧样办法进行装备:
1) 依据端口的镜像
2) 依据流的镜像
2 数据装备进程
『端口镜像的数据流程』
依据端口的镜像是把被镜像端口的进出数据报文彻底复制一份到镜像端口,这么来进行流量观测或许缺点定位。
【3026等沟通机镜像】
S2008/S2016/S2026/S2403H/S3026等沟通机支撑的都是依据端口的镜像,有两种办法:
办法一
1. 装备镜像(观测)端口
[SwitchA]monitor-port e0/8
2. 装备被镜像端口
[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2
办法二
1. 能够一次性界说镜像和被镜像端口
[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2 observing-port Ethernet 0/8
【8016沟通机端口镜像装备】
1. 假定8016沟通机镜像端口为E1/0/15,被镜像端口为E1/0/0,设置端口1/0/15为端口镜像的观测端口。
[SwitchA] port monitor ethernet 1/0/15
2. 设置端口1/0/0为被镜像端口,对其输入输出数据都进行镜像。
[SwitchA] port mirroring ethernet 1/0/0 both ethernet 1/0/15
也能够经过两个纷歧样的端口,对输入和输出的数据别离镜像
1. 设置E1/0/15和E2/0/0为镜像(观测)端口
[SwitchA] port monitor ethernet 1/0/15
2. 设置端口1/0/0为被镜像端口,别离运用E1/0/15和E2/0/0对输入和输出数据进行镜像。
[SwitchA] port mirroring gigabitethernet 1/0/0 ingress ethernet 1/0/15
[SwitchA] port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0
『依据流镜像的数据流程』
依据流镜像的沟通机关于某些流进行镜像,每个联接都有两个方向的数据流,关于沟通机来说这两个数据流是要分隔镜像的。
【3500/3026E/3026F/3050】
〖依据三层流的镜像〗
1. 界说一条拓宽拜访操控列表
[SwitchA]acl num 100
2. 界说一条规矩报文源地址为1.1.1.1/32去往悉数意图地址
[SwitchA-acl-adv-101]rule 0 permit ip source 1.1.1.1 0 destination any
3. 界说一条规矩报文源地址为悉数源地址意图地址为1.1.1.1/32
[SwitchA-acl-adv-101]rule 1 permit ip source any destination 1.1.1.1 0
4. 将契合上述ACL规矩的报文镜像到E0/8端口
[SwitchA]mirrored-to ip-group 100 interface e0/8
〖依据二层流的镜像〗
1. 界说一个ACL
[SwitchA]acl num 200
2. 界说一个规矩从E0/1发送至其它悉数端口的数据包
[SwitchA]rule 0 permit ingress interface Ethernet0/1 egress interface Ethernet0/2
3. 界说一个规矩从其它悉数端口到E0/1端口的数据包
[SwitchA]rule 1 permit ingress interface Ethernet0/2 egress interface Ethernet0/1
4. 将契合上述ACL的数据包镜像到E0/8
[SwitchA]mirrored-to link-group 200 interface e0/8
【5516/6506/6503/6506R】
如今该三款商品支撑对入端口流量进行镜像
1. 界说镜像端口
[SwitchA]monitor-port Ethernet 3/0/2
2. 界说被镜像端口
[SwitchA]mirroring-port Ethernet 3/0/1 inbound
【赔偿阐明】
1. 镜像通常都能够完毕高速率端口镜像低速率端口,例如1000M端口能够镜像100M端口,反之则无法完毕
2. 8016支撑跨单板端口镜像端口镜像装备
『环境装备参数』
1. PC1接在沟通机E0/1端口,IP地址1.1.1.1/24
2. PC2接在沟通机E0/2端口,IP地址2.2.2.2/24
3. E0/24为沟通机上行端口
4. Server接在沟通机E0/8端口,该端口作为镜像端口
『组网需求』
1. 经过沟通机端口镜像的功用运用server对两台pc的事务报文进行监控。
2. 依照镜像的纷歧样办法进行装备:
1) 依据端口的镜像
2) 依据流的镜像
2 数据装备进程
『端口镜像的数据流程』
依据端口的镜像是把被镜像端口的进出数据报文彻底复制一份到镜像端口,这么来进行流量观测或许缺点定位。
【3026等沟通机镜像】
S2008/S2016/S2026/S2403H/S3026等沟通机支撑的都是依据端口的镜像,有两种办法:
办法一
1. 装备镜像(观测)端口
[SwitchA]monitor-port e0/8
2. 装备被镜像端口
[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2
办法二
1. 能够一次性界说镜像和被镜像端口
[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2 observing-port Ethernet 0/8
【8016沟通机端口镜像装备】
1. 假定8016沟通机镜像端口为E1/0/15,被镜像端口为E1/0/0,设置端口1/0/15为端口镜像的观测端口。
[SwitchA] port monitor ethernet 1/0/15
2. 设置端口1/0/0为被镜像端口,对其输入输出数据都进行镜像。
[SwitchA] port mirroring ethernet 1/0/0 both ethernet 1/0/15
也能够经过两个纷歧样的端口,对输入和输出的数据别离镜像
1. 设置E1/0/15和E2/0/0为镜像(观测)端口
[SwitchA] port monitor ethernet 1/0/15
2. 设置端口1/0/0为被镜像端口,别离运用E1/0/15和E2/0/0对输入和输出数据进行镜像。
[SwitchA] port mirroring gigabitethernet 1/0/0 ingress ethernet 1/0/15
[SwitchA] port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0
『依据流镜像的数据流程』
依据流镜像的沟通机关于某些流进行镜像,每个联接都有两个方向的数据流,关于沟通机来说这两个数据流是要分隔镜像的。
【3500/3026E/3026F/3050】
〖依据三层流的镜像〗
1. 界说一条拓宽拜访操控列表
[SwitchA]acl num 100
2. 界说一条规矩报文源地址为1.1.1.1/32去往悉数意图地址
[SwitchA-acl-adv-101]rule 0 permit ip source 1.1.1.1 0 destination any
3. 界说一条规矩报文源地址为悉数源地址意图地址为1.1.1.1/32
[SwitchA-acl-adv-101]rule 1 permit ip source any destination 1.1.1.1 0
4. 将契合上述ACL规矩的报文镜像到E0/8端口
[SwitchA]mirrored-to ip-group 100 interface e0/8
〖依据二层流的镜像〗
1. 界说一个ACL
[SwitchA]acl num 200
2. 界说一个规矩从E0/1发送至其它悉数端口的数据包
[SwitchA]rule 0 permit ingress interface Ethernet0/1 egress interface Ethernet0/2
3. 界说一个规矩从其它悉数端口到E0/1端口的数据包
[SwitchA]rule 1 permit ingress interface Ethernet0/2 egress interface Ethernet0/1
4. 将契合上述ACL的数据包镜像到E0/8
[SwitchA]mirrored-to link-group 200 interface e0/8
【5516/6506/6503/6506R】
如今该三款商品支撑对入端口流量进行镜像
1. 界说镜像端口
[SwitchA]monitor-port Ethernet 3/0/2
2. 界说被镜像端口
[SwitchA]mirroring-port Ethernet 3/0/1 inbound
下一篇:中国GSM频率装备规矩