简介
本文档介绍如何在 Cisco Nexus 交换机上配置和验证最大传输单元 (MTU)。
先决条件
要求
本文档没有任何特定的要求。
使用的组件
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
配置
第 3 层 MTU 配置
无论在什么平台上,所有第 3 层端口均按端口进行配置。
在交换虚拟接口 (SVI) 上配置 MTU
Nexus(config)#interface vlan 1
Nexus(config-if)#mtu 9216
在第 3 层端口上配置 MTU
Nexus(config)#interface ethernet 1/1
Nexus(config-if)#no switchport
Nexus(config-if)#mtu 9216
第 2 层 MTU 配置
第2层MTU可通过网络服务质量(QoS)策略或端口本身的配置(在支持每端口MTU的交换机上)进行设置。
仅 Nexus 7000、9000 和某些 3000 型号支持每端口 MTU。
网络 QoS MTU 配置
Nexus 3000:包括Nexus 3048、3064、3132Q、3132Q-X、3132Q-XL、3172和3500系列交换机
Nexus 5000:所有Nexus 5000和5500系列交换机
Nexus 6000:所有Nexus 6000系列交换机
要在这些交换机上配置提升的MTU,请创建策 network-qos 略,或修改已经存在的策略,以指定提升的MTU。此配置适用于所有端口。这包括连接到交换机的所有思科交换矩阵扩展器 (FEX) 端口。
注意:请勿使用network-qos策略来配置每个端口的MTU。这些策略不支持每端口MTU配置。
policy-map type network-qos jumbo
class type network-qos class-default
mtu 9216
system qos
service-policy type network-qos jumbo
每端口 MTU 配置
Nexus 3000:包括Nexus 3132Q-V、3164、31108、31128PQ、3200系列和36180YC-R交换机
Nexus 7000:所有Nexus 7000和7700系列交换机
Nexus 9000:所有Nexus 9200系列交换机(包括92xxx)、9300系列交换机(包括93xxx)和9500系列交换机
注意:使用每端口MTU配置L2端口的平台只能使用交换机或1500上的系统巨型MTU配置。
默认情况下,系统巨型MTU为9216。配置有巨型MTU的L2端口如果发生更改,会自动更新为新值。
Nexus# show running-config all | i jumbomtu
system jumbomtu 9216
Nexus(config)# system jumbomtu ?
<1500-9216> Enter jumbomtu
要按端口配置 MTU,需执行以下配置:
Nexus(config)#interface ethernet 1/1
Nexus(config-if)#mtu 9216
如果输入无效值,则会返回错误:
Nexus(config-if)# mtu 9000
ERROR: MTU can only be default or system jumbo MTU
Nexus 2000 配置
注意:Nexus 2000 MTU通过父交换机上的巨型帧配置进行设置。对于允许按端口设置巨型帧的父交换机,配置 FEX 交换矩阵端口通道 (FPC)。如果父交换机需要 network-qos policy, then jumbo is set with the QoS policy configuration of the parent switch. These changes are automatically pushed down to the FEX in both cases.
每端口交换矩阵端口通道 (FPC) 配置(在父 Nexus 交换机上配置)
interface port-channel136
switchport mode fex-fabric
fex associate 136
vpc 136
mtu 9216
注意:Nexus 7000不允许您在6.2版及更高版本中使用FPC设置FEX MTU。您必须改为创建自定义 QoS 策略,如下一个配置中所示。
Nexus 7000 / FEX 巨型帧配置(仅适用于版本 6.2 及更高版本)
注意:修改当前使用的模板。要查找正在使用的当前模板,请输入命 show policy-map system type network-qos 令。
7K(conf)#class-map type network-qos match-any c-nq-8e-custom
7K(config-cmap-nqos)#match cos 0-7
7K(config)#policy-map type network-qos nq-8e-custom template 8e
7K(config-pmap-nqos)#class type network-qos c-nq-8e-custom
7K(config-pmap-nqos-c)#congestion-control tail-drop
7K(config-pmap-nqos-c)#mtu 9216
7K(config)#system qos
7K(config-sys-qos)#service-policy type network-qos nq-8e-custom
网络 QoS 策略配置(在父 Nexus 交换机上配置)
policy-map type network-qos jumbo
class type network-qos class-default
mtu 9216
system qos
service-policy type network-qos jumbo
验证
使用本部分可确认配置能否正常运行。
Cisco CLI Analyzer(仅限注册客户)支持某些命 show 令。使用Cisco CLI分析器查看命令输出的 show 分析。
第 3 层 MTU
使用命令验证所有Nexus平台上的第3 show interface eth x/y 层MTU,如以下示例所示:
Nexus# show interface ethernet 1/19
Ethernet1/19 is up
Dedicated Interface
Hardware: 100/1000/10000 Ethernet, address: 547f.ee5d.413c (bia 547f.ee5d.40fa)
MTU 9216 bytes, BW 1000000 Kbit, DLY 10 usec
使用命令验证SVI MTU, show interface vlan X 如以下输出所示:
Nexus# show interface vlan 1
Vlan1 is down (Non-routable VDC mode), line protocol is down
Hardware is EtherSVI, address is 547f.eed8.ec7c
Internet Address is 192.168.10.10/24
MTU 9216 bytes, BW 1000000 Kbit, DLY 10 usec
第 2 层 MTU
本节介绍如何基于每个平台验证第 2 层 MTU。这些命令从父交换机中运行。
验证使用网络 QoS 的交换机上的 MTU
Nexus# show queuing interface ethernet 1/1
Ethernet1/1 queuing information:
TX Queuing
qos-group sched-type oper-bandwidth
0 WRR 100
RX Queuing
qos-group 0
q-size: 469760, HW MTU: 9216 (9216 configured)
-- or --
Nexus# show queuing interface ethernet 1/1
slot 1
=======
HW MTU of Ethernet1/1 : 9216 bytes
Egress Queuing for Ethernet1/1 [System]
验证支持每端口 MTU 的交换机上的 MTU
Nexus# show interface ethernet 1/12
Ethernet1/12 is up
admin state is up, Dedicated Interface
Hardware: 1000/10000 Ethernet, address: 7c0e.ceca.f183 (bia 7c0e.ceca.f183)
MTU 9216 bytes, BW 10000000 Kbit, DLY 10 usec
注意:当Nexus 3000的代码早于7.0(3)I2(2a)时,请使用命令检查MTU show queueing interface ethernet x/x 值。运行 7.0(3)I2(2a) 及更高版本的 Nexus 3000 交换机将按端口显示 MTU 大小。
Nexus 2000
注意:当您更改FEX MTU时,FEX会将其的MTU提高到一个较高但预先确定的数量,该数量与配置的值不完全匹配。父设备在 FEX 交换矩阵端口通道 (FPC) 上实施已配置的 MTU。
对于连接到 Nexus 5000、6000 和 7000 的 FEX:
Nexus# show queuing interface ethernet 136/1/1
if_slot 68, ifidx 0x1f870000
Ethernet136/1/1 queuing information:
Input buffer allocation:
Qos-group: 0
frh: 3
drop-type: drop
cos: 0 1 2 3 4 5 6 7
xon xoff buffer-size
---------+---------+-----------
19200 78080 90880
Queueing:
queue qos-group cos priority bandwidth mtu
--------+------------+--------------------+---------+----------------+--------
3 0 0 1 2 3 4 5 6 WRR 100 9280
对于连接到 Nexus 9000 的 FEX:
9K# show interface ethernet 104/1/1
Ethernet104/1/1 is up
admin state is up,
Hardware: 100/1000 Ethernet, address: 5475.d0e0.e5c2 (bia 5475.d0e0.e5c2)
MTU 9216 bytes, BW 1000000 Kbit, DLY 10 usec
故障排除
本部分提供了可用于对配置进行故障排除的信息。
Cisco CLI Analyzer(仅限注册客户)支持某些命 show 令。使用Cisco CLI分析器查看命令输出的 show 分析。
注意:使用debug命令之前,请参阅有关Debug命令的重要信息。
有时,需要验证软件中发生的更改。要执行此操作,请检查以太网端口管理器 (ethpm),以验证是否已通过任何平台上的软件推送更改:
Switch#show system internal ethpm info interface eth 6/5 | egrep -i mtu
medium(broadcast), snmp trap(on), MTU(4000)
在 M1、M2、F1 和 F2 模块上,也可以在硬件中验证是否已向下推送更改:
module-1#show hardware internal mac port 20 state | i MTU
GD: Port speed Undecided GD MTU 10240 (fixed to max), PL MTU 9238 mode 0
或者,您也可以查看线卡上的 QoS 配置:
module-1# show hardware internal mac port 33 qos configuration | beg mtu vl hw_mtu pm_mtu pm_adj qos_mtu qos_adj last_mtu 0 9238 9728 22 9216 22 9216
影响
如果链路上的MTU不匹配,则可能会影响具有路由邻接关系的路由接口,并导致VPC出现第1类不一致的情况,如果VPC的两端均不匹配MTU。请谨慎配置。
已知缺陷
思科漏洞 ID CSCuf20035 - (Nexus 7000) FEX MTU 更改对 FEX 队列无效。