Chinaunix首页 | 论坛 | 博客
  • 博客访问: 66229
  • 博文数量: 8
  • 博客积分: 135
  • 博客等级: 入伍新兵
  • 技术积分: 107
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 22:12
文章分类

全部博文(8)

文章存档

2013年(2)

2012年(5)

2011年(1)

我的朋友

分类:

2012-12-24 17:52:02

CLI Config For MDS 9000

V 1.3
2
目录
说明............................................................................................................................................. 3
初始化............................................................................................................................................. 4
申请license 并导入和安装................................................................................................................8
Switch Config....................................................................................................................................10
vsan............................................................................................................................................10
激活光纤口...............................................................................................................................10
Domain...................................................................................................................................... 10
Zone...........................................................................................................................................10
Zoneset.......................................................................................................................................11
Save config................................................................................................................................ 11
修改IP,建议通过串口线修改...................................................................................................... 11
网口灯不亮的解决方法................................................................................................................... 11
修改密码........................................................................................................................................... 12
修改交换机名字...............................................................................................................................12
开启telnet......................................................................................................................................... 12
恢复密码........................................................................................................................................... 12
配置收集........................................................................................................................................... 13
清除配置:....................................................................................................................................... 14
使端口能够接受license...................................................................................................................14
官网下载Flare:..............................................................................................................................15
交换机重新导入配置.......................................................................................................................16
安装系统........................................................................................................................................... 18
3
说明
以下是用命令行配置的MDS9000 的过程,cisco 交换机的配置方法一样,具体命令介
绍可以去cisco 网站或相关论坛下载CLI 命令的资料,其中“Cisco MDS 9000 Family CLI
Configuration Guide, Release.pdf”比较不错。
MDS9124(其他型号应该也一样)交换机,前面8 个口是激活的,后面的口需要用license
激活,根据PAK(随货物一起)和交换机序列号到CISCO
网站登录申请即可,到时候会生成一个文件发送到你的邮箱,然后将其导入即可激活。
此次这个文档,根据自己平时实施过程中的情况、老工程师的文档(初始化)、以及Cisco
交换机的官方文档,结合起来编写而成,其中还有很多不足,需要大家以后一起修正。特别
是对于交换机密码恢复和升级image 的两个操作,平时没遇到过,都是摘自cisco 文档,如
果以后遇到该情况,建议再继续参考下cisco 文档进行实施。
4
初始化
用串口线登录到交换机console 口,使用超级终端(用SecureCRT 也可以,它比较直观,
可以看到全部过程,这里以超级终端为例),默认配置,会见到如下图1 所示↘
图1
关闭交换机的电源开关,然后开启开关,终端上会出现如图2 显示↘
图2
配置admin 帐户的密码,最好适当长点,不然会不匹配,到时候需要把这个密码告诉用户,
或者向用户咨询下设置什么密码,目的就是方便用户自己知道密码,如图3↘
5
图3
配置好密码后就会出现快速配置向导,根据提示进行即可,如下图4↘
图4
配置switch name 和Mgmt0 IP 等,如图5↘
6
图5
这里建议把telnet 或者ssh 功能开启,如图6,这样方便直接通过网线可以登录上去用命令
行进行配置↘
图6
确认配置是否正确,图7↘
7
图7
保存配置,图8↘
图8
8
申请license并导入和安装
前提:用命令行导入license,必须在自己电脑上安装一个TFTP 软件,很小;
1、switch#sh lic host-id 显示该switch 的SN,名字为“=”后面的内容;
2、根据SN 和随交换机一起的PAK 号去 申请,到时候会自
动发一个邮件到你指定邮箱,名字为“MDS20081012234855766.lic”该种格式;
3、如果申请License 出了问题,请发邮件到 去申请,英文邮件说清
原因,需要项目的SO 号。
4、通过telnet 连接到switch,打开tftp 软件,指定你电脑上license 的路径,如下图1↘
图1
指定路径,点击“浏览”,选择license 所在文件夹,如图2↘
图2
5、switch#copy tftp: bootflash: 输入该命令并回车
6、根据提示输入license 的名字,如MDS20081012234855766.lic;
提示输入TFTP 的IP,这个IP 就是你自己电脑的地址;
最后会显示上传成功。
9
7、switch#install license bootflash:MDS20081012234855766.lic 安装license
Installing license ..done ………………………………………… 安装提示情况
8、安装成功后,你可以通过sh run 命令查看各个端口情况,会出现有8 个端口被激活,显
示为port-license acquire,而没被激活的端口是没有该命令的;
9、switch#sh license brief 安装后,查看license
10、switch#copy run start 保存配置,cisco 交换机最好每
次退出要保存,以免重启丢失信息
11、switch#copy license bootflash:/ 备份license
12、switch#clear license MDS20081012234855766.lic 删除license
13、遇到问题:安装license 有可能发现未能激活端口,依然没有亮绿灯,也没有出现portlicense
acquire,可以删除license,然后重新导入解决,遇到过一次,不知道有没有别的
办法。
10
Switch Config
说明:在cisco 交换机里面,如果要删除一个配置,在你原先命令前面加no 既可实现,如不
能实现的话,可以查看命令文档;
如需要帮助,或者你忘记命令,可以通过输入“?”就会显示相关命令行,很不错
的功能;
………………………………………………………………………………………………………
vsan
switch# conf t 进入配置界面,会出现(config);
switch(config)# vsan database 进入database;
switch(config-vsan-db)# vsan 100 创建vsan,交换机自带一个VSAN001,可
以用这个默认的,也可以新创建一个VSAN
switch(config-vsan-db)#vsan 100 interface fc1/1 - 8 将所有端口都加入到vsan,MDS9214 有24
口,都加入进去,因为一般只用一个vsan;
………………………………………………………………………………………………………
激活光纤口
switch# conf t
switch(config)# int fc1/1 - 8
switch(config-if)# no shut 激活后,端口就会发光
………………………………………………………………………………………………………
Domain
switch#conf t
switch(config)#fcdomain domain 2 static vsan 100 创建一个domain;
switch(config)# fcdomain restart vsan 100 Restarting a Domain
switch(config)# interface fc1/1 激活要用的端口,这个是物理激活,用no
shut 命令,建议所有都激活;
switch(config)# no shut
………………………………………………………………………………………………………
Zone
switch# conf t
switch(config)#zone name zone1 vsan 100 创建ZONE;
11
switch(config-zone)#member interface fc1/1 将需要的端口加入zone1;
switch(config-zone)#member interface fc1/3 将需要的端口加入zone1;
switch(config)#no zone name zone1 vsan 100 删除ZONE;
如退出zone 后发现,需要继续添加端口,用同样上面的方式进行即可;
………………………………………………………………………………………………………
Zoneset
switch# conf t
switch(config)# zoneset name Zoneset1 vsan 100 创建zoneset,即config;
switch(config)#member zone1 将zone 加入zoneset;
switch(config)#member zone2
switch(config)#zoneset activate name zoneset1 vsan 100 激活zoneset,不激活的话,交换机
SFP 模块口的灯会亮,但是存储上
找不到路径,和config 一样,后面
加入一个zone,就要激活;
如需要继续添加zone,用同样上面的方式进行即可,但是必须记得激活;
………………………………………………………………………………………………………
Save config
switch# copy running-config startup-config 保存配置,不要忘记这步;
………………………………………………………………………………………………………
修改IP,建议通过串口线修改
switch#conf t
switch(config)# ip default-gateway <1.1.1.1>
switch(config)# int mgmt 0
switch(config)-if# ip address <192.168.1.1> <255.255.255.0> 输入修改后的IP 和掩码
switch(config-if)# switchport speed 10/100/100 如果你电脑比较旧,非自适应,
则需要修改端口速率
………………………………………………………………………………………………………
网口灯不亮的解决方法,laptop和switch通过串口连接
switch#conf t
switch(config)# int mgmt 0
12
switch(config-if)# shutdown 提示是否继续,选择“y”
switch(config-if)# no shut
………………………………………………………………………………………………………
修改密码
switch#conf t
switch(config)# username <用户名> password <密码>
………………………………………………………………………………………………………
修改交换机名字
switch#conf t
switch(config)#switchname
………………………………………………………………………………………………………
开启telnet
switch#conf t
switch(config)# telnet server enable 开启
switch(config)# no telnet server enable 关闭
………………………………………………………………………………………………………
恢复密码(方法都一样,做之前建议再查看下别的官方文档)
通过超级终端用cisco 自带串口线和交换机的console 口相连;
Step 1 For Cisco MDS 9500 Series switches with two supervisor modules, remove the
supervisor module inslot 6 from the chassis.
Step 2 Power cycle the switch.
Step 3 Press the Ctrl-] key sequence when the switch begins its Cisco SAN-OS software boot
sequence to enter the
switch(boot)# prompt mode.
Ctrl-]
switch(boot)#
Step 4 switch(boot)# config terminal
Step 5 Issue the admin-password command to reset the administrator password.
switch(boot-config)# admin-password
Step 6 Exit to the EXEC mode.
13
switch(boot-config)# exit
switch(boot)#
Step 7 Issue the load command to load the Cisco SAN-OS software.
switch(boot)# load bootflash:m9500-sf1ek9-mz.2.1.1a.bin
说明:about step7,If you boot a system image that is older than the image you used to store the
configuration and do not use the install all command to boot the system, the switch erases
the binary configuration and uses the ASCII configuration. When this occurs, you must use
the init system command to recover your password.
Step 8 Log in to the switch using the new administrator password.
switch login: admin
Password:
Step 9 Reset the new password
switch# config t
switch(config)# username admin password
switch(config)# exit
switch#
Step 10 switch# copy running-config startup-config
………………………………………………………………………………………………………
配置收集
第一种方法如下:
如果你用超级终端,先设置“传送-->捕获文字”,然后运行sh run 命令进行收集信息;
如果你用SecureCRT,设置“Transfer-->Receve ASCII”,然后运行sh run 命令收集;
switch# sh run 该命令会显示所有配置;
switch(config)# exit 退到上一级,如果要退到根目录
switch,用end 即可;
第二种方法如下:
本机上开启TFTP / FTP server 软件并配置好,方法如前面“申请license并导入”和安装一
样,通过TFTP / FTP 将生成配置文件下载到本机,这种方法生成的配置文件不需要修改,
直接导入就可以;
switch# copy startup-config tftp:///startup-config__
14
………………………………………………………………………………………………………
清除配置:
switch# write erease
………………………………………………………………………………………………………
结束后的操作
所有配置结束后,记得保存,建议大家重启下交换机看下信息是否丢失。
………………………………………………………………………………………………………
使端口能够接受license
switch# show port-license
Available port activation licenses are 0
~~~~~~~~~~~~
fc1/1 16777216 acquired
fc1/2 16781312 acquired
fc1/3 16785408 acquired
fc1/4 16789504 acquired
fc1/5 16793600 acquired
fc1/6 16797696 acquired
fc1/7 16801792 acquired
fc1/8 16805888 acquired
fc1/9 16809984 eligible
fc1/10 16814080 eligible
fc1/11 16818176 eligible
fc1/12 16822272 eligible
fc1/13 16826368 eligible
fc1/14 16830464 eligible
fc1/15 16834560 eligible
fc1/16 16838656 eligible
fc1/17 16842752 eligible
fc1/18 16846848 eligible
fc1/19 16850944 eligible
fc1/20 16855040 eligible
fc1/21 16859136 eligible
fc1/22 16863232 eligible
fc1/23 16867328 eligible
fc1/24 16871424 eligible
~~~~~~~~~~~~~~
使端口能够接受license,如果用show port-license 发现有端口显示ineligible,需要将其标为
eligibl
这样才可以接受license
switch# config t
switch(config)# interface fc1/10
switch(config-if)# port-license
………………………………………………………………………………………………………
15
官网下载MDS9124 flare:
CISCO 下载IOS,网址:,,选择Support --->Download software--->software
Search,输入9124 即会显示各类IOS,格式****.bin,截图如下:
16
………………………………………………………………………………………………………
交换机重新导入配置
个人认为,考虑到日后出现交换机多处端口出现问题,需要更换新交换机,我们可以用以后
方法进行:
一、重配,初始化后,查看old 交换机后用命令行再进行配置;
二、登录到old 交换机,将其配置信息全部导入到本地,生成一个***.txt 文档,具体方法如
前面的“Collect information”;
然后初始化new交换机,将本地配置信息导入,方法和Collect information相反,下面
以SecurtCRT 为例:
1、打开***.txt 文档,将里面的一些乱码删除(我在这里贴其中一段,删除用红色标记的内
容),如果没出现乱码,那就不用删除了;
sh run
version 3.2(1a)
vsan database
vsan 100
fcdomain fcid database
vsan 1 wwn 50:06:01:60:41:e0:df:65 fcid 0x670000 dynamic
vsan 1 wwn 50:06:01:61:41:e0:df:65 fcid 0x670100 dynamic
vsan 100 wwn 50:06:01:60:41:e0:df:65 fcid 0x680000 dynamic
vsan 100 wwn 50:06:01:61:41:e0:df:65 fcid 0x680100 dynamic
17
vsan 100 wwn 10:00:00:00:c9:7d:92:e7 fcid 0x680200 dynamic
vsan 100 wwn 10:00:00:00:c9:56:0e:a3 fcid 0x680300 dynamic
vsan 100 wwn 20:04:00:0d:ec:92:4b:40 fcid 0x680400 area dynamic
vsan database
vsan 100 interface fc1/1
vsan 100 interface fc1/2
vsan 100 interface fc1/3
vsan 100 interface fc1/4
vsan 100 interface fc1/5
vsan 100 interface fc1/6
vsan 100 interface fc1/7
vsan 100 interface fc1/8
vsan 100 interface fc1/9
vsan 100 interface fc1/10
[7m--More-- [m
vsan 100 interface fc1/11
vsan 100 interface fc1/12
vsan 100 interface fc1/13
vsan 100 interface fc1/14
vsan 100 interface fc1/15
2、进入全局配置模式
switch# config t
switch(config)#
3、Transfer-->Send ASCII,选择刚才修改过的***.txt 文档,将会自动导入配置;
4、导入结束后,通过sh run 查看配置是否正确,如果正确则最好,保存配置;如果不正确,
不要保存配置,重启交换机后,手动配置即可;
5、保存配置switch# copy running-config startup-config
………………………………………………………………………………………………………
安装系统(具体实施时候,建议再参考下别的文档)
本人到现在为止还没有做过关于SAN 交换机升或降系统,曾经做过CISCO 网络交换机
重灌系统,以下内容是根据相关文档和自己以前学过网络技术结合后总结,如果有同事要做
重灌系统的话,建议再查看下相关文档;
系统安装分两种情况,一种为机器正常,因为版本原因或者用户雪球需要升级或者降级;
另外一种情况则是到货开启后发现系统有问题(排除硬件问题),这种情况就不知道是更换
设备呢,还是由我们进行系统重装。
这里不考虑交换机flash 卡空间大小,不管因为何种原因进行系统重装时候发现卡空间
不够的话,我们只能找领导反映情况了,再决定怎么做。
遗留问题:安装时候需要安装两个ios,其中有一个带有“kickstart”字符,不知道具体
是什么作用,估计有可能是为了图形界面而设置的吧。
以下是根据第二种情况进行系统升级或者降级↘
Step 1 自己电脑安装TFTP / FTP Server、开启并配置好,方法如前面“申请license并导入”
和安装一样;
18
Step 2 通过串口或者网口,使本地电脑和交换机连接;
Step 3 如果是old 交换机,并且上面有配置,则进行step3 / step 4 步骤,不然直接执行step 6;
switch# copy running-config startup-config
Step 4 将配置导入到本机,也可以通过show run 将配置保存:
switch# copy startup-config tftp:///startup-config__
Step 5 确定交换机上有足够空间容纳需要上传的ios,不然需要先将旧ios删除,才会有足
够空间
Step 6 将本机上的ios通过TFTP / FTP上传到交换机,我遇到过的MDS9124只有flash 卡,
没有slot 槽,所以在这里就不考虑这个,如果以后遇到的话,只要将bootflash 改为slot<槽
位> 就可以:
Example of a MDS 9124:
switch# copy tftp://10.1.7.2/m9100-s2ek9-mz.3.2.2c.bin bootflash:m9100-s2ek9-mz.3.2.2c.bin
switch#copy tftp://10.1.7.2/m9100-s2ek9-kickstart-mz.3.2.2c.bin bootflash:m9100-s2ek9-
kickstart-mz.3.2.2c.bin (我在cisco 网上没有看到这个ios)
Step 7 检验ios已经正确上传到flash 中:
switch# dir bootflash:
14962688 Dec 14 17:54:30 2007 m9500-sf1ek9-kickstart-mz.3.2.2c.bin
75047151 Dec 14 17:54:12 2007 m9500-sf1ek9-mz.3.2.2c.bin
Step 8 Perform the upgrade by issuing the install all command on the active supervisor module
from the switch console.
Upgrading an MDS 9124:
switch# install all system bootflash:m9500-s2ek9-mz.3.2.2c.bin kickstart
bootflash:m9500-s2ek9-kickstart-mz.3.2.2c.bin
阅读(12861) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~