• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C S5830V2[S5820V2]系列以太网交换机 典型配置举例-Release22xx系列-6W100

目录

61-FCoE典型配置举例

本章节下载 61-FCoE典型配置举例  (472.14 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S5800/S5830V2/Configure/Typical_Configuration_Example/H3C_S5830V2[S5820V2]-Release22xx-6W100/201403/819627_30005_0.htm

61-FCoE典型配置举例


1  FCoE典型配置举例

1.1  简介

FCoE是将FC协议承载在以太网上的一种协议。本章主要介绍在数据中心使用支持FCoE协议的FCoE交换机如何搭建网络为服务器和磁盘设备提供数据传输服务。

1.2  使用限制

·     设备只有工作在高级模式下,才支持FCoE功能。关于设备工作模式的详细介绍请参见“基础配置指导”中的“设备管理”。

·     FCoE功能需要获得License授权后方能使用。关于license使用的详细介绍请参见“基础配置指导”中的“license管理”。

·     在部署了FCoE功能的环境中,建议将IRF链路down延迟上报时间配置为0,具体请参见“IRF命令参考/IRF命令”中irf link-delay命令。

1.3  静态建立Fabric网络典型配置举例

1.3.1  适用产品和版本

表1 配置适用的产品与软件版本关系

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.3.2  组网需求

图1所示,网络由两个交换机Switch A和Switch B、1个服务器Server和1个磁盘设备Disk组成。

现要求在Switch A和Switch B上配置FCoE功能,实现:

·     能够避免不必要的网络震荡。

·     SAN网络中的存储数据流量能够在以太网链路上无损传输。

·     Server能够通过Fabric网络访问Disk内的存储资源。

图1 静态建立Fabric网络示意图

 

1.3.3  配置思路

·     由于网络结构比较简单,且当用户希望Fabric网络不会出现不必要的网络震荡,所以建议用户采用静态方式建立Fabric网络。

·     为了实现SAN网络中的存储数据流量能够在无损以太网链路上传输,H3C建议用户在交换机和服务器连接的以太网接口上需要配置DCBX、自动协商模式的PFC、ETS功能;在交换机和磁盘设备连接的以太网接口上需要配置DCBX、自动协商模式的PFC功能;在交换机与交换机连接的以太网接口上要强制开启PFC功能。配置DCBX、PFC、ETS功能请参考“二层技术-以太网交换配置指导”中的“LLDP”。

·     为了能够实现Server能够访问Disk内的存储资源,需要配置允许默认Zone内的成员互相访问。

1.3.4  配置注意事项

·     建立静态Fabric网络需要关闭所有交换机的Fabric配置功能。

·     建立静态Fabric网络需要为所有交换机配置相同的Fabric网络的名称。

·     建立静态Fabric网络需要为每一个交换机配置唯一的域ID。

1.3.5  配置步骤

1. 配置Switch A

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchA> system-view

[SwitchA] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchA] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchA] quit

# 重启设备。

<SwitchA> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchA] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchA] acl number 4000 name DCBX

[SwitchA-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchA-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchA] traffic classifier DCBX operator or

[SwitchA-classifier-DCBX] if-match acl 4000

[SwitchA-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchA] traffic behavior DCBX

[SwitchA-behavior-DCBX] remark dot1p 3

[SwitchA-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchA] qos policy DCBX

[SwitchA-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchA-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1上配置与服务器自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(5)     ETS部署

# 配置802.1p优先级到本地优先级的映射,将802.1p优先级3映射到本地优先级1,配置其它的802.1p优先级映射到本地优先级0。

[SwitchA] qos map-table dot1p-lp

[SwitchA-maptbl-dot1p-lp] import 3 export 1

[SwitchA-maptbl-dot1p-lp] import 0 export 0

[SwitchA-maptbl-dot1p-lp] import 1 export 0

[SwitchA-maptbl-dot1p-lp] import 2 export 0

[SwitchA-maptbl-dot1p-lp] import 4 export 0

[SwitchA-maptbl-dot1p-lp] import 5 export 0

[SwitchA-maptbl-dot1p-lp] import 6 export 0

[SwitchA-maptbl-dot1p-lp] import 7 export 0

[SwitchA-maptbl-dot1p-lp] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/1上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] quit

(6)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchA] fcoe-mode fcf

[SwitchA] vsan 1

[SwitchA-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchA-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为1。

[SwitchA-vsan1] domain-id 1 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchA-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] fc mode f

[SwitchA-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchA-Vfc1] port trunk vsan 1

[SwitchA-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] fc mode e

[SwitchA-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchA-Vfc2] port trunk vsan 1

[SwitchA-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchA] vlan 10

[SwitchA-vlan10] fcoe enable vsan 1

[SwitchA-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchA] vsan 1

[SwitchA-vsan1] zone default-zone permit

[SwitchA-vsan1] quit

2. 配置Switch B

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchB> system-view

[SwitchB] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchB] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchB] quit

# 重启设备。

<SwitchB> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchB> system-view

[SwitchB] vlan 10

[SwitchB-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/2] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchB] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchB] acl number 4000 name DCBX

[SwitchB-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchB-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchB-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchB] traffic classifier DCBX operator or

[SwitchB-classifier-DCBX] if-match acl 4000

[SwitchB-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchB] traffic behavior DCBX

[SwitchB-behavior-DCBX] remark dot1p 3

[SwitchB-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchB] qos policy DCBX

[SwitchB-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchB-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchB-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchB-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1上配置与磁盘设备自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/2] quit

(5)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchB] fcoe-mode fcf

[SwitchB] vsan 1

[SwitchB-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchB-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为2。

[SwitchB-vsan1] domain-id 2 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchB-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchB] interface vfc 1

[SwitchB-Vfc1] fc mode f

[SwitchB-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchB-Vfc1] port trunk vsan 1

[SwitchB-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchB] interface vfc 2

[SwitchB-Vfc2] fc mode e

[SwitchB-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchB-Vfc2] port trunk vsan 1

[SwitchB-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchB] vlan 10

[SwitchB-vlan10] fcoe enable vsan 1

[SwitchB-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchB] vsan 1

[SwitchB-vsan1] zone default-zone permit

[SwitchB-vsan1] quit

1.3.6  验证配置

(1)     验证Switch A

[SwitchA] display fc domain vsan 1

Domain Information of VSAN 1:

 

    Running time information:

        State: Stable

        Switch WWN: 48:33:43:2d:46:43:1A:1A

        Fabric name: 11:11:11:11:11:11:11:11

        Priority: 128

        Domain ID: 1

    Configuration information:

        Domain configure: Disabled

        Domain auto-reconfigure: Disabled

        Fabric name: 11:11:11:11:11:11:11:11

        Priority: 128

        Domain ID: 1 (static)

    Principal switch running time information:

        Priority: 128

 

    No interfaces available.

上述信息表明,域配置已经结束,Switch A的运行域ID是1。

(2)     验证Switch B

[SwitchB] display fc domain vsan 1

Domain Information of VSAN 1:

 

    Running time information:

        State: Stable

        Switch WWN: 48:33:43:2d:46:43:1B:1B

        Fabric name: 11:11:11:11:11:11:11:11

        Priority: 128

        Domain ID: 2

    Configuration information:

        Domain configure: Disabled

        Domain auto-reconfigure: Disabled

        Fabric name: 11:11:11:11:11:11:11:11

        Priority: 128

        Domain ID: 2 (static)

    Principal switch running time information:

        Priority: 128

 

    No interfaces available.

上述信息表明,域配置已经结束,Switch B的运行域ID是2。

1.3.7  配置文件

·     Switch A

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 1 static

 undo domain configure enable

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

qos map-table dot1p-lp

 import 0 export 0

 import 2 export 0

 import 3 export 1

 import 4 export 0

 import 5 export 0

 import 6 export 0

 import 7 export 0

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

·     Switch B

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 2 static

 undo domain configure enable

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

1.4  动态建立Fabric网络典型配置举例

1.4.1  适用产品和版本

表2 配置适用的产品与软件版本关系

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.4.2  组网需求

图2所示,网络由四个交换机Switch A~Switch D、1个服务器Server和1个磁盘设备Disk组成。

现要求在Switch A~Switch D上配置FCoE功能,实现:

·     交换机能够在Fabric网络中自动进行角色选举,方便用户对整个网络进行集中管理。

·     SAN网络中的存储数据流量能够在以太网链路上无损传输。

·     Server能够通过Fabric网络访问Disk内的存储资源。

图2 FCoE组网示意图

 

1.4.3  配置思路

·     由于网络结构比较复杂,且当用户希望能够对Fabric网络进行集中管理,所以建议用户采用动态方式建立Fabric网络。

·     为了实现SAN网络中的存储数据流量能够在无损以太网链路上传输,H3C建议用户在交换机和服务器连接的以太网接口上需要配置DCBX、自动协商模式的PFC、ETS功能;在交换机和磁盘设备连接的以太网接口上需要配置DCBX、自动协商模式的PFC功能;在交换机与交换机连接的以太网接口上要强制开启PFC功能。配置DCBX、PFC、ETS功能请参考“二层技术-以太网交换配置指导”中的“LLDP”。

·     为了能够实现Server能够访问Disk内的存储资源,需要配置允许默认Zone内的成员互相访问。

1.4.4  配置注意事项

建立动态Fabric网络需要保证所有FCF交换机的Fabric配置功能均为开启状态。

1.4.5  配置步骤

1. 配置Switch A

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchA> system-view

[SwitchA] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchA] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchA] quit

# 重启设备。

<SwitchA> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(3)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(4)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchA] fcoe-mode fcf

[SwitchA] vsan 1

[SwitchA-vsan1] domain configure enable

# 配置域ID为11。

[SwitchA-vsan1] domain-id 11 preferred

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchA-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] fc mode e

[SwitchA-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchA-Vfc1] port trunk vsan 1

[SwitchA-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] fc mode e

[SwitchA-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchA-Vfc2] port trunk vsan 1

[SwitchA-Vfc2] quit

# 开启VLAN 10的FCoE功能、并将其与VSAN 1进行映射。

[SwitchA] vlan 10

[SwitchA-vlan10] fcoe enable vsan 1

[SwitchA-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchA] vsan 1

[SwitchA-vsan1] zone default-zone permit

[SwitchA-vsan1] quit

2. 配置Switch B

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchB> system-view

[SwitchB] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchB] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchB] quit

# 重启设备。

<SwitchB> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchB> system-view

[SwitchB] vlan 10

[SwitchB-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3允许VLAN 10的报文通过。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/2] quit

[SwitchB] interface ten-gigabitethernet 1/0/3

[SwitchB-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/3] quit

(3)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/2] quit

[SwitchB] interface ten-gigabitethernet 1/0/3

[SwitchB-Ten-GigabitEthernet1/0/3] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/3] quit

(4)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchB] fcoe-mode fcf

[SwitchB] vsan 1

[SwitchB-vsan1] domain configure enable

# 配置交换机的优先级为1,使Switch B成为主交换机。

[SwitchB-vsan1] priority 1

[SwitchB-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchB] interface vfc 1

[SwitchB-Vfc1] fc mode e

[SwitchB-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchB-Vfc1] port trunk vsan 1

[SwitchB-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchB] interface vfc 2

[SwitchB-Vfc2] fc mode e

[SwitchB-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchB-Vfc2] port trunk vsan 1

[SwitchB-Vfc2] quit

# 创建VFC3接口,配置VFC3接口工作在E模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchB] interface vfc 3

[SwitchB-Vfc3] fc mode e

[SwitchB-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchB-Vfc3] port trunk vsan 1

[SwitchB-Vfc3] quit

# 开启VLAN 10的FCoE功能、并将其与VSAN 1进行映射。

[SwitchB] vlan 10

[SwitchB-vlan10] fcoe enable vsan 1

[SwitchB-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchB] vsan 1

[SwitchB-vsan1] zone default-zone permit

[SwitchB-vsan1] quit

3. 配置Switch C

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchC> system-view

[SwitchC] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchC] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchC] quit

# 重启设备。

<SwitchC> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchC> system-view

[SwitchC] vlan 10

[SwitchC-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3允许VLAN 10的报文通过。

[SwitchC] interface ten-gigabitethernet 1/0/1

[SwitchC-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/1] quit

[SwitchC] interface ten-gigabitethernet 1/0/2

[SwitchC-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/2] quit

[SwitchC] interface ten-gigabitethernet 1/0/3

[SwitchC-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/3] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchC] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchC] acl number 4000 name DCBX

[SwitchC-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchC-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchC-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchC] traffic classifier DCBX operator or

[SwitchC-classifier-DCBX] if-match acl 4000

[SwitchC-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchC] traffic behavior DCBX

[SwitchC-behavior-DCBX] remark dot1p 3

[SwitchC-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchC] qos policy DCBX

[SwitchC-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchC-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/3上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchC] interface ten-gigabitethernet 1/0/3

[SwitchC-Ten-GigabitEthernet1/0/3] lldp enable

[SwitchC-Ten-GigabitEthernet1/0/3] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/3的出方向上应用QoS策略。

[SwitchC-Ten-GigabitEthernet1/0/3] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/3上配置与磁盘设备自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchC-Ten-GigabitEthernet1/0/3] priority-flow-control auto

[SwitchC-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/3] quit

# 在以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchC] interface ten-gigabitethernet 1/0/1

[SwitchC-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchC-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/1] quit

[SwitchC] interface ten-gigabitethernet 1/0/2

[SwitchC-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchC-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/2] quit

(5)     ETS部署

# 配置802.1p优先级到本地优先级的映射,将802.1p优先级3映射到本地优先级1,配置其它的802.1p优先级映射到本地优先级0。

[SwitchC] qos map-table dot1p-lp

[SwitchC-maptbl-dot1p-lp] import 3 export 1

[SwitchC-maptbl-dot1p-lp] import 0 export 0

[SwitchC-maptbl-dot1p-lp] import 1 export 0

[SwitchC-maptbl-dot1p-lp] import 2 export 0

[SwitchC-maptbl-dot1p-lp] import 4 export 0

[SwitchC-maptbl-dot1p-lp] import 5 export 0

[SwitchC-maptbl-dot1p-lp] import 6 export 0

[SwitchC-maptbl-dot1p-lp] import 7 export 0

[SwitchC-maptbl-dot1p-lp] quit

# 在以太网接口Ten-GigabitEthernet1/0/3上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchC] interface ten-gigabitethernet 1/0/3

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr byte-count

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr af1 group 1 byte-count 1

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/3上配置其它的队列为SP调度方式。

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr af2 group sp

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr af3 group sp

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr af4 group sp

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr ef group sp

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr cs6 group sp

[SwitchC-Ten-GigabitEthernet1/0/3] qos wrr cs7 group sp

[SwitchC-Ten-GigabitEthernet1/0/3] quit

(6)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchC] fcoe-mode fcf

[SwitchC] vsan 1

[SwitchC-vsan1] domain configure enable

# 配置域ID为13。

[SwitchC-vsan1] domain-id 13 preferred

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchC-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchC] interface vfc 1

[SwitchC-Vfc1] fc mode e

[SwitchC-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchC-Vfc1] port trunk vsan 1

[SwitchC-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchC] interface vfc 2

[SwitchC-Vfc2] fc mode e

[SwitchC-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchC-Vfc2] port trunk vsan 1

[SwitchC-Vfc2] quit

# 创建VFC3接口,配置VFC3接口工作在F模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchC] interface vfc 3

[SwitchC-Vfc3] fc mode f

[SwitchC-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchC-Vfc3] port trunk vsan 1

[SwitchC-Vfc3] quit

# 开启VLAN 10的FCoE功能、并将其与VSAN 1进行映射。

[SwitchC] vlan 10

[SwitchC-vlan10] fcoe enable vsan 1

[SwitchC-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchC] vsan 1

[SwitchC-vsan1] zone default-zone permit

[SwitchC-vsan1] quit

4. 配置Switch D

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchD> system-view

[SwitchD] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchD] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchD] quit

# 重启设备。

<SwitchD> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchD> system-view

[SwitchD] vlan 10

[SwitchD-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchD] interface ten-gigabitethernet 1/0/1

[SwitchD-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchD-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchD-Ten-GigabitEthernet1/0/1] quit

[SwitchD] interface ten-gigabitethernet 1/0/2

[SwitchD-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchD-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchD-Ten-GigabitEthernet1/0/2] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchD] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchD] acl number 4000 name DCBX

[SwitchD-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchD-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchD-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchD] traffic classifier DCBX operator or

[SwitchD-classifier-DCBX] if-match acl 4000

[SwitchD-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchD] traffic behavior DCBX

[SwitchD-behavior-DCBX] remark dot1p 3

[SwitchD-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchD] qos policy DCBX

[SwitchD-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchD-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchD] interface ten-gigabitethernet 1/0/2

[SwitchD-Ten-GigabitEthernet1/0/2] lldp enable

[SwitchD-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/2的出方向上应用QoS策略。

[SwitchD-Ten-GigabitEthernet1/0/2] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/2上配置与磁盘设备自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchD-Ten-GigabitEthernet1/0/2] priority-flow-control auto

[SwitchD-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchD-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchD-Ten-GigabitEthernet1/0/2] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchD] interface ten-gigabitethernet 1/0/1

[SwitchD-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchD-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchD-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchD-Ten-GigabitEthernet1/0/1] quit

(5)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchD] fcoe-mode fcf

[SwitchD] vsan 1

[SwitchD-vsan1] domain configure enable

# 配置域ID为14。

[SwitchD-vsan1] domain-id 14 preferred

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchD-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchD] interface vfc 1

[SwitchD-Vfc1] fc mode e

[SwitchD-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchD-Vfc1] port trunk vsan 1

[SwitchD-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在F模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchD] interface vfc 2

[SwitchD-Vfc2] fc mode f

[SwitchD-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchD-Vfc2] port trunk vsan 1

[SwitchD-Vfc2] quit

# 开启VLAN 10的FCoE功能、并将其与VSAN 1进行映射。

[SwitchD] vlan 10

[SwitchD-vlan10] fcoe enable vsan 1

[SwitchD-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchD] vsan 1

[SwitchD-vsan1] zone default-zone permit

[SwitchD-vsan1] quit

1.4.6  验证配置

在Switch A上进行验证。

# 显示VSAN 1内的域信息。

[SwitchA] display fc domain vsan 1

Domain Information of VSAN 1:

 

    Running time information:

        State: Stable

        Switch WWN: 48:33:43:2d:46:43:1A:1A

        Fabric name: 48:33:43:2d:46:43:1B:1B

        Priority: 128

        Domain ID: 11

    Configuration information:

        Domain configure: Enabled

        Domain auto-reconfigure: Disabled

        Fabric name: 48:33:43:2d:46:43:1A:1A

        Priority: 128

        Domain ID: 11 (preferred)

    Principal switch running time information:

        Priority: 1

 

    Path          Interface

    Upstream      Vfc1

    Downstream    Vfc2

从上述信息可以看出,Switch A的配置已经结束,主交换机为Switch A分配的域ID为11。

# 显示VSAN 1内的域列表。

[SwitchA] display fc domain-list vsan 1

Domain list of VSAN 1:

  Number of domains: 4

 

  Domain ID      WWN

  0x01(1)        48:33:43:2d:46:43:1B:1B [Principal]

  0x0b(11)       48:33:43:2d:46:43:1A:1A [Local]

  0x0d(13)       48:33:43:2d:46:43:1C:1C

  0x0e(14)       48:33:43:2d:46:43:1D:1D

从上述信息可以看出,Switch B成为主交换机,主交换机给自己分配了最小的域ID 1。

1.4.7  配置文件

·     Switch A

#

 fcoe-mode fcf

#

 system-working-mode advance

#

vsan 1

 domain-id 11 preferred

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

·     Switch B

#

 fcoe-mode fcf

#

 system-working-mode advance

#

vsan 1

 priority 1

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

·     Switch C

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 domain-id 13 preferred

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

qos map-table dot1p-lp

 import 0 export 0

 import 2 export 0

 import 3 export 1

 import 4 export 0

 import 5 export 0

 import 6 export 0

 import 7 export 0

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

·     Switch D

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 domain-id 14 preferred

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Vfc1

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

1.5  FC静态路由典型配置举例

1.5.1  适用产品和版本

表3 配置适用的产品与软件版本关系

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.5.2  组网需求

图3所示,网络由三个交换机Switch A~Switch C、1个服务器Server和1个磁盘设备Disk组成。

现要求在Switch A、Switch B和Switch C上配置FCoE功能,实现:

·     能够根据用户意愿将去往指定目的地的FC报文按照指定的路径进行转发。

·     SAN网络中的存储数据流量能够在以太网链路上无损传输。

·     Server能够通过Fabric网络访问Disk内的存储资源。

图3 FC静态路由示意图

 

1.5.3  配置思路

·     为了实现SAN网络中的存储数据流量能够在无损以太网链路上传输,H3C建议用户在交换机和服务器连接的以太网接口上需要配置DCBX、自动协商模式的PFC、ETS功能;在交换机和磁盘设备连接的以太网接口上需要配置DCBX、自动协商模式的PFC功能;在交换机与交换机连接的以太网接口上要强制开启PFC功能。配置DCBX、PFC、ETS功能请参考“二层技术-以太网交换配置指导”中的“LLDP”。

·     由于网络结构比较简单,且当用户希望FC报文按照指定路径进行转发,所以建议用户采用静态方式建立Fabric网络,并为该Fabric网络配置FC静态路由。

·     为了能够实现Server能够访问Disk内的存储资源,需要配置允许默认Zone内的成员互相访问。

1.5.4  配置注意事项

·     配置FC静态路由需要先规划好Fabric网络,要求在同一VSAN内的每一个交换机有唯一的域ID。

·     配置FC静态路由时,需要在所有交换机上配置双向的FC静态路由,即转发服务器的请求报文和磁盘设备的应答报文。

1.5.5  配置步骤

1. 配置Switch A

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchA> system-view

[SwitchA] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchA] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchA] quit

# 重启设备。

<SwitchA> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchA] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchA] acl number 4000 name DCBX

[SwitchA-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchA-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchA] traffic classifier DCBX operator or

[SwitchA-classifier-DCBX] if-match acl 4000

[SwitchA-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchA] traffic behavior DCBX

[SwitchA-behavior-DCBX] remark dot1p 3

[SwitchA-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchA] qos policy DCBX

[SwitchA-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchA-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1上配置与服务器自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(5)     ETS部署

# 配置802.1p优先级到本地优先级的映射,将802.1p优先级3映射到本地优先级1,配置其它的802.1p优先级映射到本地优先级0。

[SwitchA] qos map-table dot1p-lp

[SwitchA-maptbl-dot1p-lp] import 3 export 1

[SwitchA-maptbl-dot1p-lp] import 0 export 0

[SwitchA-maptbl-dot1p-lp] import 1 export 0

[SwitchA-maptbl-dot1p-lp] import 2 export 0

[SwitchA-maptbl-dot1p-lp] import 4 export 0

[SwitchA-maptbl-dot1p-lp] import 5 export 0

[SwitchA-maptbl-dot1p-lp] import 6 export 0

[SwitchA-maptbl-dot1p-lp] import 7 export 0

[SwitchA-maptbl-dot1p-lp] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/1上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] quit

(6)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchA] fcoe-mode fcf

[SwitchA] vsan 1

[SwitchA-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchA-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为1。

[SwitchA-vsan1] domain-id 1 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchA-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] fc mode f

[SwitchA-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchA-Vfc1] port trunk vsan 1

[SwitchA-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] fc mode e

[SwitchA-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchA-Vfc2] port trunk vsan 1

[SwitchA-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchA] vlan 10

[SwitchA-vlan10] fcoe enable vsan 1

[SwitchA-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchA] vsan 1

[SwitchA-vsan1] zone default-zone permit

# 在Switch A上配置两条静态路由。

[SwitchA-vsan1] fc route-static 020000 8 vfc 2

[SwitchA-vsan1] fc route-static 030000 8 vfc 2

[SwitchA-vsan1] quit

2. 配置Switch B

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchB> system-view

[SwitchB] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchB] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchB] quit

# 重启设备。

<SwitchB> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchB> system-view

[SwitchB] vlan 10

[SwitchB-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/2] quit

(3)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/2] quit

(4)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchB] fcoe-mode fcf

[SwitchB] vsan 1

[SwitchB-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchB-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为2。

[SwitchB-vsan1] domain-id 2 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchB-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchB] interface vfc 1

[SwitchB-Vfc1] fc mode e

[SwitchB-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchB-Vfc1] port trunk vsan 1

[SwitchB-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchB] interface vfc 2

[SwitchB-Vfc2] fc mode e

[SwitchB-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchB-Vfc2] port trunk vsan 1

[SwitchB-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchB] vlan 10

[SwitchB-vlan10] fcoe enable vsan 1

[SwitchB-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchB] vsan 1

[SwitchB-vsan1] zone default-zone permit

# 在Switch B上配置两条静态路由。

[SwitchB-vsan1] fc route-static 010000 8 vfc 1

[SwitchB-vsan1] fc route-static 030000 8 vfc 2

[SwitchB-vsan1] quit

3. 配置Switch C

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchC> system-view

[SwitchC] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchC] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchC] quit

# 重启设备。

<SwitchC> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchC> system-view

[SwitchC] vlan 10

[SwitchC-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchC] interface ten-gigabitethernet 1/0/1

[SwitchC-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/1] quit

[SwitchC] interface ten-gigabitethernet 1/0/2

[SwitchC-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/2] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchC] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchC] acl number 4000 name DCBX

[SwitchC-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchC-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchC] traffic classifier DCBX operator or

[SwitchC-classifier-DCBX] if-match acl 4000

[SwitchC-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchC] traffic behavior DCBX

[SwitchC-behavior-DCBX] remark dot1p 3

[SwitchC-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchC] qos policy DCBX

[SwitchC-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchC-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchC] interface ten-gigabitethernet 1/0/2

[SwitchC-Ten-GigabitEthernet1/0/2] lldp enable

[SwitchC-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/2的出方向上应用QoS策略。

[SwitchC-Ten-GigabitEthernet1/0/2] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/2上配置与磁盘设备自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchC-Ten-GigabitEthernet1/0/2] priority-flow-control auto

[SwitchC-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/2] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchC] interface ten-gigabitethernet 1/0/1

[SwitchC-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchC-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/1] quit

(5)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchC] fcoe-mode fcf

[SwitchC] vsan 1

[SwitchC-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchC-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为3。

[SwitchC-vsan1] domain-id 3 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchC-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchC] interface vfc 1

[SwitchC-Vfc1] fc mode e

[SwitchC-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchC-Vfc1] port trunk vsan 1

[SwitchC-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在F模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchC] interface vfc 2

[SwitchC-Vfc2] fc mode f

[SwitchC-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchC-Vfc2] port trunk vsan 1

[SwitchC-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchC] vlan 10

[SwitchC-vlan10] fcoe enable vsan 1

[SwitchC-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchC] vsan 1

[SwitchC-vsan1] zone default-zone permit

# 在Switch C上配置两条静态路由。

[SwitchC-vsan1] fc route-static 010000 8 vfc 1

[SwitchC-vsan1] fc route-static 020000 8 vfc 1

[SwitchC-vsan1] quit

1.5.6  验证配置

(1)     验证Switch A

# 显示Switch A的VSAN 1的FC路由表。

[SwitchA] display fc routing-table vsan 1

Routing Table: VSAN 1

  Destinations : 6          Routes : 6

  Destination/mask   Protocol   Preference   Cost     Interface

  0x020000/8         STATIC     10           0        Vfc2

  0x030000/8         STATIC     10           0        Vfc2

  0xfffc01/24        DIRECT     0            0        InLoop0

  0xfffffa/24        DIRECT     0            0        InLoop0

  0xfffffc/24        DIRECT     0            0        InLoop0

  0xfffffd/24        DIRECT     0            0        InLoop0

上述信息表明,Switch A存在两条静态路由。

# 在Switch A上使用fcping命令验证Switch C是否可达。

[SwitchA] fcping fcid fffc03 vsan 1

FCPING fcid 0xfffc03: 128 data bytes, press CTRL_C to break

Reply from 0xfffc03: bytes = 128 time = 23 ms

Reply from 0xfffc03: bytes = 128 time = 9 ms

Reply from 0xfffc03: bytes = 128 time = 19 ms

Reply from 0xfffc03: bytes = 128 time = 14 ms

Reply from 0xfffc03: bytes = 128 time = 25 ms

 

--- 0xfffc03 fcping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 9/18/25 ms

上述信息表明,Switch A至Switch C路由可达。

(2)     验证Switch B

# 显示Switch B的VSAN 1的FC路由表。

[SwitchB] display fc routing-table vsan 1

Routing Table: VSAN 1

  Destinations : 6          Routes : 6

  Destination/mask   Protocol   Preference   Cost     Interface

  0x010000/8         STATIC     10           0        Vfc1

  0x030000/8         STATIC     10           0        Vfc2

  0xfffc01/24        DIRECT     0            0        InLoop0

  0xfffffa/24        DIRECT     0            0        InLoop0

  0xfffffc/24        DIRECT     0            0        InLoop0

  0xfffffd/24        DIRECT     0            0        InLoop0

上述信息表明,Switch B存在两条静态路由。

(3)     验证Switch C

# 显示Switch C的VSAN 1的FC路由表。

[SwitchC] display fc routing-table vsan 1

Routing Table: VSAN 1

  Destinations : 6          Routes : 6

  Destination/mask   Protocol   Preference   Cost     Interface

  0x010000/8         STATIC     10           0        Vfc1

  0x020000/8         STATIC     10           0        Vfc1

  0xfffc01/24        DIRECT     0            0        InLoop0

  0xfffffa/24        DIRECT     0            0        InLoop0

  0xfffffc/24        DIRECT     0            0        InLoop0

  0xfffffd/24        DIRECT     0            0        InLoop0

上述信息表明,Switch C存在两条静态路由。

1.5.7  配置文件

·     Switch A

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 1 static

 undo domain configure enable

 fc route-static 020000 8  Vfc2

 fc route-static 030000 8  Vfc2

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

qos map-table dot1p-lp

 import 0 export 0

 import 2 export 0

 import 3 export 1

 import 4 export 0

 import 5 export 0

 import 6 export 0

 import 7 export 0

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

·     Switch B

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 2 static

 undo domain configure enable

 fc route-static 010000 8  Vfc1

 fc route-static 030000 8  Vfc2

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

·     Switch C

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 3 static

 undo domain configure enable

 fc route-static 010000 8  Vfc1

 fc route-static 020000 8  Vfc1

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Vfc1

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

1.6  FSPF典型配置举例

1.6.1  适用产品和版本

表4 配置适用的产品与软件版本关系

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.6.2  组网需求

图4所示,网络由三个交换机Switch A~Switch C、1个服务器Server和1个磁盘设备Disk组成。

现要求在Switch A、Switch B和Switch C上配置FCoE功能,实现:

·     SAN网络中的存储数据流量能够在以太网链路上无损传输。

·     Fabric网络中任意两台交换机之间的FC报文转发均有最短路径,且FC报文的转发路径能够自动适应网络拓扑结构的变化。

·     Server能够通过Fabric网络访问Disk内的存储资源。

图4 FSPF示意图

 

1.6.3  配置思路

·     为了实现SAN网络中的存储数据流量能够在无损以太网链路上传输,H3C建议用户在交换机和服务器连接的以太网接口上需要配置DCBX、自动协商模式的PFC、ETS功能;在交换机和磁盘设备连接的以太网接口上需要配置DCBX、自动协商模式的PFC功能;在交换机与交换机连接的以太网接口上要强制开启PFC功能。配置DCBX、PFC、ETS功能请参考“二层技术-以太网交换配置指导”中的“LLDP”。

·     由于网络结构比较复杂,且当用户希望所建立的Fabric网络能够自动计算所有交换机之间的FC报文的转发路径,且FC报文的转发路径能够自动适应网络拓扑结构的变化,所以建议用户采用动态方式建立Fabric网络,并为该Fabric网络配置FSPF。

·     为了能够实现Server能够访问Disk内的存储资源,需要配置允许默认Zone内的成员互相访问。

1.6.4  配置注意事项

为了成功配置FSPF,本举例需要在E模式的VFC接口上及它们所属的VSAN上开启FSPF功能。

1.6.5  配置步骤

1. 配置Switch A

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchA> system-view

[SwitchA] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchA] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchA] quit

# 重启设备。

<SwitchA> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3允许VLAN 10的报文通过。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/2] quit

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/3] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchA] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchA] acl number 4000 name DCBX

[SwitchA-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchA-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchA] traffic classifier DCBX operator or

[SwitchA-classifier-DCBX] if-match acl 4000

[SwitchA-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchA] traffic behavior DCBX

[SwitchA-behavior-DCBX] remark dot1p 3

[SwitchA-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchA] qos policy DCBX

[SwitchA-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchA-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1上配置与服务器自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2和Ten-GigabitEthernet1/0/3上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/2] quit

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/3] quit

(5)     ETS部署

# 配置802.1p优先级到本地优先级的映射,将802.1p优先级3映射到本地优先级1,配置其它的802.1p优先级映射到本地优先级0。

[SwitchA] qos map-table dot1p-lp

[SwitchA-maptbl-dot1p-lp] import 3 export 1

[SwitchA-maptbl-dot1p-lp] import 0 export 0

[SwitchA-maptbl-dot1p-lp] import 1 export 0

[SwitchA-maptbl-dot1p-lp] import 2 export 0

[SwitchA-maptbl-dot1p-lp] import 4 export 0

[SwitchA-maptbl-dot1p-lp] import 5 export 0

[SwitchA-maptbl-dot1p-lp] import 6 export 0

[SwitchA-maptbl-dot1p-lp] import 7 export 0

[SwitchA-maptbl-dot1p-lp] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/1上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] quit

(6)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchA] fcoe-mode fcf

[SwitchA] vsan 1

[SwitchA-vsan1] domain configure enable

# 配置交换机的优先级为1,使Switch A成为主交换机。

[SwitchA-vsan1] priority 1

[SwitchA-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] fc mode f

[SwitchA-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchA-Vfc1] port trunk vsan 1

[SwitchA-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] fc mode e

[SwitchA-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchA-Vfc2] port trunk vsan 1

[SwitchA-Vfc2] quit

# 创建VFC3接口,配置VFC3接口工作在E模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchA] interface vfc 3

[SwitchA-Vfc3] fc mode e

[SwitchA-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchA-Vfc3] port trunk vsan 1

[SwitchA-Vfc3] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchA] vlan 10

[SwitchA-vlan10] fcoe enable vsan 1

[SwitchA-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchA] vsan 1

[SwitchA-vsan1] zone default-zone permit

# 全局开启FSPF功能

[SwitchA-vsan1] fspf enable

[SwitchA-vsan1] quit

# 开启VFC2接口的FSPF功能。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] undo fspf silent vsan 1

[SwitchA-Vfc2] quit

# 开启VFC3接口的FSPF功能。

[SwitchA] interface vfc 3

[SwitchA-Vfc3] undo fspf silent vsan 1

[SwitchA-Vfc3] quit

2. 配置Switch B

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchB> system-view

[SwitchB] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchB] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchB] quit

# 重启设备。

<SwitchB> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchB> system-view

[SwitchB] vlan 10

[SwitchB-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2允许VLAN 10的报文通过。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/2] quit

(3)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/2] quit

(4)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchB] fcoe-mode fcf

[SwitchB] vsan 1

[SwitchB-vsan1] domain configure enable

# 配置域ID为2。

[SwitchB-vsan1] domain-id 2 preferred

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchB-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在E模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchB] interface vfc 1

[SwitchB-Vfc1] fc mode e

[SwitchB-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchB-Vfc1] port trunk vsan 1

[SwitchB-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchB] interface vfc 2

[SwitchB-Vfc2] fc mode e

[SwitchB-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchB-Vfc2] port trunk vsan 1

[SwitchB-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchB] vlan 10

[SwitchB-vlan10] fcoe enable vsan 1

[SwitchB-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchB] vsan 1

[SwitchB-vsan1] zone default-zone permit

# 全局开启FSPF功能

[SwitchB-vsan1] fspf enable

[SwitchB-vsan1] quit

# 开启VFC1接口的FSPF功能。

[SwitchB] interface vfc 1

[SwitchB-Vfc1] undo fspf silent vsan 1

[SwitchB-Vfc1] quit

# 开启VFC2接口的FSPF功能。

[SwitchB] interface vfc 2

[SwitchB-Vfc2] undo fspf silent vsan 1

[SwitchB-Vfc2] quit

3. 配置Switch C

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchC> system-view

[SwitchC] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchC] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchC] quit

# 重启设备。

<SwitchC> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchC> system-view

[SwitchC] vlan 10

[SwitchC-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3允许VLAN 10的报文通过。

[SwitchC] interface ten-gigabitethernet 1/0/1

[SwitchC-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/1] quit

[SwitchC] interface ten-gigabitethernet 1/0/2

[SwitchC-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/2] quit

[SwitchC] interface ten-gigabitethernet 1/0/3

[SwitchC-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchC-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchC-Ten-GigabitEthernet1/0/3] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchC] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchC] acl number 4000 name DCBX

[SwitchC-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchC-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchC] traffic classifier DCBX operator or

[SwitchC-classifier-DCBX] if-match acl 4000

[SwitchC-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchC] traffic behavior DCBX

[SwitchC-behavior-DCBX] remark dot1p 3

[SwitchC-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchC] qos policy DCBX

[SwitchC-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchC-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchC] interface ten-gigabitethernet 1/0/1

[SwitchC-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchC-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchC-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1上配置与服务器自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchC-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchC-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2和Ten-GigabitEthernet1/0/3上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchC] interface ten-gigabitethernet 1/0/2

[SwitchC-Ten-GigabitEthernet1/0/2] priority-flow-control enable

[SwitchC-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/2] quit

[SwitchC] interface ten-gigabitethernet 1/0/3

[SwitchC-Ten-GigabitEthernet1/0/3] priority-flow-control enable

[SwitchC-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchC-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchC-Ten-GigabitEthernet1/0/3] quit

(5)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图,开启Fabric配置功能(本步骤可选,Fabric配置功能缺省开启)。

[SwitchC] fcoe-mode fcf

[SwitchC] vsan 1

[SwitchC-vsan1] domain configure enable

# 配置域ID为3。

[SwitchC-vsan1] domain-id 3 preferred

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchC-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchC] interface vfc 1

[SwitchC-Vfc1] fc mode f

[SwitchC-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchC-Vfc1] port trunk vsan 1

[SwitchC-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在E模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchC] interface vfc 2

[SwitchC-Vfc2] fc mode e

[SwitchC-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchC-Vfc2] port trunk vsan 1

[SwitchC-Vfc2] quit

# 创建VFC3接口,配置VFC3接口工作在E模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchC] interface vfc 3

[SwitchC-Vfc3] fc mode e

[SwitchC-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchC-Vfc3] port trunk vsan 1

[SwitchC-Vfc3] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchC] vlan 10

[SwitchC-vlan10] fcoe enable vsan 1

[SwitchC-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchC] vsan 1

[SwitchC-vsan1] zone default-zone permit

# 全局开启FSPF功能

[SwitchC-vsan1] fspf enable

[SwitchC-vsan1] quit

# 开启VFC2接口的FSPF功能。

[SwitchC] interface vfc 2

[SwitchC-Vfc2] undo fspf silent vsan 1

[SwitchC-Vfc2] quit

# 开启VFC3接口的FSPF功能。

[SwitchC] interface vfc 3

[SwitchC-Vfc3] undo fspf silent vsan 1

[SwitchC-Vfc3] quit

1.6.6  验证配置

(1)     验证Switch A

# 显示Switch A的FSPF邻居信息。

[SwitchA] display fspf neighbor

FSPF neighbor information of VSAN 1(01):

  Interface   NbrDomain   IfIndex   NbrIfIndex   Dead Time   State

  Vfc2        2           0x68      0x68         00:01:06    Full

  Vfc3        3           0x69      0x69         00:01:06    Full

上述信息表明,Switch A存在两个邻居(域ID分别为2和3),即Switch B和Switch C。

# 显示Switch A的VSAN 1的FC路由表。

[SwitchA] display fc routing-table vsan 1

Routing Table: VSAN 1

  Destinations : 6          Routes : 6

  Destination/mask   Protocol   Preference   Cost     Interface

  0x020000/8         FSPF       20           100      Vfc2

  0x030000/8         FSPF       20           100      Vfc3

  0xfffc01/24        DIRECT     0            0        InLoop0

  0xfffffa/24        DIRECT     0            0        InLoop0

  0xfffffc/24        DIRECT     0            0        InLoop0

  0xfffffd/24        DIRECT     0            0        InLoop0

上述信息表明,Switch A存在两条FSPF。

# 在Switch A上使用fcping命令验证Switch C是否可达。

[SwitchA] fcping fcid fffc03 vsan 1

FCPING fcid 0xfffc03: 128 data bytes, press CTRL_C to break

Reply from 0xfffc03: bytes = 128 time = 23 ms

Reply from 0xfffc03: bytes = 128 time = 9 ms

Reply from 0xfffc03: bytes = 128 time = 19 ms

Reply from 0xfffc03: bytes = 128 time = 14 ms

Reply from 0xfffc03: bytes = 128 time = 25 ms

 

--- 0xfffc03 fcping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 9/18/25 ms

上述信息表明,Switch A至Switch C路由可达。

(2)     验证Switch B

# 显示Switch B的VSAN 1的FC路由表。

[SwitchB] display fc routing-table vsan 1

Routing Table: VSAN 1

  Destinations : 6          Routes : 6

  Destination/mask   Protocol   Preference   Cost     Interface

  0x010000/8         FSPF       20           100      Vfc1

  0x030000/8         FSPF       20           100      Vfc2

  0xfffc01/24        DIRECT     0            0        InLoop0

  0xfffffa/24        DIRECT     0            0        InLoop0

  0xfffffc/24        DIRECT     0            0        InLoop0

  0xfffffd/24        DIRECT     0            0        InLoop0

上述信息表明,Switch B存在两条FSPF。

(3)     验证Switch C

# 显示Switch C的VSAN 1的FC路由表。

[SwitchC] display fc routing-table vsan 1

Routing Table: VSAN 1

  Destinations : 6          Routes : 6

  Destination/mask   Protocol   Preference   Cost     Interface

  0x010000/8         FSPF       20           100      Vfc3

  0x020000/8         FSPF       20           100      Vfc2

  0xfffc01/24        DIRECT     0            0        InLoop0

  0xfffffa/24        DIRECT     0            0        InLoop0

  0xfffffc/24        DIRECT     0            0        InLoop0

  0xfffffd/24        DIRECT     0            0        InLoop0

上述信息表明,Switch C存在两条FSPF。

1.6.7  配置文件

·     Switch A

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 priority 1

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

qos map-table dot1p-lp

 import 0 export 0

 import 2 export 0

 import 3 export 1

 import 4 export 0

 import 5 export 0

 import 6 export 0

 import 7 export 0

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

·     Switch B

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 domain-id 2 preferred

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

·     Switch C

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 domain-id 3 preferred

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

1.7  FC Zone典型配置举例

1.7.1  适用产品和版本

表5 配置适用的产品与软件版本关系

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.7.2  组网需求

图5所示,网络由两个交换机Switch A和Switch B、3个服务器Server和3个磁盘设备Disk组成。

现要求在Switch A和Switch B上配置FCoE功能,实现:

·     SAN网络中的存储数据流量能够在以太网链路上无损传输。

·     Server A不访问Disk,但以后有可能添加访问磁盘需求。

·     Server B能访问Disk A、Disk B、Disk C的数据。

·     Server C能访问Disk B、Disk C的数据。

·     Server之间不能相互访问。

图5 FC Zone示意图

 

1.7.3  配置思路

·     为了实现SAN网络中的存储数据流量能够在无损以太网链路上传输,H3C建议用户在交换机和服务器连接的以太网接口上需要配置DCBX、自动协商模式的PFC、ETS功能;在交换机和磁盘设备连接的以太网接口上需要配置DCBX、自动协商模式的PFC功能;在交换机与交换机连接的以太网接口上要强制开启PFC功能。配置DCBX、PFC、ETS功能请参考“二层技术-以太网交换配置指导”中的“LLDP”。

·     由于网络结构比较简单,建议用户采用静态方式建立Fabric网络。

·     为了能够对接入Fabric网络的Server及Disk(即N_Port)进行访问控制,可以将N_Port按照需求划分到3个不同的Zone中,分别为Zone1包括Server A,Zone2包括Server B、Disk A、Disk B、Disk C,Zone3包括Server C、Disk B 、Disk C。

·     由于Zone2和Zone3中存在相同的N_Port(Disk B和Disk C),为了简化Zone的配置,创建Zone别名Alias1包含Disk B和Disk C。

·     为了让Fabric网络中的各设备对N_Port的访问控制有一致的行为,需要通过命令在本地设备上指定Active Zone set,并向整个Fabric进行同步,使其在全网范围内保持一致。以创建Zone set Zoneset1包括Zone1、Zone2、Zone3并激活生效为例。

·     为了实现指定Active Zone set能够向整个Fabric进行同步,必须配置扩散类型和激活Zone set。由于仅划分了一个Zone set,且所N_Port均在Zone set Zoneset1内,所以扩散类型为完全扩散类型或非完全扩散均可。

1.7.4  配置步骤

1. 配置Switch A

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchA> system-view

[SwitchA] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchA] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchA] quit

# 重启设备。

<SwitchA> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/4允许VLAN 10的报文通过。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/2] quit

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/3] quit

[SwitchA] interface ten-gigabitethernet 1/0/4

[SwitchA-Ten-GigabitEthernet1/0/4] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/4] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/4] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchA] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchA] acl number 4000 name DCBX

[SwitchA-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchA-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchA] traffic classifier DCBX operator or

[SwitchA-classifier-DCBX] if-match acl 4000

[SwitchA-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchA] traffic behavior DCBX

[SwitchA-behavior-DCBX] remark dot1p 3

[SwitchA-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchA] qos policy DCBX

[SwitchA-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchA-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/2的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/2] qos apply policy DCBX outbound

[SwitchA-Ten-GigabitEthernet1/0/2] quit

# 在以太网接口Ten-GigabitEthernet1/0/3上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/3] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/3的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/3] qos apply policy DCBX outbound

[SwitchA-Ten-GigabitEthernet1/0/3] quit

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3上配置与服务器自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/2] quit

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/3] quit

# 在以太网接口Ten-GigabitEthernet1/0/4上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/4

[SwitchA-Ten-GigabitEthernet1/0/4] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/4] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/4] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/4] quit

(5)     ETS部署

# 配置802.1p优先级到本地优先级的映射,将802.1p优先级3映射到本地优先级1,配置其它的802.1p优先级映射到本地优先级0。

[SwitchA] qos map-table dot1p-lp

[SwitchA-maptbl-dot1p-lp] import 3 export 1

[SwitchA-maptbl-dot1p-lp] import 0 export 0

[SwitchA-maptbl-dot1p-lp] import 1 export 0

[SwitchA-maptbl-dot1p-lp] import 2 export 0

[SwitchA-maptbl-dot1p-lp] import 4 export 0

[SwitchA-maptbl-dot1p-lp] import 5 export 0

[SwitchA-maptbl-dot1p-lp] import 6 export 0

[SwitchA-maptbl-dot1p-lp] import 7 export 0

[SwitchA-maptbl-dot1p-lp] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/1上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/2上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] quit

# 在以太网接口Ten-GigabitEthernet1/0/3上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/3上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/3] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/3] quit

(6)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchA] fcoe-mode fcf

[SwitchA] vsan 1

[SwitchA-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchA-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为1。

[SwitchA-vsan1] domain-id 1 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchA-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] fc mode f

[SwitchA-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchA-Vfc1] port trunk vsan 1

[SwitchA-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在F模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] fc mode f

[SwitchA-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchA-Vfc2] port trunk vsan 1

[SwitchA-Vfc2] quit

# 创建VFC3接口,配置VFC3接口工作在F模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchA] interface vfc 3

[SwitchA-Vfc3] fc mode f

[SwitchA-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchA-Vfc3] port trunk vsan 1

[SwitchA-Vfc3] quit

# 创建VFC4接口,配置VFC4接口工作在E模式,将VFC4接口绑定到以太网接口Ten-GigabitEthernet1/0/4上,并将VFC4接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC4接口。

[SwitchA] interface vfc 4

[SwitchA-Vfc4] fc mode e

[SwitchA-Vfc4] bind interface ten-gigabitethernet 1/0/4

[SwitchA-Vfc4] port trunk vsan 1

[SwitchA-Vfc4] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchA] vlan 10

[SwitchA-vlan10] fcoe enable vsan 1

[SwitchA-vlan10] quit

2. 配置Switch B

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchB> system-view

[SwitchB] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchB] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchB] quit

# 重启设备。

<SwitchB> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchB> system-view

[SwitchB] vlan 10

[SwitchB-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/4允许VLAN 10的报文通过。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/2] quit

[SwitchB] interface ten-gigabitethernet 1/0/3

[SwitchB-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/3] quit

[SwitchB] interface ten-gigabitethernet 1/0/4

[SwitchB-Ten-GigabitEthernet1/0/4] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/4] port trunk permit vlan 10

[SwitchB-Ten-GigabitEthernet1/0/4] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchB] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchB] acl number 4000 name DCBX

[SwitchB-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchB-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchB-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchB] traffic classifier DCBX operator or

[SwitchB-classifier-DCBX] if-match acl 4000

[SwitchB-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchB] traffic behavior DCBX

[SwitchB-behavior-DCBX] remark dot1p 3

[SwitchB-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchB] qos policy DCBX

[SwitchB-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchB-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchB-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchB-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

[SwitchB-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] lldp enable

[SwitchB-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/2的出方向上应用QoS策略,向磁盘设备通告本交换机支持的DCBX能力。

[SwitchB-Ten-GigabitEthernet1/0/2] qos apply policy DCBX outbound

[SwitchB-Ten-GigabitEthernet1/0/2] quit

# 在以太网接口Ten-GigabitEthernet1/0/3上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchB] interface ten-gigabitethernet 1/0/3

[SwitchB-Ten-GigabitEthernet1/0/3] lldp enable

[SwitchB-Ten-GigabitEthernet1/0/3] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略,向磁盘设备通告本交换机支持的DCBX能力。

[SwitchB-Ten-GigabitEthernet1/0/3] qos apply policy DCBX outbound

[SwitchB-Ten-GigabitEthernet1/0/3] quit

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3上配置与磁盘设备自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB] interface ten-gigabitethernet 1/0/1

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchB-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/1] quit

[SwitchB] interface ten-gigabitethernet 1/0/2

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control auto

[SwitchB-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/2] quit

[SwitchB] interface ten-gigabitethernet 1/0/3

[SwitchB-Ten-GigabitEthernet1/0/3] priority-flow-control auto

[SwitchB-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/3] quit

# 在以太网接口Ten-GigabitEthernet1/0/4上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB] interface ten-gigabitethernet 1/0/4

[SwitchB-Ten-GigabitEthernet1/0/4] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/4] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/4] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/4] quit

(5)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图并关闭Fabric配置功能。

[SwitchB] fcoe-mode fcf

[SwitchB] vsan 1

[SwitchB-vsan1] undo domain configure enable

# 配置Fabric网络的名称。

[SwitchB-vsan1] fabric-name 11:11:11:11:11:11:11:11

# 配置域ID为2。

[SwitchB-vsan1] domain-id 2 static

Non-disruptive reconfiguration or isolating the switch may be performed. Continue? [Y/N]:y

[SwitchB-vsan1] quit

# 创建VFC1接口,配置VFC1接口工作在F模式,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchB] interface vfc 1

[SwitchB-Vfc1] fc mode f

[SwitchB-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchB-Vfc1] port trunk vsan 1

[SwitchB-Vfc1] quit

# 创建VFC2接口,配置VFC2接口工作在F模式,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchB] interface vfc 2

[SwitchB-Vfc2] fc mode f

[SwitchB-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchB-Vfc2] port trunk vsan 1

[SwitchB-Vfc2] quit

# 创建VFC3接口,配置VFC3接口工作在F模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchB] interface vfc 3

[SwitchB-Vfc3] fc mode f

[SwitchB-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchB-Vfc3] port trunk vsan 1

[SwitchB-Vfc3] quit

# 创建VFC4接口,配置VFC4接口工作在E模式,将VFC4接口绑定到以太网接口Ten-GigabitEthernet1/0/4上,并将VFC4接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC4接口。

[SwitchB] interface vfc 4

[SwitchB-Vfc4] fc mode e

[SwitchB-Vfc4] bind interface ten-gigabitethernet 1/0/4

[SwitchB-Vfc4] port trunk vsan 1

[SwitchB-Vfc4] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchB] vlan 10

[SwitchB-vlan10] fcoe enable vsan 1

[SwitchB-vlan10] quit

3. 配置FC Zone

Zone的相关配置仅需要在Fabric网络中任意一台设备上配置,以Switch A为例。

分别在Switch A和Switch B上使用display fc login命令查看Server A~Server C和Disk A~Disk C被分配的FC_ID。在本举例中,查看结果为Switch A为Server A、Server B、Server C分配的FC_ID分别为0x010000、0x010001、0x010002;Switch B为Disk A、Disk B、Disk C分配的FC_ID分别为0x020000、0x020001、0x020002。

 

# 创建Zone别名Alias1,添加FC_ID为020001、020002的两个成员,即Disk B和Disk C。

[SwitchA] vsan 1

[SwitchA-vsan1] zone-alias name Alias1

[SwitchA-vsan1-zone-alias-Alias1] member fcid 020001

[SwitchA-vsan1-zone-alias-Alias1] member fcid 020002

[SwitchA-vsan1-zone-alias-Alias1] quit

# 创建Zone1,添加FC_ID为010000的成员;创建Zone2,添加FC_ID为010001和020000、Zone别名为Alias1的成员;创建Zone3,添加FC_ID为010002、Zone别名为Alias1的成员。

[SwitchA-vsan1] zone name Zone1

[SwitchA-vsan1-zone-Zone1] member fcid 010000

[SwitchA-vsan1-zone-Zone1] quit

[SwitchA-vsan1] zone name Zone2

[SwitchA-vsan1-zone-Zone2] member fcid 010001

[SwitchA-vsan1-zone-Zone2] member fcid 020000

[SwitchA-vsan1-zone-Zone2] member zone-alias Alias1

[SwitchA-vsan1-zone-Zone2] quit

[SwitchA-vsan1] zone name Zone3

[SwitchA-vsan1-zone-Zone3] member fcid 010002

[SwitchA-vsan1-zone-Zone3] member zone-alias Alias1

[SwitchA-vsan1-zone-Zone3] quit

# 创建Zone set Zoneset1,添加Zone1、Zone2、Zone3为其成员。

[SwitchA-vsan1] zoneset name Zoneset1

[SwitchA-vsan1-zoneset-Zoneset1] member Zone1

[SwitchA-vsan1-zoneset-Zoneset1] member Zone2

[SwitchA-vsan1-zoneset-Zoneset1] member Zone3

[SwitchA-vsan1-zoneset-Zoneset1] quit

# 配置扩散和合并类型为完全扩散和完全合并,即携带完整数据库信息进行数据同步。

[SwitchA-vsan1] zoneset distribute full

# 激活Zone set并发起向全网的扩散过程。

[SwitchA-vsan1] zoneset activate name Zoneset1

1.7.5  验证配置

在Switch A和Switch B上通过显示命令都能够观察到Zone配置结果和数据同步结果。下面以Switch B上的显示为例。

# 查看VSAN 1内的Zone set相关信息。

[SwitchB] display zoneset vsan 1

VSAN 1:

  zoneset name Zoneset1

    zone name Zone1

      fcid 0x010000

    zone name Zone2

      fcid 0x010001

      fcid 0x020000

      zone-alias name Alias1

        fcid 0x020001

        fcid 0x020002

    zone name Zone3

      fcid 0x010002

      zone-alias name Alias1

        fcid 0x020001

        fcid 0x020002

上述信息表明,Switch A上所有Zone相关配置均完全同步到Switch B。

# 查看VSAN 1内Zone2的相关信息。

[SwitchB] display zone name Zone2 vsan 1

VSAN 1:

  zone name Zone2

    fcid 0x010001

    fcid 0x020000

    zone-alias name Alias1

      fcid 0x020001

      fcid 0x020002

# 查看所有Zone别名的相关信息。

[SwitchB] display zone-alias

VSAN 1:

  zone-alias name Alias1

    fcid 0x020001

    fcid 0x020002

# 查看FC地址类型成员020002所属于的Zone或Zone别名。

[SwitchB] display zone member fcid 020002

fcid 0x020002

  VSAN 1:

    zone-alias Alias1

      zone Zone2

      zone Zone3

# 查看VSAN 1内的Active Zone set相关信息。

[SwitchB] display zoneset active vsan 1

VSAN 1:

  zoneset name Zoneset1

    zone name Zone1

      *fcid 0x010000

    zone name Zone2

      *fcid 0x010001

      *fcid 0x020000

      *fcid 0x020001

      *fcid 0x020002

    zone name Zone3

      *fcid 0x010002

      *fcid 0x020001

      *fcid 0x020002

1.7.6  配置文件

·     Switch A

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 1 static

 undo domain configure enable

 zone-alias name Alias1

  member fcid 020001

  member fcid 020002

 zone name Zone1

  member fcid 010000

 zone name Zone2

  member zone-alias Alias1

  member fcid 010001

  member fcid 020000

 zone name Zone3

  member zone-alias Alias1

  member fcid 010002

 zoneset name Zoneset1

  member Zone1

  member Zone2

  member Zone3

 zoneset distribute full

 zoneset activate name Zoneset1

#

vlan 10

 fcoe enable vsan 1

#

qos map-table dot1p-lp

 import 0 export 0

 import 2 export 0

 import 3 export 1

 import 4 export 0

 import 5 export 0

 import 6 export 0

 import 7 export 0

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/4

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

interface Vfc4

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/4

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

·     Switch B

#

 fcoe-mode fcf

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 fabric-name 11:11:11:11:11:11:11:11

 domain-id 2 static

 undo domain configure enable

#

vlan 10

 fcoe enable vsan 1

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/4

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

interface Vfc4

 fc mode e

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/4

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

1.8  NPV典型配置举例

1.8.1  适用产品和版本

表6 配置适用的产品与软件版本关系

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.8.2  组网需求

图6所示,网络由边缘交换机Switch A、核心交换机Switch B和两个Server组成。

现要求在Switch A和Switch B上配置FCoE功能,实现:

·     SAN网络中的存储数据流量能够在以太网链路上无损传输。

·     扩充网络的规模,即为了满足对于直接连接节点设备的边缘交换机的大量需求,使边缘交换机可以突破一个FC SAN中239台最大交换机数目的限制。

·     Server能够通过Switch A访问Fabric网络的资源。

图6 NPV示意图

 

1.8.3  配置思路

·     为了实现SAN网络中的存储数据流量能够在无损以太网链路上传输,H3C建议用户在交换机和服务器连接的以太网接口上需要配置DCBX、自动协商模式的PFC、ETS功能;在交换机和磁盘设备连接的以太网接口上需要配置DCBX、自动协商模式的PFC功能;在交换机与交换机连接的以太网接口上要强制开启PFC功能。配置DCBX、PFC、ETS功能请参考“二层技术-以太网交换配置指导”中的“LLDP”。

·     为了扩充网络的规模,需要在节点设备与核心交换机之间加入边缘交换机,并将边缘交换机的FCoE模式配置为NPV模式。

·     为了能够实现Server能够访问Fabric网络的资源,需要配置允许默认Zone内的成员互相访问。

1.8.4  配置注意事项

配置NPV交换机时,需要配置和节点设备相连的接口为F模式,配置和核心交换机相连的接口为NP模式。

1.8.5  配置步骤

1. 配置Switch A

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchA> system-view

[SwitchA] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchA] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchA] quit

# 重启设备。

<SwitchA> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3允许VLAN 10的报文通过。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/2] quit

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchA-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

[SwitchA-Ten-GigabitEthernet1/0/3] quit

(3)     DCBX部署

# 全局开启LLDP功能。

[SwitchA] lldp global enable

# 创建编号为4000的二层ACL,并为其创建规则来匹配FCoE报文(协议号为0x8906)和FIP报文(协议号为0x8914)。

[SwitchA] acl number 4000 name DCBX

[SwitchA-acl-ethernetframe-4000] rule 0 permit type 8906 ffff

[SwitchA-acl-ethernetframe-4000] rule 5 permit type 8914 ffff

[SwitchA-acl-ethernetframe-4000] quit

# 定义名为DCBX的类,其下各规则间的关系为逻辑或,并定义其匹配ACL 4000。

[SwitchA] traffic classifier DCBX operator or

[SwitchA-classifier-DCBX] if-match acl 4000

[SwitchA-classifier-DCBX] quit

# 定义名为DCBX的流行为,并配置标记报文的802.1p优先级为3。

[SwitchA] traffic behavior DCBX

[SwitchA-behavior-DCBX] remark dot1p 3

[SwitchA-behavior-DCBX] quit

# 定义名为DCBX的QoS策略,为类DCBX指定采用的流行为是DCBX,并指定该策略为DCBX模式。

[SwitchA] qos policy DCBX

[SwitchA-qospolicy-DCBX] classifier DCBX behavior DCBX mode dcbx

[SwitchA-qospolicy-DCBX] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/1的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy DCBX outbound

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启LLDP功能,并允许该接口发送LLDP报文时携带DCBX TLV字段。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] lldp enable

[SwitchA-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv dcbx

# 在以太网接口Ten-GigabitEthernet1/0/2的出方向上应用QoS策略。

[SwitchA-Ten-GigabitEthernet1/0/2] qos apply policy DCBX outbound

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(4)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置与服务器自动协商是否开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/1] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/1] quit

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control auto

[SwitchA-Ten-GigabitEthernet1/0/2] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/2] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/2] quit

# 在以太网接口Ten-GigabitEthernet1/0/3上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchA] interface ten-gigabitethernet 1/0/3

[SwitchA-Ten-GigabitEthernet1/0/3] priority-flow-control enable

[SwitchA-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchA-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchA-Ten-GigabitEthernet1/0/3] quit

(5)     ETS部署

# 配置802.1p优先级到本地优先级的映射,将802.1p优先级3映射到本地优先级1,配置其它的802.1p优先级映射到本地优先级0。

[SwitchA] qos map-table dot1p-lp

[SwitchA-maptbl-dot1p-lp] import 3 export 1

[SwitchA-maptbl-dot1p-lp] import 0 export 0

[SwitchA-maptbl-dot1p-lp] import 1 export 0

[SwitchA-maptbl-dot1p-lp] import 2 export 0

[SwitchA-maptbl-dot1p-lp] import 4 export 0

[SwitchA-maptbl-dot1p-lp] import 5 export 0

[SwitchA-maptbl-dot1p-lp] import 6 export 0

[SwitchA-maptbl-dot1p-lp] import 7 export 0

[SwitchA-maptbl-dot1p-lp] quit

# 在以太网接口Ten-GigabitEthernet1/0/1上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/1上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/1] quit

# 在以太网接口Ten-GigabitEthernet1/0/2上开启并配置WRR队列,使FCoE流量和普通LAN流量各占50%带宽。

[SwitchA] interface ten-gigabitethernet 1/0/2

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr byte-count

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af1 group 1 byte-count 1

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr be group 1 byte-count 1

# 在以太网接口Ten-GigabitEthernet1/0/2上配置其它的队列为SP调度方式。

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af2 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af3 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr af4 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr ef group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr cs6 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr cs7 group sp

[SwitchA-Ten-GigabitEthernet1/0/2] quit

(6)     FCoE部署

# 配置FCoE模式为NPV模式,进入VSAN 1的视图。

[SwitchA] fcoe-mode npv

[SwitchA] vsan 1

[SwitchA-vsan1] quit

# 创建VFC1接口,将VFC1接口绑定到以太网接口Ten-GigabitEthernet1/0/1上,并将VFC1接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC1接口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] bind interface ten-gigabitethernet 1/0/1

[SwitchA-Vfc1] port trunk vsan 1

[SwitchA-Vfc1] quit

# 创建VFC2接口,将VFC2接口绑定到以太网接口Ten-GigabitEthernet1/0/2上,并将VFC2接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC2接口。

[SwitchA] interface vfc 2

[SwitchA-Vfc2] bind interface ten-gigabitethernet 1/0/2

[SwitchA-Vfc2] port trunk vsan 1

[SwitchA-Vfc2] quit

# 创建VFC3接口,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchA] interface vfc 3

[SwitchA-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchA-Vfc3] port trunk vsan 1

# 配置上行口。

[SwitchA-Vfc3] fc mode np

[SwitchA-Vfc3] quit

# 配置下行口。

[SwitchA] interface vfc 1

[SwitchA-Vfc1] fc mode f

[SwitchA-Vfc1] quit

[SwitchA] interface vfc 2

[SwitchA-Vfc2] fc mode f

[SwitchA-Vfc2] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchA] vlan 10

[SwitchA-vlan10] fcoe enable vsan 1

[SwitchA-vlan10] quit

2. 配置Switch B

(1)     开启高级模式

# 配置设备工作模式为高级模式(如果已经配置设备为高级模式此步骤可略)。

<SwitchB> system-view

[SwitchB] system-working-mode advance

Do you want to change the system working mode? [Y/N]:y

The system working mode is changed, please save the configuration and reboot the

 system to make it effective.

# 保持配置。

[SwitchB] save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

Slot 1:

Save next configuration file successfully.

[SwitchB] quit

# 重启设备。

<SwitchB> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to flash successfully.

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

(2)     VLAN和接口部署

# 创建VLAN 10。

<SwitchB> system-view

[SwitchB] vlan 10

[SwitchB-vlan10] quit

# 配置以太网接口Ten-GigabitEthernet1/0/3允许VLAN 10的报文通过。

[SwitchB] interface ten-gigabitethernet 1/0/3

[SwitchB-Ten-GigabitEthernet1/0/3] port link-type trunk

[SwitchB-Ten-GigabitEthernet1/0/3] port trunk permit vlan 10

(3)     PFC部署

# 在以太网接口Ten-GigabitEthernet1/0/3上配置强制开启PFC功能,且设置对802.1p优先级3开启PFC功能,并配置信任报文自带的802.1p优先级。

[SwitchB-Ten-GigabitEthernet1/0/3] priority-flow-control enable

[SwitchB-Ten-GigabitEthernet1/0/3] priority-flow-control no-drop dot1p 3

[SwitchB-Ten-GigabitEthernet1/0/3] qos trust dot1p

[SwitchB-Ten-GigabitEthernet1/0/3] quit

(4)     FCoE部署

# 配置FCoE模式为FCF模式,进入VSAN 1的视图。

[SwitchB] fcoe-mode fcf

[SwitchB] vsan 1

[SwitchB-vsan1] quit

# 创建VFC3接口,配置VFC3接口工作在F模式,将VFC3接口绑定到以太网接口Ten-GigabitEthernet1/0/3上,并将VFC3接口以Trunk方式加入VSAN 1,即允许VSAN 1的报文通过VFC3接口。

[SwitchB] interface vfc 3

[SwitchB-Vfc3] fc mode f

[SwitchB-Vfc3] bind interface ten-gigabitethernet 1/0/3

[SwitchB-Vfc3] port trunk vsan 1

[SwitchB-Vfc3] quit

# 开启VLAN 10的FCoE功能,并将其与VSAN 1进行映射。

[SwitchB] vlan 10

[SwitchB-vlan10] fcoe enable vsan 1

[SwitchB-vlan10] quit

# 进入VSAN 1的视图,配置允许默认Zone内的成员互相访问。

[SwitchB] vsan 1

[SwitchB-vsan1] zone default-zone permit

[SwitchB-vsan1] quit

1.8.6  验证配置

# 显示NPV交换机Switch A的下行口上连接的节点设备的Login信息和映射的上行口。

[SwitchA] display npv login

Server                                                                  External

Interface VSAN FCID     Port WWN                Node WWN                Interface

Vfc1      1    0x010001 21:00:00:00:c8:00:e4:30 20:00:00:00:c8:60:e4:9a Vfc3

Vfc2      1    0x010002 21:00:00:00:c9:00:e4:30 20:00:00:00:c9:60:e4:9a Vfc3

上述信息表明,Switch B在Fabric网络中的域ID为1,Switch B为两个Server分配的FC_ID分别为0x010001和0x010002。

# 显示NPV交换机Switch A的状态信息。

[SwitchA] display npv status

External Interfaces:

  Interface: Vfc3    VSAN tagging mode: Tagging

    VSAN  State  FCID

    1     Up     0x010000

 

  Number of External Interfaces: 1

 

Server Interfaces:

  Interface : Vfc1    VSAN tagging mode: Tagging

    VSAN  State

    1     Up

 

  Interface : Vfc2    VSAN tagging mode: Tagging

    VSAN  State

    1     Up

 

  Number of Server Interfaces: 2

上述信息表明,Switch B为Switch A的VFC3接口分配的FC_ID为0x010000;Switch A有1个上行接口,上行接口为VFC3,Switch A有两个下行接口,下行接口分别为VFC1和VFC2。

1.8.7  配置文件

·     Switch A

#

 fcoe-mode npv

#

 lldp global enable

#

 system-working-mode advance

#

vsan 1

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

qos map-table dot1p-lp

 import 0 export 0

 import 2 export 0

 import 3 export 1

 import 4 export 0

 import 5 export 0

 import 6 export 0

 import 7 export 0

#

traffic classifier DCBX operator or

 if-match acl 4000

#

traffic behavior DCBX

 remark dot1p 3

#

qos policy DCBX

 classifier DCBX behavior DCBX mode dcbx

#

interface Ten-GigabitEthernet1/0/1

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/2

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control auto

 priority-flow-control no-drop dot1p 3

 lldp tlv-enable dot1-tlv dcbx

 qos trust dot1p

 qos wrr af1 group 1 byte-count 1

 qos wrr af2 group sp

 qos wrr af3 group sp

 qos wrr af4 group sp

 qos wrr ef group sp

 qos wrr cs6 group sp

 qos wrr cs7 group sp

 qos apply policy DCBX outbound

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc1

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

interface Vfc2

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/2

#

interface Vfc3

 fc mode np

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/3

#

acl number 4000 name DCBX

 rule 0 permit type 8906 ffff

 rule 5 permit type 8914 ffff

#

·     Switch B

#

 fcoe-mode fcf

#

 system-working-mode advance

#

vsan 1

 zone default-zone permit

#

vlan 10

 fcoe enable vsan 1

#

interface Ten-GigabitEthernet1/0/3

 port link-type trunk

 port trunk permit vlan 1 10

 priority-flow-control enable

 priority-flow-control no-drop dot1p 3

 qos trust dot1p

#

interface Vfc3

 port trunk vsan 1

 bind interface Ten-GigabitEthernet1/0/1

#

 

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们