【华为实验】华为S2300交换机端口镜像配置

【华为实验】华为S2300交换机端口镜像配置_第1张图片

01

什么是端口镜像?

端口镜像(port Mirroring)功能通过在交换机或路由器上,将一个或多个源端口的数据流量转发到某一个指定端口来实现对网络的监听,指定端口称之为“镜像端口”或“目的端口”,在不严重影响源端口正常吞吐流量的情况下,可以通过镜像端口对网络的流量进行监控分析。在企业中用镜像功能,可以很好地对企业内部的网络数据进行监控管理,在网络出故障的时候,可以快速地定位故障。

02

关键配置

#设置观察口(接缓存的镜像口)

 observe-port 1 interface Ethernet0/0/24   

#接路由LAN口,将数据镜像到镜像口

  interface GigabitEthernet0/0/1

    port link-type trunk port trunk allow-pass vlan 2 to 4094 port-mirroring to observe-port 1 inbound port-mirroring to observe-port 1 outbound

#接缓存的管理口,允许所有VLAN访问

 interface GigabitEthernet0/0/2

port link-type trunk port trunk allow-pass vlan 2 to 4094 loopback-detect enable

完整配置如下:

  # telnet passwd: huawei

  [Quidway]display cu

  #

  !Software Version V100R006C03

  sysname Quidway

  #

  vlan batch 2 to 99 101 to 199 201 to 4094

  #

  undo http server enable

  #观察口(接缓存的镜像口)

  observe-port 1 interface Ethernet0/0/24

  #

  aaa

  authentication-scheme default

  authorization-scheme default

  accounting-scheme default

  domain default

  domain default_admin

  local-user admin password cipher %$%$I6.ASV)hJET,p"Dn.YM%3aXO%$%$

  local-user admin service-type http

  #

  interface Vlanif1

  ip address 172.16.1.253 255.255.255.0

  #

  interface Ethernet0/0/1

  port link-type access

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/2

  port link-type access

  port default vlan 2

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/3

  port link-type access

  port default vlan 3

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/4

  port link-type access

  port default vlan 4

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/5

  port link-type access

  port default vlan 5

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/6

  port link-type access

  port default vlan 6

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/7

  port link-type access

  port default vlan 7

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/8

  port link-type access

  port default vlan 8

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/9

  port link-type access

  port default vlan 9

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/10

  port link-type access

  port default vlan 10

  loopback-detect enable

  #

  interface Ethernet0/0/11

  port link-type access

  port default vlan 11

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/12

  port link-type access

  port default vlan 12

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/13

  port link-type access

  port default vlan 13

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/14

  port link-type access

  port default vlan 14

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/15

  port link-type access

  port default vlan 15

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/16

  port link-type access

  port default vlan 16

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/17

  port link-type access

  port default vlan 26

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/18

  port link-type access

  port default vlan 18

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/19

  port link-type access

  port default vlan 19

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/20

  port link-type access

  port default vlan 20

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/21

  port link-type access

  port default vlan 21

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/22

  port link-type access

  port default vlan 22

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/23

  port link-type access

  port default vlan 23

  loopback-detect enable

  port-isolate enable group 1

  #

  interface Ethernet0/0/24

  port link-type access

  loopback-detect enable

  port-isolate enable group 1

  #接路由LAN口,将数据镜像到镜像口

  interface GigabitEthernet0/0/1

  port link-type trunk

  port trunk allow-pass vlan 2 to 4094

  port-mirroring to observe-port 1 inbound

  port-mirroring to observe-port 1 outbound

  #接缓存的管理口,允许所有VLAN访问

  interface GigabitEthernet0/0/2

  port link-type trunk

  port trunk allow-pass vlan 2 to 4094

  loopback-detect enable

【华为实验】华为S2300交换机端口镜像配置_第2张图片

你可能感兴趣的:(【华为实验】华为S2300交换机端口镜像配置)