博科交换机基本配置(华为SNS系列交换机为例OEM博科)


一、查看交换机基本信息
1、查看交换机的固件版本
--------------------------------------------------------------------
SNS:admin> version
Kernel: 2.6.34.6
Fabric OS: v8.2.0b           ##固件版本号
Made on: Mon Apr 9 22:21:55 2018
Flash: Fri Apr 26 21:57:55 2019
BootProm: 3.0.20
--------------------------------------------------------------------

2、显示交换机的信息
--------------------------------------------------------------------
SNS2624:admin> switchshow
switchName: SNS2624               ##交换机名称
switchType: 170.0                  ##交换机型号和母板版本号
switchState: Online               ##交换机状态:“Online”、“Offline”、“Testing”或“Faulty”。
switchMode: Native              ##交换机操作模式:“Native”、“Interop”或“Access Gateway”
switchRole: Principal              ##交换机角色“Principal”、“Subordinate”或“Disabled”。
switchDomain: 1               ##交换机域ID:0~31或1~23。
switchId: fffc01               ##交换机嵌入式端口D_ID。
switchWwn: 10:00:88:94:88:92:c3:88      ##交换机WWN号
zoning: OFF                  ##当接入网关模式被禁用,激活分区的名称会显示在括号内。
switchBeacon: OFF            ##交换机信标状态:“On”或“Off”。
HIF Mode: OFF

Index Port Address Media Speed State Proto
==================================================
0 0 010000 id N16 Online FC F-Port 88:88:c8:a7:76:b5:48:76
1 1 010100 id N16 Online FC F-Port 88:88::44:67:47:e5:cc:06
2 2 010200 id N16 Online FC F-Port 88:88:c8:a7:76:b5:48:76
3 3 010300 id N16 Online FC F-Port 88:88::44:67:47:e5:cc:06
4 4 010400 id N16 No_Light FC (No Ports on Demand license)
5 5 010500 id N16 Online FC F-Port 88:88::44:67:47:e5:cc:16
6 6 010600 id N16 Online FC F-Port 88:88::44:67:47:e5:cc:06
7 7 010700 id N16 Online FC F-Port 88:88::44:67:47:e5:cc:06
8 8 010800 id N16 No_Light FC
9 9 010900 id N16 No_Light FC (No Ports on Demand license) Disabled (No License)
10 10 010a00 id N16 No_Light FC (No Ports on Demand license) Disabled (No License)
11 11 010b00 id N16 No_Light FC (No Ports on Demand license)
12 12 010c00 id N16 No_Light FC (No Ports on Demand license)
13 13 010d00 id N16 No_Light FC (No Ports on Demand license)
14 14 010e00 id N16 No_Light FC (No Ports on Demand license)
15 15 010f00 id N16 No_Light FC (No Ports on Demand license)
16 16 011000 -- N32 No_Module FC (No Ports on Demand license)
17 17 011100 -- N32 No_Module FC (No Ports on Demand license)
18 18 011200 -- N32 No_Module FC (No Ports on Demand license)
19 19 011300 -- N32 No_Module FC (No Ports on Demand license)
20 20 011400 -- N32 No_Module FC (No Ports on Demand license)
21 21 011500 -- N32 No_Module FC (No Ports on Demand license)
22 22 011600 -- N32 No_Module FC (No Ports on Demand license)
23 23 011700 -- N32 No_Module FC (No Ports on Demand license)
--------------------------------------------------------------------
交换机的端口信息说明:

Index:        #索引范围高达255,直至平台的最大端口。索引标识与交换机相关的端口号,索引栏只显示在企业级平台上。

Slot:        #槽位号:1~4和7~10,上面的交换机是盒式交换机所以没有Slot这一列,框式的有。

Port:       #端口号:0~15、0~31或0~47。

Address:     #24位地址标识符。地址栏只显示在企业级平台上。

Media:        #SFP类型。

Speed:    #端口速率(1Gbit/s、2Gbit/s、4Gbit/s、8Gbit/s、10Gbit/s、16Gbit/s、32Gbit/s、N1、N2、N4、N8、N16、N32、AN和UN)。速率可以是固定速率、匹配速率或自适应速率。
说明:只有SNS2248型号支持10Gbit/s的端口速率。

State:      #端口状态。Online表示连接正常,No_Light表示端口上有光模块但是无连接,No_Module表示端口上无光模块,Mod_Inv表示光模块不兼容

Proto:     #支持GbE端口的协议。
FC F-Port 88:88:c8:a7:88:b2:48:88              ##F-Port说明了端口类型,88:88:c8:a7:76:b2:48:73显示的是连接这个端口对应设备的wwn号
FC (No Ports on Demand license) Disabled (No License)     ##表示这个端口需要许可进行激活

扫描二维码关注公众号,回复: 10656561 查看本文章


3、显示交换机的正常运行时间
--------------------------------------------------------------------
SNS:admin> uptime
16:59 up 39 days 6:05, 1 user, load average: 0.04, 0.02, 0.00
--------------------------------------------------------------------
上面显示的分别是:当前系统时间、系统第一次上电后的累计运行时间几天几小时、当前登录的用户数、过去1分钟、5分钟和15分钟内的平均负载,例如0.04, 0.02, 0.00。同时,交换机最后一次重启的原因也将记载在系统信息日志中。

4、查看已添加的License
--------------------------------------------------------------------
SNS2624:admin> licenseshow
No licenses installed.       ##当前没有添加许可
--------------------------------------------------------------------

5、使用licenseidshow命令查询License ID,也就是交换机的wwn号
SNS2624:admin> licenseidshow
10:00:88:94:88:92:c3:88


6、博科原厂序列号查看方式,执行命令chassisshow,Factory Serial Num即为原厂序列号
--------------------------------------------------------------------
SNS2624:admin> chassisshow
........
CHASSIS/WWN Unit: 1
System AirFlow: Non-portside Intake
Header Version: 2
Factory Part Num: 40-1001159-12
Factory Serial Num: EZL19178888
Manufacture: Day: 12 Month: 12 Year: 18
Update: Day: 6 Month: 4 Year: 2020
Time Alive: 37 days
Time Awake: 37 days
ID: BRD0000HU
Part Num: BROCAD0008888
--------------------------------------------------------------------

二、自定义交换机名称,switchname命令
交换机名称的命名规则如下:
字符长度为1~30。
字符可以包含数字、字母和下划线“_”。
首字符必须为字母。
名称必须是唯一的,不能与其他交换机名称冲突。
下次登录后,自定义交换机名称才生效。
注意事项
修改交换机名称会发送域地址格式的RSCN(Registered State Change Notification),可能会引起Fabric业务中断。

---------------------------------------------
SNS2624:admin> switchname SNS     ##switchname命令后面接名回执行命令
Committing configuration...
Done.
Switch name has been changed.Please re-login into the switch for the change to be applied.
SNS2624:admin>
----------------------------------------------

三、时间,时区设置
所有交换机都必须设置时区。但每个交换机设置一次即可,因为时区值是写入非易失性存储介质中。
1、查看时间
----------------------------------------------
SNS2624:admin> date
Mon Apr 6 05:24:33 UTC 2020
----------------------------------------------
2、查看时区
----------------------------------------------
SNS2624:admin> tstimezone
Time Zone Hour Offset: 0
Time Zone Minute Offset: 0
----------------------------------------------

3、设置时区
3.1、使用tstimezone命令将目前时区设置为北京时间
----------------------------------------------
SNS2624:admin> tstimezone Asia/Shanghai      ##Asia/Shanghai为时区名称
----------------------------------------------

3.2、使用交互模式将目前时区设置为北京时间
----------------------------------------------
SNS2624:admin> tstimezone --interactive         ##通过--interactive参数进入交互模式,这个比较适合不知道时区的名称时候用
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the POSIX TZ format.
Enter number or control-D to quit ?5       ##选择所在的大州,这里输入5选择亚洲,可以按“Ctrl-D”退出
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
Enter number or control-D to quit ?9          ##选择所在的国家,这里输入9选择中国
Please select one of the following time zone regions.
1) east China - Beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) most of Tibet & Xinjiang
5) west Tibet & Xinjiang
Enter number or control-D to quit ?1         ##选择时区,这里输入1选择北京

The following information has been given:

China
east China - Beijing, Guangdong, Shanghai, etc.

Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Mon Apr 6 13:28:32 CST 2020.
Universal Time is now: Mon Apr 6 05:28:32 UTC 2020.
Is the above information OK?
1) Yes
2) No
Enter number or control-D to quit ?1         ##如果上面信息正确,输入1确定
System Time Zone change will take effect at next reboot. On Chassis, reboot both CPs simultaneously.
SNS:admin> tstimezone           ##再次查看时区
Asia/Shanghai                    ##已经更改成功
----------------------------------------------

4、设置时间
date "mmddHHMMyy"                ##英文输入法下的双引号""必须有

取值说明:
mm表示月份,有效值为01到12。
dd表示日期,有效值为01到31。
HH表示小时,有效值为00到23。
MM表示分钟,有效值为00到59。
yy表示年份,有效值为00到99。大于69表示1970至1999;小于70表示2000至2069。
----------------------------------------------
SNS:admin> date "0406141520"
Mon Apr 6 14:15:00 CST 2020
----------------------------------------------

四、设置NTP
输入tsclockserver命令。

switch:admin> tsclockserver "<ntp1 ; ntp2>"

ntp1是第一个NTP服务器的IP地址或DNS名,交换机必须可以访问此IP地址或DNS名。ntp2是第二个NTP服务器的名字(可选)。整个运算数<ntp1 ; ntp2>是可选的,默认值为LOCL,使用主交换机的本地时钟作为时钟服务器。光纤交换机每隔64秒与NTP server同步一次。
----------------------------------------------
SNS:admin> tsclockserver       ##检查当前NTP配置:
Active NTP Server LOCL
Configured NTP Server List LOCL
SNS:admin> tsclockserver "192.168.2.1"   ##设置NTP Server
Updating Clock Server configuration...done.
Updated with the NTP servers
SNS:admin> tsclockserver          ##检查NTP设置
Active NTP Server 192.168.2.1
Configured NTP Server List 192.168.2.1 
SNS:admin>

五、IP地址设置
1、显示当前ip
--------------------------------------------------------------------
SNS2624:admin> ipaddrshow

SWITCH
Ethernet IP Address: 10.77.77.77
Ethernet Subnet mask: 255.255.255.0
Gateway IP Address: 10.77.77.1
DHCP: Off
--------------------------------------------------------------------
2、设置ip地址
SNS2624:admin> ipaddrset
DHCP [Off]:off
Ethernet IP Address [10.77.77.77]:192.168.2.111
Ethernet Subnet mask [255.255.255.0]:          ##如果规格的和[]里面的一样,直接回车就可以,这样就设置成[]里面的参数了
Gateway IP Address [10.77.77.1]:192.168.2.1 
IP address is being changed...

六、配置域ID
交换机启动后,其域ID是动态分配的。为了方便管理域ID,解决Fabric合并时的域ID冲突,可以对域ID进行手动修改。交换机的默认域ID为“1”。
交换机启动后,如果其域ID与Fabric中另一交换机的域ID相冲突:
另一交换机的域ID为非固定设置时,域ID冲突可以自动解决,此过程会持续几秒钟。在这段时间内,流量会延迟。
两台交换机的域ID都为固定设置时,需要修改其中一台交换机的域ID,且确保修改后的域ID不会与Fabric中的其它域ID冲突。

1、查看域ID
----------------------------------------------
SNS:admin> fabricshow
Switch ID Worldwide Name Enet IP Addr FC IP Addr Name
-------------------------------------------------------------------------
1: fffc01 88:00:88:94:71:92:88:88 192.168.2.1 0.0.0.0 >"SNS"
----------------------------------------------
其中“Switch ID”的第一个十进制数字为交换机的域ID

2、设置域ID
2.1、先使用switchdisable命令停用交换机
----------------------------------------------
SNS:admin> switchdisable
----------------------------------------------

2.2、通过configure命令设置域ID
----------------------------------------------
SNS:admin> configure
Configure...
Fabric parameters (yes, y, no, n): [no] y   ##输入y
Domain: (1..239) [1] 12            ##提示符后输入一个唯一的域ID。正常运行模式下域ID的取值范围为1~239(兼容FC-SW)。
WWN Based persistent PID (yes, y, no, n): [no]   ##这里什么也不输入直接按“Ctrl+D”接受其余项的默认设置。也可以依据界面提示完成剩余操作。
WARNING: The domain ID will be changed. The port level zoning may be affected
----------------------------------------------
2.3、使用switchenable命令重新启用交换机
SNS:admin> switchenable

2.4、查看域ID
----------------------------------------------
SNS:admin> fabricshow
Switch ID Worldwide Name Enet IP Addr FC IP Addr Name
-------------------------------------------------------------------------
12: fffc0c 88:00:88:94:71:92:88:39 192.168.2.1 0.0.0.0 >"SNS"    ##已经更改为12
----------------------------------------------

七、启用和停用交换机

默认情况下,当交换机上电并完成上电自检诊断和初始化后,交换机被启用。根据需要,也可以停用或重新启用交换机。
1、停用交换机
----------------------------------------------
SNS:admin> switchdisable
----------------------------------------------
命令运行成功后,交换机所有的FC端口将下线。如果交换机加入了Fabric,Fabric会进行重新配置。使用switchdisable停用交换机后,如果重新启动交换机,交换机将处于启用状态。

2、启用交换机
----------------------------------------------
SNS:admin> switchenable
----------------------------------------------
命令运行成功后,所有通过POST(Power On Self Test)的FC端口都会被启用。如果交换机通过ISL(Inter-Switch Link)连接到某Fabric,启用后交换机会加入此Fabric。

八、交换机关机和重启
为了不影响用户文件系统的性能,我们推荐用户以正常的方式关闭交换机。
热重启(又称为正常关机)是指通过下列方式(命令方式)关闭交换机或者刀片。冷重启(又称为硬启动)是指以突然下电上电的方式关闭交换机或者刀片。
1、重启交换机
--------------------------------------------------------------------
SNS:admin> reboot
Warning: This command would cause the switch to reboot
and result in traffic disruption.
Are you sure you want to reboot the switch [y/n]?##这里输入y确认重启
--------------------------------------------------------------------
2、关闭交换机
--------------------------------------------------------------------
SNS2624_D13:admin> sysshutdown
This command will shutdown the operating systems on your switch.
You are required to power-cycle the switch in order to restore operation.
Are you sure you want to shutdown the switch [y/n]? ##这里输入y确认关机
--------------------------------------------------------------------
通过上面的命令就可以手动切断交换机电源了

  

猜你喜欢

转载自www.cnblogs.com/pipci/p/12672691.html