交换机端口限速基本配置_第1页
交换机端口限速基本配置_第2页
交换机端口限速基本配置_第3页
交换机端口限速基本配置_第4页
交换机端口限速基本配置_第5页
已阅读5页,还剩24页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 S5012、S5024、S5600 系列:2000_EI系列以上的交换机都可以限速!2000_EI直接在端口视图下面输入LINE-RATE4参数可选限制在 1Mbps 进入端口E0/1 SwitchA- Ethernet0/1line-rate outbound 30SwitchA- Ethernet0/1line-rate inbound 161127128 范围内,则速率限制的粒度为 64Kbps,这种情况下,当设置的级别为 N,则端口上限制的速率大小为 N*64K;如 的级别为N,则端口上限制的速率大小为(N-27)*1Mbps。 进入端口E0/1 SwitchA- Ethernet0

2、/1line-rate outbound 2SwitchA- Ethernet0/1line-rate inbound 1 line-rate命令,对该端口的出方向报文进行流量限速;结合acl,使用以太网物理端口下面的 traffic-limit 命令,对端口的入方向报文进行流量限速。进入端口E0/1 SwitchA- Ethernet0/1line-rate 3 acl 使用,对匹配了指定控制列表规则的数据报文进行流量限制。在配置acl 的时候, 和 进入端口E0/1 SwitchA- Ethernet0/1traffic-sh3250 3250 SwitchA- Ethernet0/1tr

3、affic-limitinboundlink-group400010001500001500001000exceed 使用以太网物理端口下面的 traffic-limit 命令,对匹配指定控制列表规则的端口入方向进入端口E1/0/1 SwitchA- Ethernet1/0/1line-rate 3000 acl 使用,对匹配了指定控制列表规则的数据报文进行流量限制。在配置acl 的时候, 使用以太网物理端口下面的 traffic-limit 命令,对匹配指定控制列表规则的端口入方向进入端口E1/0/1 SwitchA- Ethernet1/0/1line-rate 3000 acl 使用,对

4、匹配了指定控制列表规则的数据报文进行流量限制。在配置acl 的时候, 1,端口AM SwitchAmac-address static 00e0-fc22-f8d3 interface Ethernet 0/1 vlan 1 SwitchAmac-address max-mac-count 0 AM PCIPMACIP地址或者 MAC 地址不同的 PC 机,在任何端口都无法上网。arp PC1IP地址、MACE0/1之间的绑定功能。由于使用 IP 地址、MAC 地址PC 机则无法上网PC1 使用IP 地址MAC 地址可以在其; . 组网需求通过二层控制列表,实现在每天8:0018:00时间段内

5、对源MAC为00e0-fc01-0101目MAC 00e0-fc01-0303 报文的过滤。该主机从 GigabitEthernet0/1 接入。.配置步骤# 8:0018:00Quidwaytime-range8:00to18:00 Quidway acl name traffic-of-link link# 00e0-fc01-0303 0-0-0 time-range # traffic-of-link的ACLQuidway-GigabitEthernet0/1 packet-filter link-group traffic-of-link 2,三层 ACL. 组网需求的过滤。该主机从

6、 GigabitEthernet0/1 接入。.配置步骤# 8:0018:00 8:00to18:00 Quidway acl name traffic-of-host basic # traffic-of-host的ACL .组网需求公司企业网通过Switch的端口实现之间的互连。研发部门的由GigabitEthernet0/1端ACL,限制研发部门在上班时间 8:00 至 18:00 工资服务器。.配置步骤# 8:0018:00Quidwaytime-range 8:00to18:00working-day Quidway acl name traffic-of-payserver adv

7、anced# 定义研发部门到工资服务器的规则Quidway-acl-adv-traffic-of-payserverrule1denyipsourceanydestination # traffic-of-payserver的ACLQuidway-GigabitEthernet0/1 packet-filter inbound ip-group traffic-of-payserver 3,常见的 ACLaclnumber禁denyicmpsourceanydestinationdenyudpsourceanydestinationanydestination-porteqdenytcpsou

8、rceanydestinationanydestination-porteqdeny tcp sourceanydestination anydestination-porteq 135 denyudpsourceanydestinationanydestination-porteqdeny udp source any destination any destination-port eq netbios-ns denyudpsourceanydestinationanydestination-porteqnetbios-dgm deny tcp source any destination

9、 any destination-port eq 139rule deny udp source any destination any destination-port eq 139 rule deny tcp source any destination any destination-port eq 445 rule deny udp source any destination any destination-port eq 445 rule deny udp source any destination any destination-port eq 593 rule deny tc

10、p source any destination any destination-port eq 593rule deny tcp source any destination any destination-port eq 445 rule deny tcp source any destination any destination-port eq 5554 rule deny tcp source any destination any destination-port eq 9995 rule deny tcp source any destination any destinatio

11、n-port eq 9996用于控制 Worm_MSBlast.A 蠕虫的rule denyudpsourceanydestinationanydestination-porteqdeny tcp source any destination any destination-port eq 1068 deny tcp source any destination any destination-port eq 5800 deny tcp source any destination any destination-port eq 5900 denytcpsourceanydestination

12、anydestination-porteq10080 deny tcp source any destination any destination-port eq 455 deny udp source any destination any destination-port eq 455 deny tcp source any destination any destination-port eq 3208 deny tcp source any destination any destination-port eq 1871 deny tcp source any destination

13、 any destination-port eq 4510 deny udp sourceanydestinationanydestination-porteq4334 deny tcp source any destination any destination-port eq 4331 deny tcp source any destination any destination-port eq 4557 NE80(config)#rule-mapr1udpanyanyeq 端NE80(config)#acla1r1 NE16-4(config)#access-list101denyudp

14、anyanyeq/deny为的关键字,针对udp报文,anyany 为所有源、目的IP,eq为等于,1434udp Routeracl 101Router-acl-101ruledenyudpsourceanydestionanydestination-porteq1434 Router-Ethernet0firewall packet-filter 101 inbound6506 产品的配置:6506(config)#aclextendedaaadenyprotocoludpanyanyeq1434 Quidway-acl-adv-100ruledenyudpsourceanydestina

15、tionanydestination-porteq1434 Quidway-Ethernet5/0/1packet-filterinboundip-group100not-care-for-interface 5516 产品的配置:l3aaaprotocol-typeudressanyegressanyeq1434 5516(config)#flow-action fff deny5516(config)#acl bbb aaa fff QuidwayaclnumQuidway-acl-adv-100ruledenyudpsourceanydestinationanydestination-p

16、orteq1434 Quidwaypacket-filter ip-group 100rule-mapl3reqflow-actionf1deny acl acl1 r1 f1 access-group acl1aclnumberrule0denyudpsource0source-porteq1434destinationpacket-filterip-group101rule8016 产品的配置:8016(config)#rule-map intervlan aaa udpeq1434 8016(config)#acl bbb aaa deny8016(config)#access-grou

17、paclbbbvlan10port8016(config)#rule-map intervlan aaa udpeq1434 8016(config)#eacl bbb aaa deny8016(config)#access-groupeaclbbbvlan10port 图1 二层交换机防ARP 组S3552PIP:PC的网关,S3552PMAC地址为 000f-e200-3999。PC-B上装有ARP。现在需要对S3026C_A 进行一些特殊配置,目的是过滤掉仿冒网关 IP 的 ARP 报文。对于二层交换机如S3026C等支持用户自定义ACL(number50005999)的交换机,可以配置

18、 ACL 来进行ARP 报文过滤。全局配置ACL所有源IP是网关的ARP报acl rule0deny0806ffff2464010101ffffffff IP16进制表示形式。Rule1ARP报文,斜体部分为网关的 mac 地址 000f-e200-3999。 网关的 arp 响应报文。三层交换机实现仿冒网关的ARP防图2 三层交换机防ARP 组网aclnumberrule0deny0806ffff2464010105ffffffff 的ARP报文进行过滤。如图1所示,当PC-B发送源IP地址为PC-D的arpreply报文,源mac是PC-B的 这样 3552 上就会学习到错误的 arp,如

19、下所示:VLANPortAgingPC-DarpE0/8E0/2端口 arpstatic000f-3d81-45b41 MACport 绑定,比如在 S3026C 端口E0/4 上做如下操作:amuser-bindip-addrmac-addr000d-88f8-09faint备的 ARP 报文则无法通过,从而不会出现错误 ARP 表项。此处仅仅列举了部分QuidwayS系列以太网交换机的应用。在实际的网络应用中,请根据配ACL和地址绑定。仅仅具有上述功能的交换机才能防止 ARP 。 ACL可以直接下发到交换机的硬件中用于数据转发过程中的过滤和流分类。此时 有两种:config(指定匹配该规则

20、时按用户的配置顺序)auto(指定匹配该规则时系统自 ACL 被的情况包括:路由策略 ACL、对登录用户进行控制时ACL 等。说明:以下方法将删除原有config 文件,使设备恢复到出厂配置。在设备重启时按 Ctrl+B 进入 BOOT 之后,Press Ctrl-B to enter Boot5 Password : 缺省为空,回车即可DownloadapplicationfiletoSelectapplicationfiletoDisplayallfilesinDeletefilefromModifybootromEnteryourchoice(0-51234567FreeSpace :3

21、452928ThecurrentapplicationfileisPlease input the file number to delete: 7Do you want to delete vrpcfg.txt now? Yes or No(Y/N)yDownloadapplicationfiletoSelectapplicationfiletoDisplayallfilesinDeletefilefromModifybootromEnter your choice(0-5):0 PORT1VLAN1 PORT2VLAN2 PORT3VLAN3 VLAN2的计算机的网关为:54VLAN3的计

22、算机的网关为:54即可实现VLAN 间互联 routeaddrouteadd 3,三层交换机 VLAN 之间的通信VLANIPVLAN IP就是对应的子网段就是某个的接口 IP。VLAN子网对应着四个重要部门,笔者认为这也是小企业DES-3326SR三层交换机的VLANDES-3326SR#Config vlan defauelete 1 -24删除默认VLAN(default)包含的端口1-24 DES-3326SR#Create vlan vlan10 tag 10创建 VLAN 名为vlan10,并标记VID 为 10 DES-3326SR#Create vlan vlan20 tag

23、20创建 VLAN 名为vlan20,并标记VID 为 20 DES-3326SR#Create vlan vlan30 tag 30创建 VLAN 名为vlan10,并标记VID 为 30 DES-3326SR#Create vlan vlan40 tag 40创建 VLAN 名为vlan10,并标记VID 为 40DES-3326SR#Configvlanvlan10adduntag1-1-6添加到DES-3326SR#Configvlan vlan20add untag 7-12 1-6 添加到VLAN20 DES-3326SR#Configvlanvlan30adduntag13-18

24、 1-6添加到VLAN30 DES-3326SR#Configvlanvlan40adduntag19-24 1-6添加到DES-3326SR#Create ipif if10 /24 VLAN10 state enabled 创建虑拟的接口 if10 给名为VLAN10 的VLAN 子网并且指定该IP /24enabledDES-3326SR#Createipifif20/24VLAN20stateenabled DES-3326SR#Createipifif30/24VLAN30stateenabled DES-3326SR#Createipifif40/24VLAN40stateenab

25、ledVLAN 的DES-3226S二层交换机的VLANDES-3226S#Config vlan defauelete 1 -24DES-3226S#Create vlan vlan10 tag 10创建VLAN 名为 vlan10,并标记VID 为10DES-3226S#Configvlanvlan10adduntag1-1-24添加到同理,配置其它DES-3226S 二层交换机。完成以后就可以将各个所属VLAN 的二层交换机与 DES-3326SR 三层交换机的相应 VLAN 的端口连接即可。SwitchAportmirrorEthernet0/1toEthernetSwitchApor

26、tmirrorEthernet0/1toEthernet0/2observing-portEthernet SwitchAportmonitorethernetSwitchAportmirroringethernet1/0/0bothethernetSwitchAportmonitorethernetSwitchAportmirroringgigabitethernet1/0/0ingressethernet1/0/15 SwitchA port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0SwitchAaclnum SwitchA

27、-acl-adv-101rule0permitipsource0destinationSwitchA-acl-adv-101rule1permitipsourceanydestination 定义一个SwitchAaclnum 将符合上述 ACL 的数据包镜像到 E0/8 SwitchAmirrored-tolink-group200interfacee0/8【5516 ingress-toEthernet镜像组名为 1,监测端口为 Ethernet4/0/2,端口 Ethernet4/0/1 的入流量被镜像。 SwitchAmirroring-group 1 inbound Ethernet

28、4/0/1 mirrored-to Ethernet4/0/2 PortMirror(端口镜像)AB 之间建立镜像关系,这样,通过端口A 传输的数据将同时到端口B ,以便于在端口B 上连接的分析仪或者 进行性能分析或故障判断。PC1接在交换机E0/1端口,IPPC2接在交换机E0/2端口,IP2 SwitchAportmirrorEthernet0/1toEthernetSwitchAportmirrorEthernet0/1toEthernet0/2observing-portEthernet SwitchAportmonitorethernetSwitchAportmirroringeth

29、ernet1/0/0bothethernetSwitchAportmonitorethernetSwitchAportmirroringgigabitethernet1/0/0ingressethernet1/0/15 SwitchA port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0SwitchAaclnum SwitchA-acl-adv-101rule0permitipsource0destinationSwitchA-acl-adv-101rule1permitipsourceanydestination 定义一个Swi

30、tchAaclnum 将符合上述 ACL 的数据包镜像到 E0/8 SwitchAmirrored-tolink-group200interfacee0/8 1,交换机作DHCP PC10/1VLAN10;PC2连接到交换机的以太网端口 0/2,属于 VLAN20 PC/24;PC2可以动态获取 /24 网段地址,并且网关地址为 接到三层交换机的 PC 机分配 IP 地址。 SwitchA-vlan10port Ethernet 0/1 SwitchA-vlan10port Ethernet 0/1 以上配置以VLAN10的为例,VLAN20VLAN10的配置即可。在采用全局地址PC1 IP

31、/24PC1 VLAN VLAN 接口配置了以全局VLAN 接口下无法看到有关 DHCP 的配置。 交换机DHCPRelay网的用户可以到同一个 DHCP Server 申请 IP 地址,这样便于地址池的管理和。全局使能DHCP功能(缺省情况下,DHCP功能处于使能状态 使能VLAN10的DHCP E0/11-E0/20加入到 为VLAN20IP 使能VLAN20的DHCP 为VLAN20配置DHCP 也可以在全局配置模式下,使能某个或某些 VLAN 接口上的 DHCP SwitchAdhcp select relay interface Vlan-interface 10 3, DHCPSn

32、ooDHCP Server 连接在交换机 SwitchA 的 G1/1 端口,属于 vlan10,IP E0/1和E0/2 交换机DHCP-Snoo配置流程 Request 或DHCP Ack 报文中提取并记录 IP 地址和 MAC 地址信息。另外,DHCP-Snoo允许将某个物理端口设置为信任端口或不信任端口。信任端口可以正常接收并转发 DHCP 冒 DHCP Server 的作用,确保客户端从合法的DHCP Server 获取 IP 地址。 将端口 E0/1、E0/2 G1/1 加入到 VLAN10 SwitchA-vlan10portEthernet0/1Ethernet0/2Gigab

33、itEthernet1/1 DHCPIP地址的报文”dhcpoffer” SwitchA Trunk DHCP 中继设备,也需要将上行端1displaycurrent-configuration:查看以太网交换机的当前配置 3resetsaved-configurationFlash Memory 中的配置文件,以太网交换机下次FTPServerPCFTPClientFTPServer上作了如下配置:配置了一个FTP 用户名为switch,为o,对该用户了交换机上Flash 根 的读写权限。交换机上VLAN 接口IP 地址,PC IP 地址,交换PCswitch.appPC上。PC通过FTPs

34、witch.app,同时将交换机的配置文件 vrpcfg.txt 到 PC 实现配置文件的备份。 # 在交换机上开启 FTP 服务,设置好用户名、和路径: Quidway ftp server enableQuidwaylocal-user 在PC上运行FTP Client程序,同交换机建立FTP连接,同时通过上载操作把交换机的应用程序 switch.app 上载到交换机的 Flash 根下,同时从交换机上配置文件 新的应用程序到交换机 Flash 中。# 用户可以通过命令boot boot-loader 来指定的程序为下次启动时的应用程序,然后重bootboot-loaderswitch.a

35、pp PC 的 IP 地址为 。交换机的应用程序 switch.app 保存在 PC 上。交换机通过 TFTP 从 TFTP Server 上 switch.appvrpcfg.txt TFTP Server 的工作 实现配置文 载新的应用程序到交换机的 Flash 中。进入系统视图。 # 中以 VLAN 1 为例。)QuidwayinterfacevlanQuidway-vlan-interface1ipaddress Quidway-vlan-interface1 quit # vrpcfg.txt上传到TFTPServer。 Quidway tftp put vrpcfg.txt /vr

36、pcfg.txt# Quidway# 用户可以通过命令boot boot-loader 来指定的程序为下次启动时的应用程序,然后重bootboot-loaderswitch.app 交换机配置(九 WEBWEB管理的文件载入交换机需要在交换机上添加WEB管理使用的用户名及,该用户的类型为 net类型,而且权限为别 3。WEB flash 时,不要将文件进行解压缩,只需将完整的文件载入交换机即可(向交换机flash载入WEB管理文件的方法,请参考本配置实例换机flash里面的文件(保证WEB管理文件已经在交换机flash中) dir /allDirectoryof-rwxrwx1noonenog

37、roup442797Apr02200013:09:50 user SwitchB-luser-service-typenetlevel3 SwitchB-luser-password simple wnm 对HTTP用户的控制(Option) SwitchBip http acl acl_num/acl_name2,NET 方式 SwitchA-ui-vty0-4user privilege level 3super password(VTY 用户界面登录后的级 别)例如,配置级别 3 用户的 super password 为明文”super3” 别 3(缺省为级别 1)password si

38、mple 在交换机上增加 super password SwitchAsuperpasswordlevel3simplesuper3 SwitchAdefaultenable SSH 方式 Quidwayuser-interfacevty0Quidway-ui-vty0-4authentication-modescheme Quidway-ui-vty0-4 protocol inbound ssh Quidway local-user client001Quidway-luser-client001passwordsimple SSH 的认证超时时间、重试次数以及服务器密钥更新时间可以采取系

39、统默认值,这些配置用户名client001, ,以太网交换机了。 SwitchA选用 公司的高中端交换机,如S8500或者S6500系列交换SwitchB和SwitchC选用 公司的交换机,如S3500或者S3550系列交换 交换机STP 全局使能STP功能(缺省情况下,DHCP功能处于使能状态SwtichB 配置为树根(SwitchB Bridge 0,或者直接将 SwitchB 指定为树根,两种方法一个效果)SwitchBstp priotity 0 全局使能STP功能(缺省情况下,DHCP功能处于使能状态SwtichC配置为备份树根(两种方法:将SwitcCBBridge4096,或者直

40、接将 SwitchC 指定为备份树根,两种方法一个效果)SwitchBstp priotity 4096 SwitchBstprootsecondary 【其他Switch SwitchD-stp bpdu-protection 当端口上配置了”stp root-protection”以后,该端口的角色只能是指定端口,且一旦该端口 IP53/24;PC1、PC2PC3E0/1 、E0/2和 PVLANVLAN配置视图中,Isolate-user-VLAN命令(原有命令行中的 Primary-VLAN)来完成。创建(进入)VLAN10E0/1加入到VLAN10 SwitchAvlan 10 创建(进

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论