Cisco交换机以太网经典配置
思科Cisco交换机配置手册配置教程

思科Cisco交换机配置手册配置教程配置接口特性这一章详细说明交换机上的接口和描述怎么配置他们。
这章有以下这些内容:●理解接口类型●使用接口命令●配置二层接口●监控和维护第二层接口●配置第三从接口注意:需要完整的有关该章的语法和应用信息,请参考Catalyst 3550 Multilayer Switch Command Reference和Cisco IOS Interface Command Referencefor Release 12.1.理解接口类型这个部分描述了不同的接口类型,以及其它章节所包括的详细配置这些接口的一些参考内容。
其他章节描述了物理接口特性的配置过程。
这部分包括:基于端口的VLAN (Port-Based VLANs)交换端口(Switch Ports)以太网通道端口组(EtherChannel Port Groups)交换虚拟接口(Switch Virtual Interfaces)被路由端口(Routed Ports)连接接口(Connecting Interfaces)基于端口的VLAN (Port-based Vlans)一个Vlan是一个按功能、组、或者应用被逻辑分段的交换网络,并不考虑使用者的物理位置。
要更多关于Vlan的信息请看“Configuring VLANS”。
一个端口上接受到的包被发往属于同一个Vlan的接收端口。
没有一个第三层的设备路由Vlan间的流量,不同Vlan的网络设备无法通讯。
为了配置普通范围(Normal-range) Vlan(Vlan IDs 1-1005),使用命令:config-vlan模式(global) vlan vlan-id或vlan-configuration模式(exec) vlan database针对Vlan ID 1-1005的vlan-configration模式被保存在vlan数据库中。
为配置扩展范围(extended-range)Vlans (Vlan ID 1006-4094),你必须使用config-vlan模式,并把VTP的模式设为transparent透明模式。
Cisco_交换机配置

Cisco交换机配置入门机型:Cisco 3750想对交换机警醒配置。
一般有两种方法:1 、控制台端口(Console ):可以直接对交换机进行配置2 、远程登录(Telnet):通过TELNET程序对已经设置了IP的交换机进行远程配置,一般等控制台端口配置好交换机的IP后才可以进行。
除了以上的两种方法外,其实还有两种方法:1 、WEB 的配置方式。
此方法只能配置一般的简单设置2 、硬件自带的应用程序。
专用的程序,一般很少用建立控制台连接到交换机一般交换机自带一根Console 线,一端连接到交换机的Comsole 口,一端连接到电脑的串行口。
打开超级终端,一般就可以连接到交换机。
具体的参数设置如下这样就可以连接到交换机了连接到交换机后,如果是第一次启动会要执行初始化操作,一般是设置交换机的名称,密码等一般的信息。
由于交换机已经初始化,如果要进行初始化操作,那就要进入特权EXEC模式,在命令提示符号下输入:setup,就会启动初始化操作。
刚才讲到了特权EXEC模式,这理就要讲一下觉换机的几种模式,不同的模式可以执行不同的操作命令,首先来说两种基本的模式。
一般为了安全考虑,CISCO将操作会话分为两个不同的访问级别:用户EXEC级别和特权EXEC级别。
用户EXEC级别只能使用有限的命令,且交换机显示Switch>提示符,不能对交换机进行配置。
看例子,处于用户EXEC级别下的状态:AITG_FrontekCoreSW>特权EXEC级别下交换机显示Switch#提示符,能对交换机进行各种配置。
看例子,处于特权EXEC级别下的状态:输入en,进入特权EXEC级别,接着输入密码,进入特权EXEC 级别AITG_FrontekCoreSW>enPassword:AITG_FrontekCoreSW#看看,提示符变了,用户在用户EXEC级别输入enable(或en),然后输入密码,就可以进入特权EXEC级别在交换机提示符下输入“?”,可以列出相应模式下交换机所支持的所有命令。
CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述CISCO交换机是一种常用的网络设备,用于构建局域网(Local Area Network,LAN)。
它可以通过物理线路的连接,将多台计算机或其他网络设备连接到同一个网络中,实现数据的传输和共享。
CISCO交换机的基本配置包括IP地址的配置、VLAN的配置、端口配置、安全性配置等。
接下来,我们将对这些配置进行详细说明。
首先,IP地址的配置是CISCO交换机的基本操作之一。
通过配置IP地址,我们可以对交换机进行管理和监控。
具体的配置步骤如下:1. 进入交换机的配置模式。
在命令行界面输入"enable"命令,进入特权模式。
2. 进入全局配置模式。
在特权模式下输入"configure terminal"命令,进入全局配置模式。
3. 配置交换机的IP地址。
在全局配置模式下输入"interfacevlan 1"命令,进入虚拟局域网1的接口配置模式。
然后输入"ip address 192.168.1.1 255.255.255.0"命令,配置交换机的IP地址和子网掩码。
4. 保存配置并退出。
在接口配置模式下输入"exit"命令,返回到全局配置模式。
然后输入"exit"命令,返回到特权模式。
最后输入"copy running-config startup-config"命令,保存配置到闪存中。
其次,VLAN的配置是CISCO交换机的关键配置之一。
通过配置VLAN,我们可以将交换机的端口划分为不同的虚拟局域网,实现数据的隔离和安全。
1. 进入交换机的配置模式。
同样,在特权模式下输入"configure terminal"命令,进入全局配置模式。
2. 创建VLAN。
在全局配置模式下输入"vlan 10"命令,创建一个编号为10的VLAN。
cisco网络交换机配置手册-061201

cisco网络交换机配置手册目录一、网络拓扑 (3)二、连接设备的方法 (3)1、从CONSOLE连接: (3)2、远程TELNET连接 (3)三、CISCO交换机基本配置的方法 (4)1、配置设备特权模式口令 (4)2、配置虚拟终端线路VTY(V IRTUAL T YPE T ERMINAL) (4)3、定义、删除(恢复初始)设备名称 (4)4、配置SNMP网管串 (5)5、新建、修改、删除某个VLAN,以及对VLAN命名 (5)6、将某个端口或者一组端口,划分到VLAN (5)7、配置端口工作模式 (6)8、配置端口速率 (6)9、配置一个或多个VLAN网关 (6)10、配置交换机设备的管理地址 (6)11、为某个端口配置一个或多个地址 (6)12、将设备互联的端口设置为TRUNK,让其通过VLAN信息 (7)13、新建PORT-CHANNEL,并将多个端口划分到该PORT-CHANNEL (7)14、删除PORT-CHANNEL,并将该PORT-CHANNEL下的端口删除 (7)15、在三层交换机上配置静态路由 (7)16、将源端口的流入或流出流量镜像到目的端口 (7)17、SHOW命令的使用 (8)18、限流方法: (11)19、ACL使用方法 (11)20、在两台6509上配置HSRP (12)21、配置端口MAC梆定 (13)四、交换机的日常维护 (13)一、网络拓扑参见三地网络拓扑图。
二、连接设备的方法1、从console连接:用Console线和转接头将交换机的console口与PC的串口相联,图示如下:设置如下图(默认设置):2、远程telnet连接给交换机配置了管理地址,就可以直接采用远程telnet登陆进入交换机了,但是必须先配置line vty的密码和enable密码才能允许远程登陆。
三、c isco交换机基本配置的方法1、配置设备特权模式口令telnet *.*.*.*Switch > 进入用户模式Switch > enable 从用户模式进入特权模式Switch # config terminal 从特权模式进入全局配置模式Switch # exit 退出所有配置模式Switch # end 退出配置模式Switch # wr 保存配置Switch(config)# enable secret cisco123 ――设置特权模式加密口令(机房使用方法)Switch(config)# enable password cisco123――设置特权模式不加密口令Switch(config)# service password-encryption ――将所有口令进行加密2、配置虚拟终端线路VTY(Virtual Type Terminal)Switch(config)# line vty 0 4Switch(config-line)# login--让设备回显一个要求输入口令的提示Switch(config-line)# password cisco ――Telnet统一密码Switch(config-line)# exec-timeout 10 0――设备超时时间为10分钟0秒Switch(config)# line vty 0 4Switch# (config-line)# login local ――设置本地认证模式Switch (config)# username zhangxy password ******Switch (config)# no username zhangxy3、定义、删除(恢复初始)设备名称Switch(config)# hostname test-2950test-2950(config)# no hostname4、配置snmp网管串Switch(config)# snmp-server community xxxxxx ro (只读)Switch(config)# snmp-server community xxxxxx rw (读写)5、新建、修改、删除某个VLAN,以及对VLAN命名Switch# vlan databaseSwitch(vlan)# vlan 100Switch(vlan)# vlan 100 name XX (名字一般定义为客户名称或者共享网段标识) Switch(vlan)# no vlan 100或者Switch# conf tSwitch(config)#vlan 100Switch (config-vlan)#name XX(名字一般定义为客户名称或者共享网段标识) Switch (config)#no vlan 1006、将某个端口或者一组端口,划分到VLANSwitch(config)# interface f0/13 (进入单个端口配置模式)Switch(config)# interface range f0/1-5(进入一组端口配置模式)Switch(config)# interface range f0/1-5, f0/8-10(进入一组端口配置模式)Switch(config-if)# (端口描述)Description 客户名称拼音的全拼(首字母大写) ip=地址带宽操作日期Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 100Switch(config-if)# no shutdownSwitch(config-if)# no switchport (删除端口相关配置)7、配置端口工作模式Switch(config-if)# duplex full/auto/half[全双工|自动协商|半双工]8、配置端口速率Switch(config-if)# speed 10/100/ auto9、配置一个或多个VLAN网关Switch(config)# int vlan 100Switch(config-subif)# Description 客户名称ip=地址带宽操作日期(描述)Switch(config-subif)# ip address 192.168.2.130 255.255.255.0Switch(config-subif)#ip address 192.168.3.130 255.255.255.0 secondarySwitch(config-subif)# no shutdown10、配置交换机设备的管理地址配置二层交换机设备的管理地址:Switch(config)# int vlan 1 (交换机VLAN1的网关地址就是设备的管理地址)Switch(config-subif)# ip address 192.168.2.130 255.255.255.0Switch(config-subif)# no shutdown配置三层交换机的设备管理地址:Switch(config)# int loopback0 ――loopback接口是一种逻辑接口,可以创建无数个Switch(config-if)# ip address 192.168.2.130 255.255.255.0Switch (config)# no int loopback 011、为某个端口配置一个或多个地址Switch(config)# interface f0/13Switch(config-if)# ip address 192.168.1.130 255.255.255.0Switch(config-if)# ip address 192.168.1.130 255.255.255.0 secondary12、将设备互联的端口设置为trunk,让其通过vlan信息Switch(config)# int range f0/40,f0/48(range的作用是同时对多个端口进行配置)Switch(config-if)# switchport trunk encapsulation dot1qSwitch(config-if)# switchport trunk allowed vlan 1-10,12-4094(没有这句配置,则说明所有VLAN均能通过trunk)Switch(config-if)# switchport mode trunk(如果要增加vlan 100划分到truck时,必须把原有的vlan再都写上) Switch(config-if)# switchport trunk allowed vlan 1-10,100,12-409413、新建port-channel,并将多个端口划分到该port-channelSwitch (config)# interface port-channel 1Switch(config)# interface f0/1Switch (config-if)# channel-group 1 mode onSwitch(config)# interface f0/2Switch (config-if)# channel-group 1 mode on14、删除port-channel,并将该port-channel下的端口删除Switch (config)# interface f0/1Switch (config-if)# no channel-group 1Switch (config)# no interface port-channel 115、在三层交换机上配置静态路由Switch (config)# ip route 172.16.1.0 255.255.255.0 10.1.1.1――ip route 目标地址段下一跳地址16、将源端口的流入或流出流量镜像到目的端口将源端口的流入或流出流量镜像到目的端口以便于在目的端口接上笔记本电脑,利用anylazer软件抓包,并分析数据包是否正常。
cisco交换机配置实例教程(2024)

2024/1/29
堆叠交换机
允许多个交换机堆叠成一个逻辑单元,简化管理和提高可扩展性。
11
不同场景下的选型建议
01
接入层交换机
02
汇聚层交换机
03
核心层交换机
用于连接用户设备,如PC、打印 机等,通常选择固定配置或堆叠 交换机。
实现接入层交换机之间的汇聚, 需要具备较高性能和端口密度, 常选择模块化交换机。
进入全局配置模式
配置静态路由基本步骤
01
2024/1/29
03 02
26
静态路由协议配置教程
2024/1/29
01
指定目标网络和下一跳地址或出口接口
02
静态路由配置示例
03
配置静态路由到达远程网络
27
静态路由协议配置教程
配置默认路由指向上级路 由器
2024/1/29
优点:简单、稳定、低开 销
静态路由优缺点分析
2024/1/29
17
04
端口配置与VLAN划分实例
2024/1/29
18
端口类型及配置方法
以太网端口(Ethernet Port)
用于连接计算机、服务器等终端设备。
汇聚端口(Trunk Port)
用于交换机之间的连接,可以传输多个VLAN的数据。
2024/1/29
19
端口类型及配置方法
• 访问端口(Access Port):用于连接属于 某个VLAN的终端设备。
2024/1/29
20
端口类型及配置方法
进入端口配置模式
设置端口类型
配置VLAN
通过命令`interface <端口号>` 进入端口配置模式。
思科交换机简单配置(通用教程)

• 双工模式: Switch(config-if)#duplex ? auto Enable AUTO duplex configuration full Force full duplex operation half Force half-duplex operation
Switch(config-if)#duplex auto Switch(config-if)# • 端口描述 Switch(config-if)#description vlan 10 trunk Switch(config-if)#
配置ip地址的命令格式: ip address {ip-address} {netmask}
测试常用端口类型Acce来自s / trunk将此端口设置为vlan10 的access口 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)# 将此端口设置为vlan10 的trunk口 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk allowed vlan 10
Vlan设置
• Vlan设置范围:1---4094 • 在全局模式下配置vlan Switch#conf t Switch(config)#vlan 10 Switch(config-vlan)#name vlan10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name vlan20 Vlan名称可以自行定义
CISCO思科交换机3650G配置命令大全

CISCO思科交换机3650G配置命令⼤全CISCO思科交换机3650G配置命令⼤全1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录⼝令:switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录⼝令: switch(enable) set password switch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway 4.在基于IOS的交换机上启⽤和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启⽤和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端⼝描述:switch(config-if)# description description-string 基于CLI的交换机的端⼝描述:switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端⼝速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端⼝速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太⽹的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太⽹的链路模式:switch(enable) set port duplex module/number {full|half} 8.在基于IOS的交换机上配置静态VLAN: switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/number switch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-num switch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list 9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/port switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交换机上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name] 11.在基于IOS的交换机上配置VTP 模式: switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交换机上配置VTP 模式: switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12. 在基于IOS的交换机上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本: switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁: switch# vlan database switch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁: switch(enable) set vtp pruning enable 14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端⼝ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交换机上调整端⼝ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan] switch(enable) set spantree fwddelay delay [vlan] switch(enable) set spantree maxage agingtiame[vlan] 18. 在基于IOS的交换机端⼝上启⽤或禁⽤Port Fast 特征: switch(config-if)#spanning-tree portfast在基于CLI的交换机端⼝上启⽤或禁⽤Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable} 19. 在基于IOS的交换机端⼝上启⽤或禁⽤UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交换机端⼝上启⽤或禁⽤UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成⼀个集群的命令交换机,⾸先要给管理接⼝分配⼀个IP地址,然后使⽤下列命令: switch(config)# cluster enable cluster-name 21. 为了从⼀条中继链路上删除VLAN,可使⽤下列命令: switch(enable) clear trunk module/port vlan-range 22. ⽤show vtp domain 显⽰管理域的VTP参数. 23. ⽤show vtp statistics显⽰管理域的VTP参数. 24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端⼝.对于以太⽹交换,可以采⽤如下命令给VLAN分配端⼝:switch(enable) set vlan vlan-num mod-num/port-num 27. 命令show spantree显⽰⼀个交换机端⼝的STP状态.28. 配置⼀个ELAN的LES和BUS,可以使⽤下列命令:ATM (config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接⼝上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address 31. 将每个LEC配置到⼀个不同的ATM⼦接⼝上.命令如下: ATM(config)# interface atm number.subint multipoint ATM(config)# lane client ethernet vlan-num elan-num 32. ⽤show lane server 显⽰LES的状态. 33. ⽤show lane bus显⽰bus的状态.34. ⽤show lane database显⽰LECS数据库可内容. 35. ⽤show lane client显⽰LEC的状态. 36. ⽤show module显⽰已安装的模块列表. 37. ⽤物理接⼝建⽴与VLAN的连接: router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-string router(config-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown 38. ⽤中继链路来建⽴与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask 39. ⽤LANE 来建⽴与VLAN的连接:router(config)# interface atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(config-if)# …40. 为了在路由处理器上进⾏动态路由配置,可以⽤下列IOS命令来进⾏: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-number router(config-router)# network ip-network-number 41. 配置默认路由:switch(enable) set ip route default gateway42. 为⼀个路由处理器分配VLANID,可在接⼝模式下使⽤下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43. 在路由处理器启⽤MLSP: router(config)# mls rp ip44. 为了把⼀个外置的路由处理器接⼝和交换机安置在同⼀个VTP域中: router(config)# interface interface number44. 为了把⼀个外置的路由处理器接⼝和交换机安置在同⼀个VTP域中: router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name 45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接⼝,可以在接⼝模式下输⼊下列命令: router(config-if)#mls rp management-interface 47. 要检验MLS-RP的配置情况: router# show mls rp48. 检验特定接⼝上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码⽽⼜不想在任⼀个路由处理器接⼝上设置访问列表: set mls flow [destination|destination-source|full]50. 为使MLS和输⼊访问列表可以兼容,可以在全局模式下使⽤下列命令: router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输⼊下列命令: switch(enable) set mls enable52. 若想改变⽼化时间的值,可在特权模式下输⼊以下命令: switch(enable) set mls agingtime agingtime 53. 设置快速⽼化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显⽰交换机引⽤列表中的内容再确定: switch(enable) show mls include 55. 显⽰MLS⾼速缓存记录: switch(enable) show mls entry56. ⽤命令show in arp显⽰ARP⾼速缓存区的内容。
cisco思科6000系列交换机经典配置手册(中文)

6000交换机配置维护手册(Native IOS)目录1. 连接设备 (3)1.1.从CONSOLE连接 (3)1.2.远程TELNET连接 (5)2. 基本信息配置 (5)2.1.配置机器名、TELNET、密码 (5)2.2.配置SNMP网管串 (5)3. 冗余及系统高可用性配置 (6)3.1.同步S UPERVISOR E NGINE配置 (6)3.2.查看S UPERVISOR E NGINE冗余 (7)3.3.向冗余S UPERVISOR E NGINE拷贝IOS文件 (8)4. 端口设置 (9)4.1.基本设置 (9)4.2.配置三层端口 (10)5. 配置二层端口 (10)5.1.配置T RUNK: (10)6. 配置HSRP (11)6.1.配置二层普通交换接口 (12)6.2.清除二层接口配置 (12)7. 配置VLAN (12)8. 动态路由协议--OSPF配置 (13)8.1.启用OSPF动态路由协议 (14)8.2.定义参与OSPF的子网 (14)8.3.OSPF区域间的路由信息汇总 (14)8.4.配置密码验证 (15)8.5.设置产生缺省路由 (15)9. 交换机维护 (16)9.1.交换机IOS保存和升级 (16)9.2.交换机密码恢复 (16)1. 连接设备1.1. 从console连接第一次对6000交换机进行配置,必须从console进入。
首先先将机器上架,按要求接好电源,然后用随机附带的Console线和转接头将交换机的console口与PC的串口相联,如下:Com口设置如下:∙9600 baud∙8 data bits∙No parity∙ 2 stop bits检查电源无误后,开电,可能会出现类似下面的显示,按黑粗体字回答:System Bootstrap, Version 6.1(2)Copyright (c) 1994-2000 by cisco Systems, Inc.c6k_sup2 processor with 131072 Kbytes of main memoryrommon 1 > boot slot0:c6sup22-jsv-mz.121-5c.EX.binSelf decompressing the image : ################################################################################################################################ ############################################################################### ############################################################################### ############################################################################### [OK]Restricted Rights LegendUse, duplication, or disclosure by the Government issubject to restrictions as set forth in subparagraph(c) of the Commercial Computer Software - RestrictedRights clause at FAR sec. 52.227-19 and subparagraph(c) (1) (ii) of the Rights in Technical Data and ComputerSoftware clause at DFARS sec. 252.227-7013.cisco Systems, Inc.170 West Tasman DriveSan Jose, California 95134-1706Cisco Internetwork Operating System SoftwareIOS (tm) MSFC2 Software (C6MSFC2-BOOT-M), Version 12.1(3a)E4, EARLY DEPLOYMENT R ELEASE SOFTWARE (fc1)Copyright (c) 1986-2000 by cisco Systems, Inc.Compiled Sat 14-Oct-00 05:33 by eaarmasImage text-base: 0x30008980, data-base: 0x303B6000cisco Cat6k-MSFC2 (R7000) processor with 114688K/16384K bytes of memory.Processor board ID SAD04430J9KR7000 CPU at 300Mhz, Implementation 39, Rev 2.1, 256KB L2, 1024KB L3 CacheLast reset from power-onX.25 software, Version 3.0.0.509K bytes of non-volatile configuration memory.16384K bytes of Flash internal SIMM (Sector size 512K).Press RETURN to get started!--- System Configuration Dialog ---Would you like to enter the initial dialog? [yes]: no回答:NO,进入手工配置,在router>下,输入enable回车,进入全局模式1.2. 远程telnet连接当完成交换机配置,并起给交换机配置了管理地址,就可以直接采用远程telnet 登陆进入交换机了,但是必须先配置line vty的密码和enable密码才能允许远程登陆。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cisco交换机以太网经典配置ConfigurationsThe configurations in this document were implemented in an isolated lab environment. The configurations were cleared by issuing the write erase command on the routers, and the clear config all command on the switches to ensure that all devices have a default configuration. Make sure you understand the potential impact of any configuration or command on your network before using it.Catalyst 6500 SwitchNote: The following screen captures show the commands that were entered on the Catalyst 6500 switch. Comments between the commands are added in blue italics to explain certain commands and steps.!-- Set the IP address and default gateway for VLAN 1 for management purposes.Catalyst6500> (enable) set int sc0 10.10.10.2 255.255.255.0Interface sc0 IP address and netmask set.Catalyst6500> (enable) set ip route default 10.10.10.1Route added.!-- Set the VTP mode.!-- In our example, we have set the mode to be transparent. !-- Depending on your network, set the VTP mode accordingly. !-- For details on VTP, refer to Understanding and Configuring VLAN Trunk Protocol (VTP).Catalyst6500> (enable) set vtp mode transparentVTP domain modified!-- Adding VLAN 2. VLAN 1 already exists by default.Catalyst6500> (enable) set vlan 2VLAN 2 configuration successful!-- Adding port 3/4 to VLAN 2. Port 3/3 is already in VLAN 1 by default.VLAN 2 modified.VLAN 1 modified.VLAN Mod/Ports---- -----------------------2 3/4! -- Set the port speed and duplex at 100 and full. One of!-- the requirements for EtherChannel to work is for speed and duplex to be the same on!-- both sides. To guarantee this, we will hard code both speed and duplex on ports 3/1 and 3/2. Catalyst6500> (enable) set port speed 3/1-2 100Ports 3/1-2 transmission speed set to 100Mbps.Catalyst6500> (enable) set port duplex 3/1-2 fullPorts 3/1-2 set to full-duplex.! -- Enable FEC on ports 3/1 and 3/2.! -- Becuase routers do not understand Port Aggregation Protocol(PAgP),! -- we set the channel mode to on which causes ports to channel,! -- but not generate PAgP frames.Catalyst6500> (enable) set port channel 3/1-2 onPort(s) 3/1-2 are assigned to admin group 105.Port(s) 3/1-2 channel mode set to on.! -- Enable trunking on ports 3/1 and 3/2.! -- Becuase routers do not understand Dynamic Trunking Protocol(DTP),! -- we set the trunking mode to nonegotiate which causes ports to trunk,! -- but not generate DTP frames.! -- Notice that becuase we configured EtherChannel first,! -- any trunk settings applied now to one port automatically apply to all other ports in the channel.! -- Enter the trunking encapsulation as either isl ...Catalyst6500> (enable) set trunk 3/1 nonegotiate isl Port(s) 3/1-2 trunk mode set to nonegotiate.Port(s) 3/1-2 trunk type set to isl.! -- ... or as dot1q.! -- Make sure the native VLAN(default is VLAN 1) matches across the link.! -- For more information on the native VLAN and 802.1q trunking, refer to! -- Trunking Between Catalyst 4000, 5000, and6000 Family Switches Using 802.1q Encapsulation.Catalyst6500> (enable) set trunk 3/1 nonegotiate dot1qPort(s) 3/1-2 trunk mode set to nonegotiate.Port(s) 3/1-2 trunk type set to dot1q.Catalyst6500> (enable) show configThis command shows non-default configurations only.Use 'show config all' to show both default and non-default configurations..............................begin!# ***** NON-DEFAULT CONFIGURATION *****!#time: Thu May 2 2002, 01:26:26!#version 5.5(14)!!#systemset system name Catalyst6500!#!#vtpset vtp mode transparentset vlan 1 name default type ethernet mtu 1500 said 100001 state activeset vlan 2 name VLAN0002 type ethernet mtu 1500 said 100002 state activeset vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state activeset vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active stp ieee set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp ibmset vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active mode srb aremaxhop 7 stemaxhop 7backupcrf off!set interface sc0 1 10.10.10.2/255.255.255.0 10.10.10.255 set ip route 0.0.0.0/0.0.0.0 10.10.10.1 !#set boot commandset boot config-register 0x2102set boot system flash bootflash:cat6000-sup.5-5-14.bin!#port channelset port channel 3/1-2 105!# default port status is enable!!#module 1 empty!#module 2 : 2-port 1000BaseX Supervisor!#module 3 : 48-port 10/100BaseTX Ethernetset vlan 2 3/4set port disable 3/5set port speed 3/1-2 100set port duplex 3/1-2 fullset trunk 3/1 nonegotiate isl 1-1005set trunk 3/2 nonegotiate isl 1-1005!-- If IEEE 802.1q is configured,!-- you will see the following output instead:set trunk 3/1 nonegotiate dot1q 1-1005set trunk 3/2 nonegotiate dot1q 1-1005set port channel 3/1-2 mode on!#module 4 : 24-port 100BaseFX MM Ethernet!#module 5 empty!#module 6 empty!#module 15 empty!#module 16 emptyendCisco 7500 RouterNote: The following screen captures show the commands that were entered on the Cisco 7500 router. Comments between the commands are added in blue italics to explain certain commands and steps.! -- Configure a port-channel interface to enable FEC.7500#configure terminal7500(config)#int port-channel 101:34:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changedstate to down! -- Configure full-duplex to match the duplex setting on the Catalyst switch side.7500(config-if)#full-duplex7500(config-if)#exit! -- If using ISL trunking, configure two port-channel sub-interfaces and enable ISL trunking! -- by issuing the encapsulation isl command.! -- Configure IP addresses for InterVLAN routing.7500(config)#int port-channel 1.17500(config-subif)#encapsulation isl 17500(config-subif)#ip address 10.10.10.1 255.255.255.07500(config-subif)#exit7500(config)#int port-channel 1.27500(config-subif)#encapsulation isl 27500(config-subif)#ip address 10.10.11.1 255.255.255.07500(config-subif)#exit! -- If using 802.1q trunking, configure two port-channel sub-interfaces, enable 802.1q trunking! -- by issuing the encapsulation dot1Q native command and configure the IP addresses for! -- InterVLAN routing.Note: The encapsulation dot1Q 1 native command was added in Cisco IOS version 12.1(3)T. If you are using an earlier version of Cisco IOS, refer to the 802.1Q Configuration for Cisco IOS Versions Earlier than 12.1(3)T section of this document to configure 802.1Q trunking on the! -- Make sure the native VLAN(default is VLAN 1) matches across the link.! -- For more information on the native VLAN and 802.1q trunking, refer to! -- Trunking Between Catalyst 4000, 5000, and 6000 Family Switches Using 802.1q Encapsulation. 7500(config)#int port-channel 1.17500(config-subif)#encapsulation dot1Q 1 native7500(config-subif)#ip address 10.10.10.1 255.255.255.07500(config-subif)#exit7500(config)#int port-channel 1.27500(config-subif)#encapsulation dot1Q 27500(config-subif)#ip address 10.10.11.1 255.255.255.07500(config-subif)#exit! -- Configure the FastEthernet interfaces for speed 100 depending on the port adapter.! -- Some FastEthernet port adapters can autonegotiate speed(10 or 100) and duplex(half or full).! -- Others are only capable of 100 (half or full).7500(config)#int fa5/1/07500(config-if)#speed 100! -- Configure the FastEthernet interfaces to be members of port-channel 1 by issuing the channel-group command.7500(config-if)#channel-group 1%Interface MTU set to channel-group MTU 1500.7500(config-if)#no shut7500(config-if)#%Interface MTU set to channel-group MTU 1500.FastEthernet5/1/0 added as member-1 to port-channel101:46:09: %LINK-3-UPDOWN: Interface FastEthernet5/1/0, changed state to up 01:46:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1/0, changed state to up01:46:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upRouter(config-if)#exitRouter(config)#int fa 5/1/1Router(config-if)#speed 100Router(config-if)#channel-group 1%Interface MTU set to channel-group MTU 1500.Router(config-if)#no shutRouter(config-if)#%Interface MTU set to channel-group MTU 1500.FastEthernet5/1/1 added as member-2 to port-channel101:54:52: %LINK-3-UPDOWN: Interface FastEthernet5/1/1, changed state to up 01:54:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1/1, changed state to upRouter(config-if)#exit! -- Remember to save the configuration.7500#write memoryBuilding configuration...7500#Note: In order to make this setup work, and to successfully ping between Workstation 1 and Workstation 2, you need to make sure that the default gateways on the workstations are setup properly. For Workstation 1, the default gateway should be 10.10.10.1 and for Workstation 2, the default gateway should be 10.10.11.1.7500#show running-configBuilding configuration...Current configuration : 1593 bytes!version 12.2no service padservice timestamps debug uptimeservice timestamps log uptimeno service password-encryptionno service single-slot-reload-enable!hostname 7500!boot system disk1:rsp-jsv-mz.122-7b.bin!ip subnet-zero!ip cef!!!interface Port-channel1no ip addressfull-duplexhold-queue 300 in!interface Port-channel1.1encapsulation isl 1ip address 10.10.10.1 255.255.255.0!interface Port-channel1.2encapsulation isl 2ip address 10.10.11.1 255.255.255.0! -- If 802.1q trunking is configured,! -- you will see the following output instead: interface Port-channel1.1encapsulation dot1Q 1 nativeip address 10.10.10.1 255.255.255.0!interface Port-channel1.2encapsulation dot1Q 2ip address 10.10.11.1 255.255.255.0 !interface FastEthernet5/1/0no ip addressno ip mroute-cachespeed 100full-duplexchannel-group 1!interface FastEthernet5/1/1no ip addressno ip mroute-cachespeed 100full-duplexchannel-group 1!!ip classlessno ip http serverip pim bidir-enable!!!line con 0line aux 0line vty 0 4login!end7500#802.1Q Configuration on the Cisco 7500 for Cisco IOS Versions Earlier than 12.1(3)TIn Cisco IOS versions earlier than 12.1(3)T, the encapsulation dot1Q 1 native command under the subinterface was not available. However, it is still necessary to match the native VLAN across the link as described previously.To configure 802.1q trunking in software versions earlier than 12.1(3)T, the IP address for VLAN 1 is configured on the main port-channel 1 interface as oppossed to a port-channel subinterface.! -- Configure a port-channel interface to enable FEC.7500#configure terminalEnter configuration commands, one per line. End with CNTL/Z.7500(config)#int port-channel 101:34:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changedstate to down! -- Configure full-duplex to match the duplex setting on the Catalyst switch side.7500(config-if)#full-duplex 7500(config-if)#exit!-- Instead, create a port-channel 1 main interface and configure the IP address for VLAN 1 here.7500(config)#int port-channel 17500(config-if)#full-duplex7500(config-if)#ip address 10.10.10.1 255.255.255.07500(config-if)#exit7500(config)#! -- It is still necessary to create a subinterface for VLAN 2.7500(config)#int port-channel 1.27500(config-subif)#encapsulation dot1Q 27500(config-subif)#ip address 10.10.11.1 255.255.255.07500(config-subif)#exit! -- Configure the FastEthernet interfaces for speed 100 depending on the port adapter.! -- Some FastEthernet port adapters can autonegotiate speed(10 or 100) and duplex(half or full).! -- Others are only capable of 100 (half or full).7500(config)#int fa5/1/07500(config-if)#speed 100! -- Configure the FastEthernet interfaces to be members of port-channel 1 by issuing the channel-group command.7500(config-if)#channel-group 1%Interface MTU set to channel-group MTU 1500.7500(config-if)#no shut7500(config-if)#FastEthernet5/1/0 added as member-1 to port-channel101:46:09: %LINK-3-UPDOWN: Interface FastEthernet5/1/0, changed state to up 01:46:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1/0, changed state to up01:46:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upRouter(config-if)#exitRouter(config)#int fa 5/1/1Router(config-if)#speed 100Router(config-if)#channel-group 1%Interface MTU set to channel-group MTU 1500.Router(config-if)#no shutRouter(config-if)#%Interface MTU set to channel-group MTU 1500.FastEthernet5/1/1 added as member-2 to port-channel101:54:52: %LINK-3-UPDOWN: Interface FastEthernet5/1/1, changed state to up 01:54:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1/1, changed state to upRouter(config-if)#exit! -- Remember to save the configuration.7500#write memoryBuilding configuration...[OK]7500#Note: Remember also that in any version of software previous to 12.2 or 12.2T for the 7000/7500 series, you will have to issue the no ip cef command globally before configuring 802.1q trunking on a subinterface. Otherwise, you will see the following error message: 802.1q encapsulation not supported with CEF configured on the interface. Refer to the Hardware and Software Requirements section of this document for more information.7500#show running-configBuilding configuration...Current configuration : 1593 bytes!version 12.1no service padservice timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname 7500!!ip subnet-zero!no ip cef!!interface Port-channel1ip address 10.10.10.1 255.255.255.0 full-duplexhold-queue 300 in!interface Port-channel1.2 encapsulation dot1Q 2ip address 10.10.11.1 255.255.255.0 !interface FastEthernet5/1/0no ip addressno ip mroute-cachespeed 100full-duplexchannel-group 1!interface FastEthernet5/1/1no ip addressno ip mroute-cachespeed 100full-duplexchannel-group 1 !!ip classlessno ip http server !!!line con 0line aux 0line vty 0 4 login!end7500#。