交换机端口镜像:各型号交换机端口镜像配置思路方法和命令来源: 发布时间:星期四, 2009年2月12日 浏览:127次 评论:0
"Port Mirror"即端口镜像端口镜像为网络传输提供了备份通道此外还可以用于进行数据流量监测可以这样理解:在端口A和端口B的间建立镜像关系这样通过端口A传输数据将同时通过端口B传输即使端口A处因传输线路等问题造成数据还有端口B处数据是可用 Cisco交换机端口镜像配置 cisco交换机最多支持2组镜像支持所有端口镜像默认密码cisco Cisco catylist2820 有2个菜单选项 先进入menu选项enable port monitor 进入cli模式 en conf term erface fast0/x 镜像口 port monitor fast0/x 被镜像口 exit wr Cisco catylist2924、2948 Cisco catylist 3524、3548 Switch>En Switch#Conf term Switch(config)#Interface fast mod/port Switch(config-)#Port monitor mod/port Switch(config-)#Exit Switch(config)#Wr Cisco catylist 2550 Cisco catylist 3550 支持2组monitor session en password config term Switch(config)#monitor session 1 destination erface fast0/4(1为session idid范围为1-2) Switch(config)#monitor session 1 source erface fast0/1 , fast0/2 , fast0/3 (空格逗号空格) Switch(config)#exit Switch#copy running-conf startup-conf Switch#show port-monitor Cisco catylist 4000/5000系列 Cisco catylist 6000 系列 支持2组镜像 En Show module (确认端口所在模块) Set span source(mod/port) destination(mod/port) in|out|both inpkts enable Write tern all Show span 注:多个source:mod/port,mod/port-mod/port 连续端口用横杆“-”非连续端口用逗号“” span enable 允许镜像 span disable 禁止镜像 span source destination in|out|both inpkts enable create (create用于建立第 2组镜像) Huawei(华为)s2403h端口监听配置 en conf term monitor ethernet source_mod/port to ethernet source_mod/port obser ethernet dest_mod/port exit write show monitor-port 注:不可以将非连续端口作为souce如果镜像单个端口则不用to直接到obs ether 删除镜像 en conf t no monitort ethernet 源 to enternet 源 obser enternet 目 exit show monitor-port write huawei 6500 S6506_A>en Password: S6506_A# S6506_A#conf t Enter configuration commands, _disibledevent=> following ACL rule parameter values: protocol, source IP address, destination IP address, source port, destination port, and TOS. 3COM交换机端口镜像配置 在3COM交换机中端口镜像被称为“Roving Analysis”网络流量被监听端口称作“监听口”(Monitor Port)连接监听设备端口称作“分析口”(Analyzer Port) 以下命令配置端口镜像: ● 指定分析口 feature rovingAnalysis add或缩写 f r a 例如: Select menu option: feature rovingAnalysis add Select analysis slot: 1 Select analysis port: 2 ● 指定监听口并启动端口监听 feature rovingAnalysis start或缩写 f r sta 例如: Select menu option: feature rovingAnalysis start Select slot to monitor (1-12): 1 Select port to monitor (1-8): 3 ● 停止端口监听 feature rovingAnalysis stop或缩写 f r sto Intel交换机端口镜像配置 Intel称端口监听为“Mirror Ports” 网络流量被监听端口称作“源端口”(Source Port)连接监听设备端口称作“镜像口”(Mirror Port) 配置端口监听步骤如下: ● 在navigation菜单点击Statistics下Mirror Ports弹出Mirror Ports信息 ● 在Configure Source 列中点击端口来选择源端口弹出Mirror Ports Configuration ● 进行源端口设置: 源端口是镜像流量来源口镜像口是接收来自源端口流量端口 ● 点击Apply确定 可以选择 3种监听方式: 1.连续(Always):镜像全部流量 2.周期(Periodic):在定周期内镜像全部流量镜像周期在Sampling Interval configuration中设置 3.禁止(Disabled):关闭流量镜像 Avaya交换机端口镜像配置 在Avaya交换机用户手册中端口监听被称为“端口镜像”(Port Mirror) 以下命令配置端口监听: { |clear } Port Mirror 设置端口侦听: port mirror source-port mirror-port sampling { always | disable | periodic } [ max-packets-sec < max-packets-sec-value> ] [ piggyback-port ] 禁止端口监听:clear port mirror 命令中mod-port-range指定端口范围;mod-port-spec指定特定端口;piggyback-port指定双向镜像端口;sampling指定镜像周期;max-packets-sec仅在sampling设置为periodic时使用指定监听口每秒最多数据报数量 港湾flax24 Harbour(config)# Harbour(config)# config mirroring 1 add Add ports to mirroring group. delete Delete ports from mirroring group. disable Disable current mirroring group. to Apply port mirroring group. Harbour(config)# config mirroring 1 add port 5 (source) Harbour(config)# config mirroring 1 to 13 (target) Harbour(config)# show mirroring Port Mirror Configurations: Mirroring Group 1: Source Port: 5 Target Port: 13 Harbour(config)# save configuration Cisco交换机端口镜像配置 Catalyst 2900XL/3500XL/2950系列交换机端口镜像配置 以下命令配置端口监听: port monitor 例如F0/1和F0/2、F0/2同属VLAN1F0/1监听F0/2、F0/2端口: erface FastEthernet0/1 port monitor FastEthernet0/2 port monitor FastEthernet0/5 port monitor VLAN1 Catalyst 40005000and 6000系列交换机端口镜像配置 以下命令配置端口监听: span 例如模块6中端口1和端口2同属VLAN1端口3在VLAN2端口4和5在VLAN2端口2监听端口1和3、4、5 span 6/1,6/3-5 6/2 以下命令禁止端口监听: span disable [dest_mod/dest_port|all] cisco 3550 emi 端口镜像配置: 在配置模式进行配置 monitor session 1 source erface Fa0/15 monitor session 1 destination erface Fa0/14 注释:15端口是源端口(接外网端口)14端口是监视端口(安装上网管理软件Software电脑接在该端口 华为交换机端口镜像配置 端口镜像数据流程 基于端口镜像是把被镜像端口进出数据报文完全拷贝份到镜像端口这样来进行流量观测或者故障定位 【3026等交换机镜像】 S2008/S2016/S2026/S2403H/S3026等交换机支持都是基于端口镜像有两种思路方法: 思路方法 1. 配置镜像(观测)端口 [SwitchA]monitor-port e0/8 2. 配置被镜像端口 [SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2 思路方法 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】 〖基于 3层流镜像〗 1. 定义条扩展访问控制列表 [SwitchA]acl num 101 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 101 erface e0/8 〖基于 2层流镜像〗 1. 定义个ACL [SwitchA]acl num 200 2. 定义个规则从E0/1发送至其它所有端口数据包 [SwitchA]rule 0 permit ingress erface Ethernet0/1 (egress erface any) 3. 定义个规则从其它所有端口到E0/1端口数据包 [SwitchA]rule 1 permit (ingress erface any) egress erface Ethernet0/1 4. 将符合上述ACL数据包镜像到E0/8 [SwitchA]mirrored-to link-group 200 erface e0/8 【5516】支持对入端口流量进行镜像 配置端口Ethernet 3/0/1为监测端口对Ethernet 3/0/2端口入流量镜像 [SwitchA]mirror Ethernet 3/0/2 ingress-to Ethernet 3/0/1 【6506/6503/6506R】 目前该 3款产品只支持对入端口流量进行镜像虽然有outbount参数但是无法配置 镜像组名为1监测端口为Ethernet4/0/2端口Ethernet4/0/1入流量被镜像 [SwitchA]mirroring-group 1 inbound Ethernet4/0/1 mirrored-to Ethernet4/0/2 【补充介绍说明】 1. 镜像般都可以实现高速率端口镜像低速率端口例如1000M端口可以镜像100M端口反的则无法实现 2. 8016支持跨单板端口镜像 3 测试验证 在观测端口上通过工具软件Software可以看到被镜像端口相应报文可以进行流量观测或者故障定位 3COM交换机端口监听配置 在3COM交换机用户手册中端口监听被称为“Roving Analysis”网络流量被监听端口称作“监听口”(Monitor Port)连接监听设备端口称作“分析口”(Analyzer Port) 以下命令配置端口监听: ● 指定分析口 feature rovingAnalysis add或缩写 f r a 例如: Select menu option: feature rovingAnalysis add Select analysis slot: 1 Select analysis port: 2 ● 指定监听口并启动端口监听 feature rovingAnalysis start或缩写 f r sta 例如: Select menu option: feature rovingAnalysis start Select slot to monitor (1-12): 1 Select port to monitor (1-8): 3 ● 停止端口监听 feature rovingAnalysis stop或缩写 f r sto ● 删除分析口并还原其状态 feature rovingAnalysis remove或者使用缩写 f r r 使用此命令的前需执行停止端口监听命令 ● 查看分析口和监听口设置: feature rovingAnalysis summary或者使用缩写 f r su 例如: Select menu option: feature rovingAnalysis summary Monitor port Analysis port State - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Slot 3 Port 5 Slot1 Port2 Enabled Intel交换机端口镜像配置 Intel称端口监听为“Mirror Ports” 网络流量被监听端口称作“源端口”(Source Port)连接监听设备端口称作“镜像口”(Mirror Port) 以下步骤配置端口镜像: 在navigation菜单点击Statistics下Mirror Ports弹出Mirror Ports信息 在Configure Source 列中点击端口来选择源端口弹出Mirror Ports Configuration 进行源端口设置: 源端口是镜像流量来源口镜像口是接收来自源端口流量端口 点击Apply确定 可以选择 3种监听方式: 1.连续(Always):镜像全部流量 2.周期(Periodic):在定周期内镜像全部流量镜像周期在Sampling Interval configuration中设置 3.禁止(Disabled):关闭流量镜像 0
相关文章读者评论发表评论 |