Catalyst 3560 交换机配置手册
- 格式:pdf
- 大小:805.66 KB
- 文档页数:26
switch> 命令行模式;config#特权模式一、配置交换机vlan模式;有两种方式第一种:config#vlan ID 这里的ID是需要你个人给要划分的vlan起的编号config-if#name 名字switch#show vlan brief 查看vlan 用来检验是否配置成功第二种:switch#vlan database 交换机的vlan配置状态switch(vlan)#vlan ID name 名字配置vlan 并且分配相应的名字二、3560上开启路由功能配置switch(config)#ip routingswitch(config)#ip route ipaddress net-hop 配置路由(静态)switch(config)#ip default-gateway ipaddress 配置网关三、开启聚合链路配置#conf tSW(config)#interface range f1/1 - 2SW(config-if)#channel-group 1 mode desirable/onSW(config-if)#swithportSW(config-if)#switchport mode trunkSW(config-if)#switchport trunk encap dot1q四、启动telnet管理模式switch(config)#line vty 0 4switch(config-line)#password 密码switch(config-line)#login五、开启cisco日志功能switch(config)#logging onswitch(config)#logging trap 信息switch(config)#logging host 你的IP地址switch(config)#logging facility 你选着的信息配置3550作为dhcp服务器六、配置cisco启动dhcp功能配置地址池switch(config)ip dhcp pool 名字switch(config-pool)network maskswitch(config-pool)dns-serverswitch(config-pool)default-router 网关设置dhcp保留不分配的地址switch(config)ip dhcp excluded-address 地址地址第一步;从起交换机第二步;配置1)按下MODE键后给3560加电。
Switch>enableSwitch#conf tSwitch# show run创建VLANSwitch# configure terminalSwitch(config)# vlan 20Switch(config-vlan)# name test20Switch(config-vlan)# end更改VLANSwitch# vlan databaseSwitch(vlan)# vlan 20 name test20Switch(vlan)# exit删除VLAN命令目的Step 1 configure terminal 进入配置状态Step 2 no vlan vlan-id 删除某一VLAN.Step 3 end 退出Step 4 show vlan brief 验证Step 5 copy running-config startup config 保存也可用vlan database 进入VLAN配置状态,用no vlan vlan-id 来删除。
将端口分配给一个VLAN命令目的Step 1 configure terminal 进入配置状态Step 2 interface interface-id 进入要分配的端口Step 3 switchport mode access 定义二层口Step 4 switchport access vlan vlan-id 把端口分配给某一VLANStep 5 end 退出Step 6 show running-config interface interface-id 验证端口的VLAN号Step 7 show interfaces interface-id switchport 验证端口的管理模式和VLAN情况Step 8 copy running-config startup-config 保存配置使用default interface interface-id 还原到缺省配置状态。
Cisco Catalyst 3560 v2系列交换机产品概述Cisco® Catalyst® 3560 v2 系列产品(如图1 所示)是下一代高能效三层快速以太网交换机。
这一全新系列的交换机支持Cisco EnergyWise 技术。
此技术可帮助企业衡量和管理网络基础设施及网络连接设备的功耗,从而降低其能源消耗和碳足迹。
Cisco Catalyst 3560 v2 系列产品的功耗低于其上一代产品,是企业、零售和分支机构环境的最佳接入层交换机,可通过在一个统一网络上支持数据、语音和视频,最大限度地提高工作效率和增强投资保护。
图1. Cisco Catalyst 3560 v2 交换机Cisco Catalyst 3560 v2系列产品亮点功耗比其上一代产品显著降低出色的后向兼容性——采用了与3560系列产品相同的Cisco IOS®软件映像,具备相同的特性全面支持Ene r gyWise技术,能够监控网络基础设施的功耗情况,并实施节能计划来降低能源成本兼容思科冗余电源系统RPS 2300所有产品的深度一致为11.9英寸,能够支持更有效地电缆管理可预装在订购时特别指定的Cisco IOS软件版本IP Services特性集中包含IPv6路由功能有支持DC供电型号配置Cisco Catalyst 3560 v2 系列产品中包含表1中所介绍的交换机。
表1. 交换机配置Cisco Catalyst 3560 v2系列软件Cisco Catalyst 3560 v2 系列产品在购买时可选择预装I P Base 或I P Services 软件。
IP Base 版本提供先进的服务质量(QoS)、速率限制、访问控制列表(ACL)以及基本静态和路由信息协议(RIP)路由功能。
IP Services 版本提供一组更加丰富的企业级特性,包括基于硬件的先进IP 单播和IP 组播路由、以及基于策略的路由(PBR)。
如图。
pc0 属于vlan2,pc1属于vlan3,pc0 ip 192.168.0.10 /24 192.168.0.254 pc1 ip 1 0.139.168.10 /21 10.139.168.254 。
所有交换机的管理vlan是vlan4 192.168.1.x/24 。
要求pc0、pc1可以telnet 到交换机,和路由器 R1 ,交换机之间可以互ping通,pc 0和pc1可以ping通pc3。
pc0、pc1、可以互ping通。
3层交换机和路由器R1如何配置,主要是3层交换机如何配置,我已经在交换机的端口配置好了ip 。
路由器之间的ip 1 0.1.1.0/24 也已经配置好。
麻烦高后帮忙配置一下3层交换机和路由器。
谢谢。
分享到:2012-11-21 18:00提问者采纳这种配置我郁闷!我直接打命令看看能不能解决。
同时覆盖你一些配置吧!三层交换机3560enableconfigure terminalinterface range fastethernet0/1 -2switchport trunk encapsulation dot1qswitchport mode trunkexit这个时候,三层交换机接下面的二层交换机都为中继链路了(trunk),同时需要配置vtp,让各个交换机的vlan信息同步,如下配置:三层交换:enableconfigure terminalvtp domain netvtp mode server两个二层交换机都要配:enableconfigure terminalvtp domain netvtp mode client然后在三层交换上配置vlanenablevlan databasevlan 2vlan 3vlan 4exitconfigure terminalinterface vlan 2ip address 192.168.0.254 255.255.255.0exitinterface vlan 3ip address 10.139.168.254 255.255.248.0exitinterface vlan 4ip address 192.168.1.254 255.255.255.0然后在第一个二层交换机上将PC划分相应的vlan当中。
3层交换机:管理ip:192.168.1.2 上门连路由器ip:192.168.1.5分2个段:Vlan1 192.168.1.0 255.255.255.0 网关192.168.1.2Vlan5 172.16.5.0 255.255.254.0 网关172.16.5.1键入3560设备管理IP地址Switch>enableSwitch#conf tSwitch(config)# interface vlan 1Switch(config-if)#ip address 192.168.1.253 255.255.255.0 --这里应该用192.168.1.x的地址Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#line vty 0 4Switch(config-line)#loginSwitch(config-line)#password ciscoSwitch# configure terminalSwitch(config)# ip routingSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.5 添加到router的默认路由第一步:创建VLAN:Switch>enSwitch#Vlan DatabaseSwitch(Vlan)>Vlan 5 Name vlan5exit第二步:设置VLAN IP地址:Switch#Config TSwitch(Config)>Int Vlan 5Switch(Config-vlan)Ip Address 172.16.5.1 255.255.255.0Switch(Config-vlan)No Shut第三步:设置端口全局参数Switch(Config)Interface Range Fa 0/1 – 12 (1-12当trunk口,用来级联其他交换机)Switch(Config-if-range)Switchport Mode TRUNKSwitch(Config-if-range) switchport trunk encapsulation dot1qEXITSwitch(Config)Interface Range Fa 0/13 – 24 (13-24当访问口用)Switch(Config-if-range)Switchport Mode AccessSwitch(Config-if-range)Spanning-tree Portfast第四步:将端口添加到VLAN5,20-24添加到VLAN5(12-19不添是在vlan1吗?对)Switch(Config)Interface Range Fa 0/20 - 24Switch(Config-if-range)Switchport Access Vlan 5将3550作为DHCP服务器/*VLAN 1和5可用地址池和相应参数的配置, VLAN1和5要设几个地址池*/ 各设一个Switch(Config)Ip Dhcp Pool Test01/*设置可分配的子网*/Switch(Config-pool)Network 192.168.1.0 255.255.255.0/*设置DNS服务器*/Switch(Config-pool)Dns-server 202.103.224.68/*设置该子网的网关*/Switch(Config-pool)Default-router 192.168.1.2Switch(Config)Ip Dhcp Pool Test05/*设置可分配的子网*/Switch(Config-pool)Network 172.16.5.0 255.255.254.0 (这个段给他510台机器使用)/*设置DNS服务器*/Switch(Config-pool)Dns-server 202.103.224.68 (设为电信dns 有问题吗?没问题)/*设置该子网的网关*/Switch(Config-pool)Default-router 172.16.5.1第5步:设置DHCP保留不分配的地址Switch(Config)Ip Dhcp Excluded-address 192.168.1.1 192.168.1.80Switch(Config)Ip Dhcp Excluded-address 192.168.1.121Switch(Config)Ip Dhcp Excluded-address 192.168.1.250 192.168.1.254(VLAN1只分配81到120的ip)第6步:启用路由/*路由启用后,各VLAN间主机可互相访问*/Switch(Config)Ip Routing第7步:配置访问控制列表Switch(Config)access-list 105 permit ip 172.16.5.0 0.0.1.255 any (any=0.0.0.0. 255.255.255.255吗)(要允许172.16这个段上网,需要设这个吗)不用Switch(Config)access-list 105 permit ip 172.16.5.0 0.0.1.255 192.168.1.2 0.0.0.0(允许访问路由器)Switch(Config)access-list 105 permit udp any any eq bootpcSwitch(Config)access-list 105 permit udp any any eq tftp第7,8步可以省略第8步:应用访问控制列表/*将访问控制列表应用到VLAN 5Switch(Config)Int Vlan 5Switch(Config-vlan)ip access-group 105 out第9步:结束并保存配置Switch(Config-vlan)EndSwitch#wr。
Cisco 3560 系列简单三层划分配置三层交换机具备网络层的功能,实现VLAN 相互访问的原理是:利用三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行选路转发,三层交换机利用直连路由可以实现不同VLAN 之间的相互访问。
三层交换机给接口配置IP 地址。
采用SVI(交换虚拟接口)的方式实现VLAN 间互连。
SVI是指为交换机中的VLAN 创建虚拟接口,并且配置IP地址。
实现目标:PC3能访问PC1和PC2, 但PC1不能和PC2/PC3互通 PC2不能和PC1/PC3互通。
\一、首先我们配置PC上的IP和GateWay:PC1IP: 192.168.1.2Submark: 255.255.255.0Gateway: 192.168.1.1PC2IP: 192.168.2.2Submark: 255.255.255.0Gateway: 192.168.2.1PC3IP: 192.168.1.3Submark: 255.255.255.0Gateway: 192.168.1.1二、其次进行对Cisco2950进行vlan划分:Switch1:Switch>en --进入特权Switch#conf t --全局配置Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2 --创建vlan 2 使用默认vlan名Switch(config-vlan)#exit --退出vlan 2 配置操作Switch(config)#vlan 3 --创建vlan 3Switch(config-vlan)#exit -- 退出vlan 3 配置操作Switch(config)#int fa0/2 --配置交换机2口Switch(config-if)#switch access vlan 2 设置交换机2口为vlan 2 Switch(config-if)#exit --退出2口操作Switch(config)#int fa0/3 --配置3口Switch(config-if)#switch acces vlan 3 --设置交换机3口为 vlan 3 Switch(config-if)#exit --退出3口配置操作。
三层交换机配置与管理一、曰常管理命令二、密码恢复三、VLAN配置四、SPAN监听配置五、DHCP服务配置1. 在上配置DHCP服务2. 配置作为DHCP中继代理六、流量控制七、策略路由一、曰常管理命令l clear arp-cache清除ARP缓存l arp 192.168.100.22 000a.eb22.c1b5 arpa 绑定MAC和IPl sh ip accounting output-packets显示统计信息(当然需要配置统计功能如:ip accounting-transits 3200)l 通过IP追查交换机端口:CiscoWorks 2000 LMS网管软件的User tracking可以追查一个IP地址对应的端口。
sh mac-address-table address 00e0.9102.afd0 显示这个MAC地址在哪个接口出来的;sh mac-address-table interface Fa0/20显示20端口上的MAC地址,如果只有一个,则可能连接一个电脑,如果有很多个条目,则可以连接一个交换机。
sh cdp entry *显示邻居信息;二、密码恢复下面步骤也适用于Cisco 层 2 系列的交换机比如Catalyst 2900/3500XL,2940,2950/2955和层3 系列的比如Catalyst 3550 的密码恢复.通过终端或带有仿真终端程序(比如Hyper Terminal)的PC,连接到交换机的console 对于Catalyst 2900/3500XL 拔下交换机的电源线,然后按住交换机的Mode 按钮,再重新插上交换机的电源线.直到端口Port 1x 的LED 熄灭之后释放Mode 按钮.Catalyst 2940/2950L 拔下交换机的电源线,然后按住交换机的Mode 按钮,再重新插上交换机的电源线.直到STAT 的LED 熄灭之后释放Mode 按钮. Catalyst 2955 对于2955 交换机,它没有外部的Mode 按钮,因此就不能使用之前的那种方法来进行密码恢复.在交换机启动时,对于Windows 系列的PC,按下Ctrl+Break 键;对于UNIX 系列的工作站,按下Ctrl+C.如下:C2955 Boot Loader (C2955HBOOTM) Version 12.1(0.0.514), CISCO DEVELOPMENT TESTVERSIONCompiled Fri 13Dec02 17:38 by madisonWSC2955T12 starting...Base ethernet MAC Address: 00:0b:be:b6:ee:00Xmodem file system is available.Initializing Flash...flashfs[0]: 19 files, 2 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440flashfs[0]: Bytes used: 4510720 flashfs[0]: Bytes available: 3230720 flashfs[0]: flashfsfsck took 7 seconds....done initializing flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4/---接下来交换机会在15 秒内自动启动,等出现该信息之后,按下Ctrl+Break 键或Ctrl+C 键----/The system has been interrupted prior to initializing the flash file system to finishloading the operating system software:flash_init load_helper bootswitch:接下来输入flash_init 命令: switch: flash_init Initializing Flash...flashfs[0]: 143 files, 4 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 3612672flashfs[0]: Bytes used: 2729472 flashfs[0]: Bytes available: 883200 flashfs[0]: flashfs fsck took 86 seconds....done Initializing Flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4switch:接着输入load_helper 命令: switch: load_helper switch:再输入dir flash:命令显示交换机的文件系统:switch: dir flash: Directory of flash:/2 rwx 1803357 <date> c3500xlc3h2smz.1205.WC7.bin4 rwx 1131 <date> config.text5 rwx 109 <date> info6 rwx 389 <date> env_vars7 drwx 640 <date> html18 rwx 109 <date> info.ver403968 bytes available (3208704 bytes used)switch:把配置文件重命名:switch: rename flash:config.text flash:config.old switch:输入boot 命令启动交换机:switch: bootLoading"flash:c3500xlc3h2smz.1205.WC7.bin"...#################### #################################File "flash:c3500xlc3h2smz.1205.WC7.bin" uncompressed and installed, entry point: 0x3000executing...(略)不进入setup 模式:System Configuration DialogAt any point you may enter a question mark '?' for help. Use ctrlc to abort configuration dialog at any prompt. Default settings are in square brackets '[]'.Continue with configuration dialog? [yes/no]: n进入特权模式,恢复原始的配置文件:Switch#rename flash:config.old flash:config.textDestination filename [config.text] Switch#把配置文件保存在内存里:Switch#copy flash:config.text system:runningconfigDestination filename [runningconfig]?1131 bytes copied in 0.760 secsSwitch# 进入全局配置模式,取消密码设置: Switch(config)#no enable secret 保存配置: Switch#write memoryBuilding configuration...[OK] Switch#三、VLAN配置我们现在是一个具备三层交换功能的核心交换机接几台分支交换机(不具备三层交换能力)。
CISCO思科交换机3650G配置命令大全1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(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 gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(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-string6.在基于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/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(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 databaseswitch(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 databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于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 secondsswitch(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-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用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-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用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-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: router(config-if)#mls rp management-interface47. 要检验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 agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
Catalyst 3560 交换机中文简要配置手册目录第1章概述1-11.1 概述1-11.2 初次访问设备1-21.2.1 通过Console口访问设备1-2第2章命令行方式访问设备2-12.1.1 命令行模式2-12.1.2 基本设置命令2-12.2 通过Console口进入命令行接口2-22.3 通过Telnet进入命令行接口2-2第3章接口配置3-13.1 概述3-13.2 二层口配置3-13.2.1 配置端口速率及双工模式3-13.3 配置一组端口3-23.4 配置三层口3-33.5 监控及维护端口3-53.5.1 监控端口和控制器的状态3-53.5.2 刷新、重置端口及计数器3-73.5.3 关闭和打开端口3-83.6 交换机端口镜像配置3-93.6.1 创建一个本地SPAN会话3-103.7 以太通道端口组(Ethernet Port Groups)3-11 第4章配置VLAN 4-124.1 简介4-124.2 可支持的VLAN 4-124.3 配置正常范围的VLAN 4-124.3.1 删除VLAN 4-144.3.2 将端口分配给一个VLAN 4-154.4 配置VLAN Trunks 4-164.5 配置VTP DOMAIN 4-184.6 配置VLAN接口地址4-18第5章交换机HSRP配置5-1第6章路由协议配置6-36.1.1 静态路由6-36.1.2 RIP路由6-36.1.3 OSPF路由6-5第1章概述1.1 概述3560交换机是支持二层、三层功能的交换机,共分为EMI,SMI两个版本Enhanced Multilayer Software Image增强多层软件镜像软件(EMI)•EMI提供了一组更加丰富的企业级功能,包括基于硬件的高级IP单播和多播路由。
•支持双机热备(HSRP),OSPF路由功能.Standard Multilayer Software Image标准多层软件镜像软件(SMI)•SMI功能集包括高级QoS、速率限制、访问控制列表(ACL),以及基本的静态和路由信息协议(RIP)路由功能支持VLAN·到1005 个VLAN·支持VLAN ID从1到4094(IEEE 802.1Q 标准)·支持ISL及IEEE 802.1Q封装安全·支持IOS标准的密码保护·静态MAC地址映射·标准及扩展的访问列表支持,对于路由端口支持入出双向的访问列表,对于二层端口支持入的访问列表·支持基于VLAN的访问列表3层支持(需要多层交换的IOS)·HSRP·IP路由协议o RIP versions 1 and 2o OSPFo IGRP及EIGRPo BGP Version 4支持以下SFP模块:·1000BASE-T SFP: 铜线最长100 m·1000BASE-SX SFP: 光纤最长1804 feet (550 m)·1000BASE-LX/LH SFP: 光纤最长32,808 feet (6 miles or 10 km) ·1000BASE-ZX SFP: 光纤最长328,084 feet (62 miles or 100 km)管理从用户与设备交互的特点来分,访问设备的方式可以分为命令行方式和Web方式。
l 命令行方式:包括从Console口登录进行访问和通过Telnet登录进行访问;l Web方式:包括通过HTTP进行的普通Web访问。
1.2 初次访问设备1.2.1 通过Console口访问设备用户接收到除去包装的新设备后一般通过Console口第一次登录设备并开始对设备进行配置,过程如下:第一步:建立本地配置环境,只需将计算机(或终端)的串口通过标准RS-232电缆与此Catalyst 3560设备的Console口连接第二步:在计算机上运行终端仿真程序(如WinXP的超级终端等),设置终端通信参数为9600bps、8位数据位、1位停止位、无奇偶校验和无流量控制,如图1-1至图1-3所示。
图1-1 新建连接图1-2 连接端口设置图1-3 端口通信参数设置第四步:Catalyst 3560设备上电自检,出现命令行提示符,如:Switch>。
此时用户已经进入到设备命令行配置接口的用户模式,从这里开始就可以参考本手册其余章节对设备进行配置。
第2章命令行方式访问设备如果用户通过Console口登录,或者通过Telne从设备管理口登录都将进入到设备的命令行接口,对系统的配置和交互都通过命令行的方式进行。
2.1.1 命令行模式命令行接口提供的命令行视图和各视图的功能特性、进入各视图的命令等的细则如表2-1所示。
表2-1 命令视图功能特性列表模式功能提示符进入命令退出命令非特权模式查看CISCO 设备的简单运行状态Switch> 开机时自动进入特权模式配置系统参数,升级IOS软件,备份配置文件Switch# 在非特权模式下键入ENABLE quit返回非特权模式全局模式CISCO交换机大部分配置都是在这个模式下进行Switch(config)# 在特权模式下键入configure terminal quit返回特权模式监控模式升级IOS系统软件Switch:开机时摁住面板上的MODE键约5秒钟2.1.2 基本设置命令基本设置命令任务命令全局设置config terminal设置访问用户及密码Username username password password设置特权密码enable secret password设置路由器名Hostname name设置静态路由ip route destination subnet-mask next-hop启动IP路由ip routing启动IPX路由ipx routing端口设置interface type slot/number设置IP地址ip address address subnet-mask设置IPX网络ipx network network激活端口no shutdown物理线路设置line type number启动登录进程login [local|tacacs server]设置登录密码Password password显示命令任务命令查看版本及引导信息show version查看运行设置show running-config查看开机设置show startup-config显示端口信息show interface type slot/number显示路由信息show ip route2.2 通过Console口进入命令行接口详细内容请参见“1.2.1 通过Console口访问设备”。
2.3 通过Telnet进入命令行接口Telnet协议在TCP/IP协议族中属于应用层协议,通过网络提供远程登录和虚拟终端功能。
CATALYST 3560向用户提供Telnet服务,第一步:在计算机上运行Telnet程序,键入CATALYST 3560设备管理IP地址Switch>enableSwitch#conf tSwitch(config)# interface vlan 1Switch(config-if)#ip address 10.1.1.20 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#line vty 0 4Switch(config-line)#loginSwitch(config-line)#password cisco如图2-1所示。
图2-1 与CATALYST 3560建立Telnet连接& 说明:图2-1中的IP地址为CATALYST 3560设备IP地址,即vlan1的接口地址第3章接口配置3.1 概述Catalyst 3560支持的以太网接口说明请见下表。
表3-1 Catalyst 3560接口说明项目说明接口类型FE电接口:符合100Base-TX物理层规范GE电接口:1000Base-TX物理层规范工作速率FE电接口可以选择10Mbit/s、100Mbit/s两种速率GE电接口可以选择10Mbit/s、100Mbit/s、1000Mbit/s三种速率工作模式自动协商模式3.2 二层口配置3560的所有端口缺省的端口都是二层口,如果此端口已经配置成三层端口的话,则需要用switchport来使其成为二层端口。
3.2.1 配置端口速率及双工模式1. 可以配置快速以太口的速率为10/100Mbps及千兆以太口的速率为10/100/1000-Mbps; 但对于SFP端口则不能配置速率及双工模式,有时可以配置nonegotiate,当需要联接不支持自适应的其它千兆端口时表3-2 管理口配置命令目的Step 1 configure terminal 进入配置状态.Step 2 interface interface-id 进入端口配置状态.Step 3 speed {10 | 100 | 1000 | auto | nonegotiate} 设置端口速率注 1000 只工作在千兆口. GBIC模块只工作在1000 Mbps下. nonegotiate 只能在这些GBIC上用1000BASE-SX, -LX, and -ZX GBIC.Step 4 duplex {auto | full | half} 设置全双工或半双工.Step 5 end 退出Step 6 show interfaces interface-id 显示有关配置情况Step 7 copy running-config startup-config 保存Switch# configure terminalSwitch(config)# interface fastethernet0/3Switch(config-if)# speed 10Switch(config-if)# duplex half3.3 配置一组端口命令目的Step 1 configure terminal 进入配置状态Step 2 interface range {port-range} 进入组配置状态Step 3 可以使用平时的端口配置命令进行配置Step 4 end 退回Step 5 show interfaces [interface-id] 验证配置Step 6 copy running-config startup-config 保存见以下例子:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 5Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05,changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changedstate to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changedstate to up以下的例子显示使用句号来配置不同类型端口的组:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1,changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2,changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3,changed state to up3.4 配置三层口Catalyst 3560支持三种类型的三层端口:·SVIs: 即interface vlanNote 当生成一个interface Vlan时,只有当把某一物理端口分配给它时才能被激活·三层以太网通道口(EtherChannel): :以太通道由被路由端口组成。