HUAWEI&CISCO交换机端口镜像配置指导

    [晴 September 11, 2007 11:29 | by ]
PS:昨天在搞那个 Cisco 2950 ,要做端口镜像,这东西以前都没搞过..
1. Quidway 3026端口镜像配置方法:

以下例子中,镜像端口为e0/18,被镜像端口为e0/3,输入如下命令配置镜像:

 配置镜像端口:

Quidway(config)#monitor-port e 0/18(e0/18作为镜像端口)

 配置被镜像端口:

Quidway(config)#monitor e 0/3(e0/3 为被镜像端口)

 上述两条命令与以下一条命令等效:

Quidway(config)#monitor e 0/3 observing-port e0/18

 查看镜像端口信息:

Quidway#show monitor(察看镜像端口信息)

Information about monitor port(s)

The observing port : Ethernet0/18

The monitored ports: Ethernet0/3

以上端口镜像配置方法适用于Quidway2008/2016/3026/2403H交换机。

2. Quidway 3526端口镜像配置方法:

3526交换机提供基于流规则的镜像,配置方法与Quidway 3026不同。以下例子中,镜像端口e0/24,被镜像端口e0/1:

 首先定义用来监控的端口:

Quidway(config)#monitor-port Ethernet 0/24,定义用0/24口做为监控端口;

 定义流分类规则:

因为3526交换机提供基于流规则的镜像,因此要定义流分类规则(若要监控Ethernet0/1的双向业务流则需配置下面两条流分类命令,若只需监控单方向的业务流选择其中之一即可):

将从Ethernet0/1输出的业务流镜像到监控端口:

Quidway(config)#rule-map l2 rule1 ingress Ethernet 0/1 egress any,

其中rule1是自定义的rule名字,any是定义对端口Ethernet0/1的所有出业务流进行监控;

将从Ethernet0/1输入的业务流镜像到监控端口:

Quidway(config)#rule-map l2 rule2 ingress any egress Ethernet 0/1,

其中any是定义对端口Ethernet0/1的所有入业务流进行监控。

注:两个规则不可同名,否则后配的规则会覆盖先配的规则;

ingress、egress流量方向如图一所示。

 定义流的动作:

对流的动作预先定义好,以便在访问控制列表的定义中引用。

Quidway(config)#flow-action huawei monitor-port,其中huaweiwei为flow-action自定义的名字,monitor-port为定义镜像功能。

 定义访问控制列表ACL:

Quidway(config)#acl acl1 rule1 huawei,其中acl1为自定义的acl名字,同时定义访问控制列表acl1引用的流分类规则是rule1,引用的流规则是huawei。

激活ACL配置项:

Quidway(config)#access-group acl1。

3. Catalyst 2900XL端口镜像配置方法:

以下例子中,镜像端口f0/18端口,被镜像端口为f 0/22,输入命令如下:

2900#conf t(进入配置状态)

2900(config)#int f0/18(对f0/18端口进行配置)

2900(config-if)#port monitor f 0/22(对f 0/22端口进行镜像)

2900(config-if)#end(结束配置)

2900C#sh port monitor (察看当前镜像端口及被镜像端口)

Monitor Port Port Being Monitored

--------------------- ---------------------

FastEthernet0/18 FastEthernet0/22

4. Catalyst 4000系列(IOS*作系统)端口镜像配置方法:

以下例子中,镜像端口f5/1,被镜像端口为f 5/48,输入命令如下:

 配置被镜像端口:

Switch(config)# monitor session 1 source interface fastethernet 5/48

 配置镜像端口:

Switch(config)# monitor session 1 destination interface fastethernet 5/1

 校验:

Switch# show monitor session 1

Session 1

---------

Source Ports:

RX Only: None

TX Only: None

Both: f5/48

Source VLANs:

RX Only: none

TX Only: None

Both: None

Destination Ports:f5/1

Encapsulation: Native

Filter VLANs: None

5. Catalyst 4000系列(IOS*作系统)端口镜像配置方法:

镜像端口为1/1,被镜像端口为3/17,输入命令如下:

Switch (enable) set span ?

Usage: set span disable [dest_mod/dest_port|all]

set span

[rx|tx|both]

[inpkts ]

[multicast ]

[create]

(example of src_mod/src_ports: 2/1-4 or 2/1-2 or 2/5,2/6

example of src_vlans: 2-10,105)

Switch (enable) set span 3/17 1/1 both inpkts en (配置端口镜像)

Overwrote Port 1/1 to monitor transmit/receive traffic of Port 3/17

Incoming Packets enabled. Multicast enabled.

Switch (enable)show span(察看当前镜像端口及被镜像端口)

Destination : Port 1/1

Admin Source : Port 3/17

Oper Source : Port 3/17

Direction : transmit/receive

Incoming Packets: enabled

Multicast : enabled

Technology | Comments(0) | Trackbacks(0) | Reads(6784)
Add a comment
Emots
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
Enable HTML
Enable UBB
Enable Emots
Hidden
Nickname   Password   Optional
Site URI   Email   [Register]
               

Security code Case insensitive