(Optional) Switch Configuration
This section describes how to configure Ethernet and Fibre Channel over Ethernet (FCoE) switches, including configuring VLANs and binding ports. Skip this section if you use direct-attached connections.
Ethernet Switch Configuration
Configuring VLANs
When many hosts are connected by an Ethernet network, a large number of broadcast packets are generated during communication between the hosts. Broadcast packets sent from one host will be received by all the other hosts on the network, consuming considerable bandwidth. Moreover, all hosts on the network can access each other, leaving data vulnerable to security risks.
Dividing hosts on an Ethernet network into multiple logical groups helps save bandwidth and prevent security risks. Each logical group is a VLAN. The following uses Huawei Quidway 2700 Ethernet switch as an example to explain how to configure VLANs.
In the following example, two VLANs (VLAN 1000 and VLAN 2000) are created. VLAN 1000 contains ports GE 1/0/1 to 1/0/16. VLAN 2000 contains ports GE 1/0/20 to 1/0/24.
- Go to the system view.
<Quidway>system-view System View: return to User View with Ctrl+Z.
- Create VLAN 1000 and add ports to it.
[Quidway]VLAN 1000 [Quidway-vlan1000]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/16
- Configure an IP address for VLAN 1000.
[Quidway-vlan1000]interface VLAN 1000 [Quidway-Vlan-interface1000]ip address 1.0.0.1 255.255.255.0
- Create VLAN 2000, add ports, and configure an IP address.
[Quidway]VLAN 2000 [Quidway-vlan2000]port GigabitEthernet 1/0/20 to GigabitEthernet 1/0/24 [Quidway-vlan2000]interface VLAN 2000 [Quidway-Vlan-interface2000]ip address 2.0.0.1 255.255.255.0
Binding Ports
When storage systems and hosts are connected point-to-point, existing bandwidth may be insufficient for storage data transmission. Moreover, redundancy in connection cannot be achieved in point-to-point connection. To address these problems, ports are bound (link aggregation) to improve bandwidth and balance loads among multiple links.
Context
- Huawei OceanStor storage systems support the 802.3ad standard protocol.
- After Ethernet ports of the storage system are bound, you must complete necessary settings on the interconnected switches. On Huawei switches, you must set the ports to work in static LACP mode. You can find the configuration method in the product documentation specific to your product model.
- If you use non-Huawei switches, contact technical support of the switch manufacturer for the port configuration method.
Procedure
This section uses switch ports GE 1/0/1 and GE 1/0/2 and the storage system's ports P2 and P3 as an example to explain how to bind ports.
The port binding method differs with the OceanStor system version. For details, refer to the specific storage product documentation.
- Log in to DeviceManager and choose Provisioning > Port.
- Bind ports.
- Select the ports that you want to bind and choose More > Bond Port.
The Bond Port dialog box is displayed.
- Enter a Bond Name, select the target ports, and click OK.
- In the security alert dialog box that is displayed, select I have read and understand the consequences associated with performing this operation and click OK.
After the storage system ports are bound, configure link aggregation on the switch using the following command:
<Quidway>system-view System View: return to User View with Ctrl+Z. [Quidway-Switch]interface GigabitEthernet 1/0/1 [Quidway-Switch-GigabitEthernet1/0/19]lacp enable LACP is already enabled on the port! [Quidway-Switch-GigabitEthernet1/0/19]quit [Quidway-Switch]interface GigabitEthernet 1/0/2 [Quidway-Switch-GigabitEthernet1/0/20]lacp enable LACP is already enabled on the port! [Quidway-Switch-GigabitEthernet1/0/20]quit
After the command is executed, LACP is enabled for ports GE 1/0/1 and GE 1/0/2. Then the ports can be automatically detected and added to an aggregation group.
- Select the ports that you want to bind and choose More > Bond Port.
FCoE Switch Configuration
This section uses Cisco Nexus5548 as an example to describe how to configure an FCoE switch.
Command Reference
Log in to the switch in SSH mode and enter ? to query all the supported commands.
switch# ?
callhome Callhome commands
cd Change current directory
cfs CFS parameters
checkpoint Create configuration rollback checkpoint
clear Reset functions
cli CLI commands
clock Manage the system clock
configure Enter configuration mode
copy Copy from one file to another
debug Debugging functions
debug-filter Enable filtering for debugging functions
delete Delete a file or directory
diff-clean Remove temp files created by '| diff' filters
dir List files in a directory
discover Discover information
dos2nxos DOS to NXOS text file format converter
echo Echo argument back to screen (useful for scripts)
ethanalyzer Configure cisco packet analyzer
event Event Manager commands
fcdomain Fcdomain internal command
fcping Ping an N-Port
fctrace Trace the route for an N-Port.
find Find a file below the current directory
fips Enable/Disable FIPS mode
gunzip Uncompresses LZ77 coded files
gzip Compresses file using LZ77 coding
hardware Change hardware usage settings
install Upgrade software
ip Configure IP features
ipv6 Configure IPv6 features
load Load system image
locator-led Turn on locator beacon
mkdir Create new directory
modem Modem commands
move Move files
mping Run mping
mtrace Trace multicast path from receiver to source
no Negate a command or set its defaults
ntp NTP configuration
ping Test network reachability
ping6 Test IPv6 network reachability
pktmgr Display Packet Manager information
purge Deletes unused data
pwd View current directory
reload Reboot the entire box
restart Manually restart a component
rmdir Delete a directory
rollback Rollback configuration
routing-context Set the routing context
run-script Run shell scripts
san-port-channel Port-Channel related commands
scripting Configure scripting parameters
send Send message to open sessions
setup Run the basic SETUP command facility
show Show running system information
sleep Sleep for the specified number of seconds
sockets Display sockets status and configuration
ssh SSH to another system
system System management commands
system System configuration commands
tac-pac Save tac info in a compressed .gz file at specific location
tail Display the last part of a file
tar Archiving operations
tclsh Source tclsh script
telnet Telnet to another system
telnet6 Telnet6 to another system using IPv6 addressing
terminal Set terminal line parameters
test Test command
traceroute Traceroute to destination
traceroute6 Traceroute6 to destination
undebug Disable Debugging functions (See also debug)
write Write current configuration
xml Xml agent
xml Module XML agent
zone Execute Zone Server commands
zoneset Execute zoneset commands
end Go to exec mode
exit Exit from command interpreter
pop Pop mode from stack or restore from name
push Push current mode to stack or save it under name
where Shows the cli context you are in
switch#
For example, to query the model and version of an FCoE switch, run the following command:
switch# show version
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2012, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
http://www.gnu.org/licenses/gpl.html.
Software
BIOS: version 3.5.0
loader: version N/A
kickstart: version 5.1(3)N1(1a)
system: version 5.1(3)N1(1a)
power-seq: Module 1: version v1.0
Module 3: version v2.0
uC: version v1.2.0.1
SFP uC: Module 1: v1.0.0.0
BIOS compile time: 02/03/2011
kickstart image file is: bootflash:///n5000-uk9-kickstart.5.1.3.N1.1a.bin
kickstart compile time: 2/7/2012 23:00:00 [02/08/2012 07:49:30]
system image file is: bootflash:///n5000-uk9.5.1.3.N1.1a.bin
system compile time: 2/7/2012 23:00:00 [02/08/2012 12:44:33]
Hardware
cisco Nexus5548 Chassis ("O2 32X10GE/Modular Universal Platform Supervisor")
Intel(R) Xeon(R) CPU with 8263880 kB of memory.
Processor Board ID FOC16256KUW
Device name: switch
bootflash: 2007040 kB
Kernel uptime is 15 day(s), 1 hour(s), 59 minute(s), 8 second(s)
Last reset at 299763 usecs after Wed Feb 18 05:48:07 2009
Reason: Reset Requested by CLI command reload
System version: 5.1(3)N1(1a)
Service:
plugin
Core Plugin, Ethernet Plugin, Fc Plugin
Creating a VSAN
To create a VSAN, perform the following operations:
- Activate FCoE.
switch# conf t Enter configuration commands, one per line. End with CNTL/Z. switch(config)# feature fcoe fcoe fcoe-npv switch(config)# feature fcoe switch(config)# show fcoe Global FCF details FCF-MAC is 54:7f:ee:b4:f8:20 FC-MAP is 0e:fc:00 FCF Priority is 128 FKA Advertisement period for FCF is 8 seconds
- Create a VSAN by running the following commands:
switch(config)# vsan database
switch(config-vsan-db)# vsan 200
Run the show vsan command to query whether the VSAN is successfully created.
switch(config)# show vsan vsan 1 information name:VSAN0001 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:down vsan 100 information name:VSAN0100 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:up vsan 4079:evfp_isolated_vsan vsan 4094:isolated_vsan switch(config)# vsan database switch(config-vsan-db)# vsan 200 switch(config-vsan-db)# exit switch(config)# show vsan vsan 1 information name:VSAN0001 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:down vsan 100 information name:VSAN0100 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:up vsan 200 information name:VSAN0200 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:down vsan 4079:evfp_isolated_vsan vsan 4094:isolated_vsan
Creating a VLAN
To create a VLAN, perform the following operations:
- Check for existing VLANs.
switch(config)# show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Eth1/1, Eth1/2, Eth1/4, Eth1/5 Eth1/6, Eth1/7, Eth1/8, Eth1/15 Eth1/21, Eth1/22, Eth1/23 Eth1/24, Eth1/25, Eth1/26 Eth1/27, Eth1/28 100 VLAN0100 active Eth1/1, Eth1/2, Eth1/3, Eth1/4 Eth1/5, Eth1/6, Eth1/7, Eth1/8 Eth1/9, Eth1/10, Eth1/11 Eth1/12, Eth1/13, Eth1/14 Eth1/15, Eth1/16, Eth1/17 Eth1/18, Eth1/19, Eth1/20 VLAN Type Vlan-mode ---- ----- ---------- 1 enet CE 100 enet CE Remote SPAN VLANs ------------------------------------------------------------------------------- Primary Secondary Type Ports ------- --------- --------------- -------------------------------------------
- Create a VLAN and verify that the VLAN is created successfully.
switch(config)# vlan 200 switch(config-vlan)# show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Eth1/1, Eth1/2, Eth1/4, Eth1/5 Eth1/6, Eth1/7, Eth1/8, Eth1/15 Eth1/21, Eth1/22, Eth1/23 Eth1/24, Eth1/25, Eth1/26 Eth1/27, Eth1/28 100 VLAN0100 active Eth1/1, Eth1/2, Eth1/3, Eth1/4 Eth1/5, Eth1/6, Eth1/7, Eth1/8 Eth1/9, Eth1/10, Eth1/11 Eth1/12, Eth1/13, Eth1/14 Eth1/15, Eth1/16, Eth1/17 Eth1/18, Eth1/19, Eth1/20 200 VLAN0200 active Eth1/1, Eth1/2, Eth1/4, Eth1/5 Eth1/6, Eth1/7, Eth1/8, Eth1/15 VLAN Type Vlan-mode ---- ----- ---------- 1 enet CE 100 enet CE 200 enet CE Remote SPAN VLANs ------------------------------------------------------------------------------- Primary Secondary Type Ports ------- --------- --------------- -------------------------------------------
Configuring a Port and Adding It to the VLAN
To configure a port and add it to the VLAN, perform the following operations:
- Configure the port running mode and add it to the VLAN.
switch (config)# interface ethernet 1/1 switch (config-if)# switchport mode trunk switch (config-if)# spanning-tree port type edge trunk
- Create a VFC and bind it to the physical port.
switch (config)# interface vfc 1 switch (config-if)# bind interface ethernet 1/1 switch (config-if)# no shutdown
- Add the new VFC to the VSAN.
NEXUS(config)# vsan database NEXUS(config-vsan-db)# vsan 2 interface vfc 1
Creating a Zone and Adding a Port to It
To create a zone and add a port to it, perform the following operations:
- Check the WWN of the storage system connected to the switch.
switch# show flogi database -------------------------------------------------------------------------------- INTERFACE VSAN FCID PORT NAME NODE NAME -------------------------------------------------------------------------------- vfc1 100 0x2b0002 21:00:00:0e:1e:0a:6b:ab 20:00:00:0e:1e:0a:6b:ab vfc4 100 0x2b0008 21:00:00:c0:dd:13:e2:a1 20:00:00:c0:dd:13:e2:a1 [lzh1] vfc5 100 0x2b0007 20:00:00:07:43:ab:ce:07 10:00:00:07:43:ab:ce:07 vfc6 100 0x2b0009 21:00:00:c0:dd:13:e2:a3 20:00:00:c0:dd:13:e2:a3 [lzh2] Total number of flogi = 4.
- On the switch, register a device name for the storage system.
You can use the device name instead of the WWN in later operations such as zone division. In this example, name the device database.
switch(config)# device-alias database switch(config-device-alias-db)# device-alias name test1 pwwn 20:00:00:0e:1e:0a:6b:ab switch(config-device-alias-db)# device-alias name test2 pwwn 10:00:00:07:43:ab:ce:07 switch(config-device-alias-db)# device-alias commit switch(config-device-alias-db)# show device-alias database device-alias name lzh1 pwwn 21:00:00:c0:dd:13:e2:a1 device-alias name lzh2 pwwn 21:00:00:c0:dd:13:e2:a3 device-alias name lzh3 pwwn 20:00:00:07:43:ab:cd:ef device-alias name lzh4 pwwn 20:00:00:07:43:ab:cd:f7 device-alias name test1 pwwn 20:00:00:0e:1e:0a:6b:ab device-alias name test2 pwwn 10:00:00:07:43:ab:ce:07
- Add the device name to the zone.
switch# show zone zone name zonexzh vsan 100 pwwn 21:00:00:0e:1e:0a:6b:ab pwwn 00:00:00:07:43:ab:cd:f7 pwwn 20:00:00:07:43:ab:ce:07 zone name zonexzh02 vsan 100 pwwn 21:00:00:0e:1e:0a:6b:af zone name zonexz vsan 100 pwwn 21:00:00:c0:dd:12:06:03 pwwn 20:00:00:07:43:ab:cd:ff zone name lzhzone1 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a1 [lzh1] pwwn 20:00:00:07:43:ab:cd:ef [lzh3] zone name lzhzone2 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a3 [lzh2] pwwn 20:00:00:07:43:ab:cd:f7 [lzh4] zone name lzhzone3 vsan 100 switch(config)# zone name lzhzone3 vsan 100switch(config-zone)# member device-alias test1 switch(config-zone)# member device-alias test2 switch(config-zone)# show zone zone name zonexzh vsan 100 pwwn 21:00:00:0e:1e:0a:6b:ab pwwn 00:00:00:07:43:ab:cd:f7 pwwn 20:00:00:07:43:ab:ce:07 zone name zonexzh02 vsan 100 pwwn 21:00:00:0e:1e:0a:6b:af zone name zonexz vsan 100 pwwn 21:00:00:c0:dd:12:06:03 pwwn 20:00:00:07:43:ab:cd:ff zone name lzhzone1 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a1 [lzh1] pwwn 20:00:00:07:43:ab:cd:ef [lzh3] zone name lzhzone2 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a3 [lzh2] pwwn 20:00:00:07:43:ab:cd:f7 [lzh4] zone name lzhzone3 vsan 100 pwwn 20:00:00:0e:1e:0a:6b:ab [test1] pwwn 10:00:00:07:43:ab:ce:07 [test2]
Creating a Zoneset and Adding the Zone to It
To create a zoneset and add the zone to it, perform the following operations:
- Create a zoneset in the VSAN.
switch(config)# zoneset name lzhzoneset5 vsan 100 switch(config-zoneset)# show zoneset zoneset name zoneset100 vsan 100 zone name zonexzh vsan 100 pwwn 21:00:00:0e:1e:0a:6b:ab pwwn 00:00:00:07:43:ab:cd:f7 pwwn 20:00:00:07:43:ab:ce:07 zone name zonexzh02 vsan 100 pwwn 21:00:00:0e:1e:0a:6b:af zone name zonexz vsan 100 pwwn 21:00:00:c0:dd:12:06:03 pwwn 20:00:00:07:43:ab:cd:ff zone name lzhzone1 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a1 [lzh1] pwwn 20:00:00:07:43:ab:cd:ef [lzh3] zone name lzhzone2 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a3 [lzh2] pwwn 20:00:00:07:43:ab:cd:f7 [lzh4] zoneset name lzhzoneset5 vsan 100
- Add the zone to the created zoneset.
switch(config-zoneset)# member lzhzone3 switch(config-zoneset)# show zoneset zoneset name zoneset100 vsan 100 zone name zonexzh vsan 100 pwwn 21:00:00:0e:1e:0a:6b:ab pwwn 00:00:00:07:43:ab:cd:f7 pwwn 20:00:00:07:43:ab:ce:07 zone name zonexzh02 vsan 100 pwwn 21:00:00:0e:1e:0a:6b:af zone name zonexz vsan 100 pwwn 21:00:00:c0:dd:12:06:03 pwwn 20:00:00:07:43:ab:cd:ff zone name lzhzone1 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a1 [lzh1] pwwn 20:00:00:07:43:ab:cd:ef [lzh3] zone name lzhzone2 vsan 100 pwwn 21:00:00:c0:dd:13:e2:a3 [lzh2] pwwn 20:00:00:07:43:ab:cd:f7 [lzh4] zoneset name lzhzoneset5 vsan 100 zone name lzhzone3 vsan 100 pwwn 20:00:00:0e:1e:0a:6b:ab [test1]pwwn 10:00:00:07:43:ab:ce:07 [test2]\
- Activate the zoneset.
switch (config)# zoneset activate name zoneset_1 vsan 2 zoneset activation initiated. check zone status
Generally, only one zoneset can be activated for an FCoE switch. Therefore, it is advisable to keep all the zones in the same zoneset, preventing impacts on other services.