cisco3560
2. 1.2 基本设置命令
基本设置命令
任务 命令
全局设置 config terminal
设置访问用户及密码 Username username passwordpassword
设置特权密码 enable secret password
设置路由器名 Hostname name
设置静态路由 ip route destination subnet-masknext-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 route
2.2 通过Console口进入命令行接口
详细内容请参见“1.2. 1 通过Console口访问设备” 。
2.3 通过Telnet进入命令行接口
Telnet协议在TCP/IP协议族中属于应用层协议通过网络提供远程登录和虚拟终端功能。 CATALYST 3560向用户提供Telnet服务第一步在计算机上运行Telnet程序键入CATALYST 3560设备管理IP地址
Switch>enable
Switch#conf t
Switch(config)# interface vlan 1
Switch(config-if)#ip address 10. 1. 1. 20 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#line vty 0 4
Switch(configline)#login
Switch(configline)#password cisco
如图2-1所示。
图2-1与CATALYST 3560建立Telnet连接
& 说明
图2-1中的IP地址为CATALYST 3560设备IP地址即vl an1的接口地址
第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/100 Mb p s及千兆以太口的速率为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只工作在千兆口. GB I C模块只工作在1000Mbps下. nonegoti ate只能在这些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 terminal
Switch(config)# interface fastethernet0/3
Switch(config-if)# speed 10
Switch(config-if)# duplex half
3.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 terminal
Switch(config)# interface range fastethernet0/1 - 5
Switch(config-if-range)# no shutdown
Switch(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 onInterface FastEthernet0/05,changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/3, changedstate to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/4, changedstate to up
以下的例子显示使用句号来配置不同类型端口的组:
Switch# configure terminal
Switch(config)# interface range fastethernet0/1 - 3,gigabitethernet0/1 - 2
Switch(config-if-range)# no shutdown
Switch(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 onInterface GigabitEthernet0/ 1,changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/ 2,changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/ 3,changed state to up
3.4 配置三层口
Catalyst 3560支持三种类型的三层端口:
· SVIs: 即interface vlan
Note 当生成一个interface Vlan时只有当把某一物理端口分配给它时才能被激活
· 三层以太网通道口EtherChannel : 以太通道由被路由端口组成。 以太通道端口接口在“配置以太通道”中被描述。· .路由口路由口是指某一物理端口在端口配置状态下用no switchport命令生成的端口
所有的三层都需要IP地址以实现路由交换
配置步骤如下
命令 目的
Step 1 configure terminal 进入配置状态Step 2 interface { {fastethernet | gigabitethernet}interface-id} | {vlan vlan-id} | {port-channelport-channel-number} 进入端口配置状态
Step 3 no switchport 把物理端口变成三层口Step 4 ip address ip_address subnet_mask 配置IP地址和掩码
Step 5 no shutdown 激活端口
Step 6 End 退出
Step 7 show interfaces [interface-id]show ipinterface [interface-id]show running-config interface[interface-id] 验证配置
Step 8 copy running-config startup-config 保存配置
配置举例如下
Switch# configure terminal
Enter conf iguration commands, one per line. End with CNTL/Z.Switch(config)# interface gigabitethernet0/2
Switch(config-if)# no switchport
Switch(config-if)# ip address 192.20. 135.21 255. 255.255.0Switch(config-if)# no shutdown
3设置快速端口
默认情况下交换机在刚加电启动时每个端口都要经历生成树的四个阶段阻塞、侦听、学习、转发。在能够转发用户的数据包之前某个端口可能最多要等50秒钟的时间20秒的阻塞时间15秒的侦听延迟时间15秒的学习延迟时间。
对于直接接入终端工作站的端口来说用于阻塞和侦听的时间是不必要的。为了加速交换机端口状态转化时间可以设置将某端口设置成为快速端口 Portfast。设置为快速端口的端口当交换机启动或端口有工作站接入时将会直接进入转发状态而不会经历阻塞、侦听、学习状态假设桥接表已经建立。
如图所示设置访问层交换机AccessSwitch1的端口1端口20为快速端口。
图2-2 设置快速端口
halocloud怎么样?halocloud是一个于2019下半年建立的商家,主要提供日本软银VPS,广州移动VDS,株洲联通VDS,广州移动独立服务器,Halo邮局服务,Azure香港1000M带宽月抛机器等。日本软银vps,100M/200M/500M带宽,可看奈飞,香港azure1000M带宽,可以解锁奈飞等流媒体,有需要看奈飞的朋友可以入手!点击进入:halocloud官方网站地址日本vp...
hostkvm怎么样?hostkvm是一家国内老牌主机商家,商家主要销售KVM架构的VPS,目前有美国、日本、韩国、中国香港等地的服务,站长目前还持有他家香港CN2线路的套餐,已经用了一年多了,除了前段时间香港被整段攻击以外,一直非常稳定,是做站的不二选择,目前商家针对香港云地和韩国机房的套餐进行7折优惠,其他套餐为8折,商家支持paypal和支付宝付款。点击进入:hostkvm官方网站地址hos...
木木云怎么样?木木云品牌成立于18年,此为贵州木木云科技有限公司旗下新运营高端的服务器的平台,目前已上线美国中部大盘鸡,母鸡采用E5-267X系列,硬盘全部组成阵列。目前,木木云美国vps进行了优惠促销,1核1G/500M带宽/1T硬盘/4T流量,仅35元/月。点击进入:木木云官方网站地址木木云优惠码:提供了一个您专用的优惠码: yuntue目前我们有如下产品套餐:DV型 1H 1G 500M带宽...