发新话题
打印

cisco6500交换机文件系统详解

取消高亮

cisco6500交换机文件系统详解

6500的引擎板一般包含两个部分:管理引擎SE和多层交换特性卡MSFC。在SE和MSFC上都内置了存放文件用的Flash文件系统,设备名为bootflash:,引擎上还可以插PCMCIA 接口的Flash卡,设备名为:slot0: 和slot1: 或CF--CompactFlash卡,设备名为disk0:和disk1
6500可以配置两块引擎板,一主(active, main)一备(standby, redundant )。
上面的命令中:
slaveslot0:....................指备份引擎上的slot0:
slavesup-bootflash:......指备份引擎上的bootflash:
slavebootflash:.............指备份引擎上的MSFC的bootflash:
SP, Supervisor Engine: 交换引擎,二层引擎
RP, MSFC: 路由处理器,三层引擎
Bootloader, boot Helper: boot IOS,名字类似于 c6msfcx-boot-xxx
Cisco IOS: 整合的系统IOS软件,名字类似于c6supxx-xxx
CatOS: 二层引擎系统软件,名字类似于cat6000-supx-xxx
MSFC IOS: 三层引擎系统软件,名字类似于 c6msfcx-xxx
6509设备的引擎有RP和SP之分。所以有些配置需要在RP和SP上面各做一遍。
6509在升级到IOS之后,原先SP引擎的BOOTFLASH会被改名为:SUP-BOOTFLASH。
而原先RP上MSFC的BOOTFLASH会被认为引擎的BOOTFLASH。虽然如此,
6509是不能通过MSFC的BOOTFLASH上的IOS启动的。必须通过SUP-BOOTFLASH。这个要注意!
config-reg 先于boot system 命令,只有config-reg 后一位(16进制)为0x2~0xF时
boot system 命令就才会被检查。
flash:一般指外接的PCMCIA卡或CF--Compact Flash卡,以slot,或disk显示cf卡(disk)
bootflash:msfc卡上的flash:
sup-bootflash:supervisor上的flash:
SUP1+PFC+MSFC / SUP1A+PFC+MSFC2的特别需求
sup-bootflash(SP的bootflash)中或者slot0放置 IOS c6sup11-xxx。 bootflash(RP的
bootflash)中必须放置MSFC的bootloader c6msfc-boot-xxx。
______________________________________________________
提示 bootloader必须放在MSFC bootflash的第一个文件。
如果bootflash(RP的bootflash)中放置RP的bootloader被删除,那么SP启动完成后就会进入RP的
这个时候就需要做RP的bootloader的recovery。
可以通过xmodem来加载一个bootloader,然后再将slot0上的bootloader拷贝到bootflash(RP的
bootflash)中。
______________________________________________
注意 在 Route(boot)> 提示符下是不能dir slot0:或者 dir sup-slot0:的,同时也不能使用
copy命令。必须使用隐藏命令download或者emergency-download。
(如果版本早于c6msfc-boot-mz.121-12c.E2, 命令是 download;如果是c6msfc-boot-mz.121-
12c.E2或者更新的,那么命令是emergency-download)

SUP2+PFC2+MSFC2
sup-bootflash(SP的bootflash)中或者slot0放置 IOS c6sup22-xxx,bootflash(RP的
bootflash)中可以不用放置bootloader。
________________________________________
提示 建议保留一个c6msfc2-boot-xxx。
SUP32+PFC3B+MSFC2A
无特别需求
SUP720+PFC3+MSFC3
无特别需求
运行Hybrid OS(CatOS+MSFC IOS)的6500/7600软件放置位置
IOS可以放在sup-bootflash(SP的bootflash)或者flash 卡(slot0: 或 disk0中;但是不能放
在bootflash(RP的bootflash)中。
CatOS存放在Supervisor bootflash 或者 flash 卡 (Supervisor 1A 和Supervisor 2使用
PCMCIA卡, and Compact Flash for both the Supervisor Engine 32 和 Supervisor
Engine 720使用CF--Compact Flash--卡)。MSFC IOS放在MSFC bootflash(RP的

TOP

之前没有看到 现在补回来  好资料

TOP

cisco6500交换机文件系统详解

TOP

3.3. 配置机器名、telnet、密码

3.3. 配置机器名、telnet、密码  
在全局模式下,用conf t,进入配置模式,进行以下配置:  
以下内容需要回复才能看到
#conf t  
#clock timezone GMT 8 ;配置时区  
#clock set 13:30:21 31 JAN 2004 ;配置交换机时间  
#clock calendar-valid ;使能硬件时钟同步  
#service timestamps debug datetime localtime ;配置系统debug记录时间格式  
#service timestamps log datetime localtime ;配置系统日志记录时间格式  
#service password-encryption ;配置使用加密服务,主要针对口令加密  
#hostname xxxx ;配置交换机名称  
#enable secret   0 xxxxx ;配置enable口令  
#copy run start ;将配置信息保存到NVRAM中,重启动不会丢失  
#line vty 0 4 ;配置telnet  
#exec-timeout 30 0  
#password 0   xxxx  
#login  
3.4. 配置snmp  
#conf t  
#snmp-server community cisco ro(只读) ;配置只读通信字符串  
#snmp-server community secret rw(读写) ;配置读写通信字符串  
#snmp-server enable traps   ;配置网关SNMP TRAP  
#snmp-server host 10.254.190.1 rw ;配置网关工作站地址  

3.5. 启动三层功能  
#ip routing ;启动路由功能  
3.6. 查看和配置系统环境变量  
使用show bootvar命令查看系统启动环境变量,包括BOOT, BOOTLDR, and
CONFIG_FILE参数:  
Router# show bootvar  
BOOT variable = slot0:c6sup22-jsv-mz.121-5c.EX.bin,1;  
CONFIG_FILE variable does not exist  
BOOTLDR variable = bootflash:c6msfc2-boot-mz.121-3a.E4  
Configuration register is 0x2  
Router#  
改变BOOT,、BOOTLDR、CONFIG_FILE 这三个环境变量使用命令:  
BOOT   #boot system  
BOOTLDR   #boot bootldr  
CONFIG_FILE #boot config  
4. 端口设置  
4.1. 端口基本设置   
Cisco 65xx系列交换机的端口缺省都是路由模式,一般都会配置为交换端口使用,进
入端口配置模式:  
对于单一端口,在配置模式下输入:interface Ethernet,Fast Ethernet,Gigabit
Ethernet x/y, x为槽位号,y为端口号。  
对于一组端口,可以使用以下的命令进入,例如:  
Router(config)# interface range fastethernet 5/1 - 5      或:  
Router(config-if)# interface range gigabitethernet 2/1 - 2, gigabitethernet
3/1 - 2  
进行端口配置模式后,可以shutdown,或no shutdown端口,并可以对端口进行配置,
快速以太端口有全双工、半双工和自动协商模式,如果知道对端连接的设备是采用何
种方式,最好采用手工设置方式固定端口的模式和速率。缺省是自动协商模式。  
快速以太端口的速率可以设置为100M,也可以设置为10M和自动协商。缺省是自动协
商方式。如:  
Router(config-if)#speed [10 | 100 | auto](速度)  
Router(config-if)# duplex [auto | full | half](双工)  
或添加注释,如:  
Router(config-if)# description Channel-group to "Marketing"  
4.2. 配置二层交换接口  
(以fastethernet为例,gigabitethernet一样)  
Router(config)# interface fastethernet x/y   
Router(config-if)# shutdown   
Router(config-if)# switchport   ;6500上缺省端口为路由端口,需要写switchport
将端口设置为交换端口  
Router(config-if)# switchport mode access   
Router(config-if)# switchport access vlan x   
Router(config-if)# no shutdown   
Router(config-if)# end  

清除二层接口配置  
(以fastethernet为例,gigabitethernet一样)  
Router(config)# interface fastethernet x/y   
Router(config-if)# no switchport   
Router(config-if)# end  
注:使用default interface {ethernet | fastethernet | gigabitethernet}
slot/port,使端口回到原来的缺省配置。  
4.3. 配置三层路由端口  
6500的端口缺省就是具有三层交换的端口,用来跟其他设备的连接,当将一个端口配
置成三层端口之后,就可以在此端口上分配IP地址了。  
Router(config)# interface fastethernet x/y  
Router(config)# ip add x.x.x.x x.x.x.x  
Router(config)# no shutdown  
4.4. 配置端口Trunk   
将一个二层端口配置为Trunk模式:  
Router(config)# interface fastethernet x/y (以fastethernet为例,
gigabitethernet一样)  
Router(config-if)# shutdown   
Router(config-if)# switchport   
Router(config-if)# switchport trunk encapsulation dot1q   
Router(config-if)# switchport mode trunk  
Router(config-if)# no shutdown   
Router(config-if)# end   
Router# exit  
4.5. Ethernaet Channel  
Router(config)# interface range gigabitethernet1/1 - 2  
Router(config-if)#no ip address   
Router(config-if)#switchport  
Router(config-if)#switchport trunk encapsulation dot1q   
Router(config-if)#switchport mode trunk  
Router(config-if)#switchport trunk native vlan 1   
Router(config-if)#channel-group 1 mode on   

R>interface Port-channel1 ;自动产生,并且一定要如下所示,否则可能会有问题。  
switchport  
switchport trunk encapsulation dot1q  
switchport mode trunk  
!  
interface GigabitEthernet1/1   
   no ip address   
   switchport   
   switchport trunk encapsulation dot1q   
   switchport trunk native vlan 1   
   channel-group 1 mode on   
!   
interface GigabitEthernet1/2   
   no ip address   
   switchport   
   switchport trunk encapsulation dot1q   
   switchport trunk native vlan 1   
   channel-group 1 mode on   
如果有问题,使用命令#no int port-channel 1   ,#int g2/1 -2   ,#no switchport  
4.6. 查看端口配置  
Router# show running-config interface fastethernet 5/8  
Router# show interfaces fastethernet 5/8 switchport  
Router# show running-config interface port-channel 1  
Router# show spanning-tree interface fastethernet 4/4  
5. 配置VLAN  
5.1. 配置VTP  
VTP是一个2层信息协议,包括版本1和2。一个网络设备只能属于一个VTP domain。
缺省, Catalyst 6500交换机配置为VTP server mode,在没有管理域的状态。直到
在一个trunk链路上收到其他域的宣告或手工配置管理域。VTP并不是一定要配置,
但是配置可以简化配置复杂度和易于管理。  
VTP pruning(VTP裁剪)增强了网络带宽利用率。结合VTP,使得没有必要接收某个
vlan的广播信息的交换机被裁剪,免于接收包括broadcast, multicast, unknown,
and flooded unicast的包。  
Router(config)# vtp domain domain_name  
Router(config)# vtp mode {client | server | transparent}  
Router(config)# vtp version {1 | 2}  
Router(config)# vtp password password_string  
Router(config)# vtp pruning  
Router# show vtp status  
5.2. 配置VLAN端口  
5.3. 创建VLAN  
缺省状态下,所有的二层端口均属于vlan1,vlan的配置方法如下:  
命令 目的   
Step 1    Router# vlan database 进入vlan配置方式.  
Step 2    Router(vlan)# vlan vlan_ID   加入一个VLAN.  
Step 3 Router(vlan)# vtp domain   name 设置vtp域名  
Step 3    Router(vlan)# exit   更新VLAN数据库,并在管理域内广播,退到全局模
式  
Step 4    Router# show vlan name vlan_name   验证VLAN配置  

删除配置好的vlan  
Router# vlan database  
Router(vlan)# no vlan x  
Deleting VLAN 3...  
Router(vlan)# exit  
5.4. 给vlan分配端口  
Router(config)# interface fastethernet x/y   
Router(config-if)# shutdown   
Router(config-if)# switchport   
Router(config-if)# switchport mode access   
Router(config-if)# switchport access vlan x  
Router(config-if)# no shutdown   
Router(config-if)# end   
Router# exit  
5.5. 配置vlan地址  
Router(config)# interface vlan x   
Router(config)# ip add x.x.x.x x.x.x.x  
6. 配置HSRP  
不同网段之间的通信都是通过在终端工作站上设定缺省网关来实现的,为了实现冗
余,每台交换机上必然要配置相同的网段,那么就会在一个网段中出现2个不同地址
的路由

接口(对于工作站就是缺省网关),当1条上联链路失效时,数据必然会从另
外1条链路传输到另外一台交换机上进行处理,这时就存在缺省网关变更的问题。  
为了消除当一条链路失效导致的工作站缺省网关重新定义的问题,我们使用Cisco公
司专有HSRP(Hot Standby Redundant Protocol)技术来解决这个问题。  
HSRP技术就是将分布在2台交换机上相同网段的不同路由接口IP地址映射为一个虚
拟IP地址来消除工作站缺省网关重新定义的问题。配置如下:  
在其中一台65xx上按下面模版进行配置  
interface Vlan x   
   ip address x.x.x.x x.x.x.x  
   no ip redirects   
   no ip directed-broadcast   
   standby 1 ip y.y.y.y  
   standby 1 priority 100   
   standby 1 preempt  
standby 1 authentication secret  

在另一台65xx上按下面模版进行配置  
interface Vlan x   
   ip address x.x.x.x x.x.x.x   
   no ip redirects   
   no ip directed-broadcast   
standby 1 ip y.y.y.y  
   standby 1 priority 110 ;这个优先级高,成为Master  
   standby 1 preempt  
standby 1 authentication secret  

7. 配置NTP  
NTP (Network Time Protocol) 为路由器、交换机和工作站之间提供了一种时间同步
的机制。时间同步了,多台网络设备上的相关事件记录可以放在一起看,更为清晰,
方便了分析较复杂的故障和安全事件等。   
(1)本地时钟设置:  
clock timezone Peking +8 ;定义时区  
clock calendar-valid ;允许使用硬件calendar作为时钟源  
clock set hh:mm:ss month year ;如clock set 14:02:30 10 December 2003  
clock update-calendar ;更新硬件时钟  
(2)ntp server  
ntp calendar-update ;允许NTP定期更新calendar  
ntp master 3 ;允许本机作为NTP协议的主时钟,精度级别3,供其它对等体同步用。  
ntp source int vlan 7 ;设置ntp时钟原的端口或IP地址  
(3)常用的调试命令有:  
show ntp status   
show ntp associations  
8. 配置镜像端口  
在交换机上配置镜像端口(Mirroring Port)用于建立内部网络的监控端口,以便收
集相关被监测端口的数据流量,进行数据流监控及分析。我们这里配置镜像端口用于
配置入侵检测设备(镜像端口)的检测口检测一级防火墙和二级防火墙的内网接口,
以探测是否有入侵行为发生。  
#monitor session 1 source interface Fa7/14 - 19 rx  
#monitor session 1 destination interface Fa7/22  
#monitor session 2 source interface Fa7/24  
#monitor session 2 destination interface Fa7/25  
9. 升级配置  
9.1. 交换机IOS保存和升级  
交换机的IOS保存和升级是采用TFTP协议完成,所以首先你必须要下载一个TFTP软
件,然后按照下面的步骤来进行:  
1.在你的机器上启动TFTP 。  
2.登陆到交换机,然后在enable状态下输入如下命令来完成IOS的保存:  
switch#copy   flash   tftp     
Source IP address or hostname [171.68.206.171]?   
Source filename []? cat6000-sup2k8.7-1-1.bin  
Destination filename [cat6000-sup2k8.7-1-1.binn]?   
Loading cat6000-sup2k8.7-1-1.bin to 171.68.206.171 (via VLAN1):     !!!!  
!!!!!!!!!!!  
[OK - 1125001 bytes]  
3.如果你要升级IOS文件,那么你首先要检查flash空间是否够,如果空间不够的
话,则需要先删除原来的IOS然后再升级。按照如下命令来完成IOS的升级:  
switch#copy   tftp   flash  
Source IP address or hostname []? 171.68.206.171  
Source filename []? cat6000-sup2k8.7-1-1.bin  
Destination filename [cat6000-sup2k8.7-1-1.bin]?   y  
Loading cat6000-sup2k8.7-1-1.bin

from 171.68.206.171 (via VLAN1):     !!!!  
!!!!!!!!!!!  
[OK - 1125001 bytes]  
9.2. 配置从另外一个版本的IOS启动  
如果交换机FLASH容量允许的话,我们可以在不删除原有交换机内部IOS软件的情况
下配置交换机从另外一个版本的IOS启动,这样可以避免一定程度上由于删除原有
IOS软件带来的风险。  
1.拷贝新的IOS到交换机的FLASH内。假设新的IOS软件名称为
cat6000-sup2k8.7-1-1.bin  
# copy tftp flash  
2.配置从新的IOS软件引导  
# boot system flash [flash-fs:][partition-number:][filename]  
#boot system flash sup-bootflash: cat6000-sup2k8.7-1-1.bin

TOP

发新话题
最近访问的版块