Cisco思科交換機配置說明的方法
1. 初始化信息
首次設置,必須通過console進行連接(需要U口轉DB9針的接口線,專門賣接口線的有賣大約30元),然後進行初始化設計,以後設定IP後可通過LAN進行登陸
具體步驟:(紅色字體部分着重注意,需要進行設置,大部分按照默認設置即可,而且設置的部分進入管理工具軟件可以更改)
---- System Admin Account Setup ----
Enter the password for "admin": password
Confirm the password for "admin": password
--- Basic System Configuration Dialog ---
This setup utility will guide you through the basic configuration of the system. Setup configures only enough connectivity for management of the system.
Press Enter at any time to skip any dialog. Use ctrl-c at anytime to skip the remaining dialogs.
Would you like to enter the basic configuration dialog (yes/no): y
Create another login account (yes/no) [n]:
Configure read-only SNMP community string (yes/no) [n]:
Configure read-write SNMP community string (yes/no) [n]:
Enter the switch name: Pxx-MDS-x (where xx is your pod number and x is the switch number; for example:P01-MDS-1)
Continue with Out-of-band (mgmt0) management configuration? (yes/no) [y]:
Mgmt0 IPv4 address : <10.0.x.y> (where x is your pod number and y is 5 for MDS-1 and 3 for MDS-2)(客戶)0.16
Mgmt0 IPv4 netmask : 255.255.255.0
Configure the default gateway? (yes/no) [y]:
IPv4 address of the default gateway : 10.0.x.254 (where x is your pod number)
Configure advanced IP options? (yes/no) [n]:
Enable the telnet service? (yes/no) [y]:
Enable the ssh service? (yes/no) [n]:
Configure the ntp server? (yes/no) [n]:
Configure default switchport interface state (shut/noshut) [shut]: (注意一下)noshut
Configure default switchport trunk mode (on/off/auto) [on]:
Configure default zone policy (permit/deny) [deny]:
Enable full zoneset distribution (yes/no) [n]:
NOTE:初始設定的配置對新的VSAN起作用,即原始VSAN1無這些配置
解決辦法:1 zone default-zone permit VSAN
2 新建 NEW VSAN2 将port轉移VSAN2裡面
。建議創建VSAN2 把端口放置在VSAN2中
2. 交換機配置
2.1. 配置交換機管理地址
switch# config t(按tab命令可以補全的或者 輸入命令後空格加?
可以出來命令的使用方法)
switch (config)# switchname switchswitch(config)# switch(config)# interface mgmt 0switch(config-if)# ip adress 192.168.100.108 255.255.255.0switch(config-if)# no shutdown
interface mgmt 0 表示的是交換機的管理端口。
2.2. 配置VSAN
接下來配置VSAN
switch#config t
switch (config)#vsan database
switch(config-vsan-db)# vsan 2
switch(config-vsan-db)#end
2.3. 配置ZONESET
switch#config t
switch (config)#zoneset name set10 vsan 2
switch (config-zoneset)#member ZONE_NAME把ZONE填加到該ZONESET中
注:在交換機處于正常運行時,如果配置了新的ZONE,并且填加到了ZONESET中,此時需要Acitvate才能生效,命令如下:
switch#config t
switch (config)#zoneset activate name set10 vsan 2
2.4. 配置ZONE
下面配置ZONE
基本命令如下:
switch#config t
switch(config)#zone name zone_name vsan 2
switch(config)#member interface fc#/#
switch(config)#member interface fc#/#
交換機端口都是以fc表示,fc1/1 表示第一個模塊上的第一個端口。由于像cisco9506之類的交換機是模塊化的,所以其每個端口就是fc模塊号/端口号。像cisco9120,cisco9140,不是模塊化的,但其接口默認是fc1/端口号。
2.5. TRUNKING的配置
默認情況下,交換機每個端口的TRUNKING協議都是啟用的,交換機互連的端口應工作在E mode下,如果有兩台交換機互相連接的情況,則要啟用TRUNKING,以FC1/1和FC1/2為例。
配置命令如下:
switch#config t
switch(config)# interface fc1/1switch(config-if)# switchport mode e
switch(config)# interface fc1/2switch(config-if)# switchport mode e
3. 常用命令
show run顯示當前配置
show zone顯示當前配置的ZONE的信息
show zoneset顯示當前配置的ZONESET的信息
show interface fc1/1顯示端口fc1/1信息
show zone activate顯示當前活動的ZONE信息
show zoneset activate顯示當前活動的ZONESET信息
copy run start保存當前配置
show vsan 查看交換機的vsan信息
show vsan x membership 查看某個vsan下面的端口
show topology 級聯成功後查看對端交換機信息
show fcdomain domain-list 查看級聯信息
show fcs database 查看本地交換機注冊的WWN号
show fcns database 查看級聯後整個fabric注冊的WWN号
Show interface brief 确認設置trunk的端口已經啟用成功
Show wwn switch 查看交換機的WWN号碼
4. 常用技巧
4.1. 修改交換機IP地址
建議通過串口線修改
switch#conf t
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 如果必要,可以指定網口的速率
switch(config)# ip default-gateway <192.168.1.254>
4.2. 解決網口不亮的方法
通過串口連接
switch#conf t switch(config)# int mgmt 0
switch(config-if)# shutdown 提示是否繼續,選擇“y”
switch(config-if)# no shut
4.3. 修改用戶密碼
switch#conf t
switch(config)# username <用戶名> password <密碼>
4.4. 修改交換機名字
switch#conf t
switch(config)#switchname
4.5. 啟動關閉服務
如果你接手的交換機沒有開啟 TELNET功能,可以參考啟停方法如下,其他服務也類似
switch#conf t
switch(config)# telnet server enable 開啟
switch(config)# no telnet server enable 關閉
5. 實例交換機級聯跨交換機化zone
A交換機端口1,端口2 分别連接B交換機得端口1,端口2
5.1. 首先初始化按照1初始化兩台交換機
在每個交換機上創建VSAN2,把端口1-48加入到vsan2 中
(config)# vsan database 進入
(config-vsan-db)# vsan 2 name VSAN2 創建名字為VSAN2的vsan
(config-vsan-db)# vsan 2 interface fc 1/1 – 48 将光纖口綁定在vsan2上
(config-vsan-db)# exit 退出config-vsan-db模式
查看VSAN2中的端口信息
show vsan 2 membership
是否兩個交換機得VSAN2中加入了1-48個端口(可以根據需要加端口)
5.2. 交換機開啟mode E
在兩個交換機上開啟端口模式E,關閉TRUNK(隻是級聯不是跨交換機跨VSAN化zoneTRUNK可以關閉)根據可需要選擇開啟的端口,這裡是開啟fc1/1,fc1/2
switch#config t
switch(config)# interface fc1/1switch(config-if)# switchport mode e
switch(config-if)# switchport trunk mode off
switch(config)# interface fc1/2switch(config-if)# switchport mode eswitch(config-if)# switchport trunk mode off
switch(config-if)# show int brief
5.3. 查看是否級聯成功
輸入
switch#show fcdomain domain-list
local和Principal 在一行的是主交換機,出現如下的提示是級聯成功了
查看交換機的WWN号碼并記錄
switch#show wwn switch
或者用
switch#show fcs database
端口1和端口2啟用mode e 所以fc1/1上的号碼就是對端的交換機的WWN号碼記錄下來
20:00:00:05:73:ba:21:f0
20:00:00:05:73:e5:fb:d8
這兩個就是交換機的WWN号碼
其中的fc1/5是我們的連接的設備的WWN号碼也需要記錄
21:00:00:24:ff:00:2e:f3
50:06:0e:80:05:8a:ee:00
5.4. 配置zone及zoneset并激活
在主交換機上(輸入switch#show fcdomain domain-list
local和Principal 在一行的是主交換機)配置zone
這個地方有兩種配置方式,
一種是配置端口在一個zone裡面,
一種是配置設備号在一個zone裡面
配置端口在一個zone裡面,
switch#config t
switch(config)#zone name zone5_name vsan 2
switch(config)#member interface fc1/5 swwn 20:00:00:05:73:ba:21:f0
switch(config)#member interface fc1/5 swwn 20:00:00:05:73:e5:fb:d8
進入zoneset
switch (config)#zoneset name set10 vsan 2
switch (config-zoneset)#member zone5把ZONE填加到該ZONESET中
注:在交換機處于正常運行時,如果配置了新的ZONE,并且填加到了ZONESET中,此時需要Acitvate才能生效,命令如下:
switch#config t
switch (config)#zoneset activate name set10 vsan 2
switch#show zone
switch#show zoneset
去另一台交換機查看是否也同步出現了相關的zone及zoneset的信息。
如果一樣那就已經配置成功了
配置連接的設備号在一個zone裡面(當設備更換端口的時候不需要配置還是可以通信的),
switch#config t
switch(config)#zone name zone5_name vsan 2
switch(config)#member pwwn 21:00:00:24:ff:00:2e:f3
switch(config)#member pwwn 50:06:0e:80:05:8a:ee:00
進入zoneset
switch (config)#zoneset name set10 vsan 2
switch (config-zoneset)#member zone5把ZONE填加到該ZONESET中
注:在交換機處于正常運行時,如果配置了新的ZONE,并且填加到了ZONESET中,此時需要Acitvate才能生效,命令如下:
switch#config t
switch (config)#zoneset activate name set10 vsan 2
switch#show zone
switch#show zoneset
去另一台交換機查看是否也同步出現了相關的zone及zoneset的信息。
,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!