本文档介绍如何在 Cisco Nexus 交换机上配置和验证最大传输单元 (MTU)。
本文档没有任何特定的要求。
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
无论在什么平台上,所有第 3 层端口均按端口进行配置。
Nexus(config)#interface vlan 1
Nexus(config-if)#mtu 9216
Nexus(config)#interface ethernet 1/1
Nexus(config-if)#no switchport
Nexus(config-if)#mtu 9216
第2层MTU可通过网络服务质量(QoS)策略或端口本身的配置(在支持每端口MTU的交换机上)进行设置。 仅 Nexus 7000、9000 和某些 3000 型号支持每端口 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
Nexus 3000:包括 Nexus 3132Q-V、3164、31108、31128PQ、3200 系列和 36180YC-R 交换机
Neuxs 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
interface port-channel136
switchport mode fex-fabric
fex associate 136
vpc 136
mtu 9216
注意:Nexus 7000 不支持在版本 6.2 及更高版本中使用 FPC 设置 FEX MTU。相反,您必须创建自定义QoS策略作为下一个配置详细信息。
注意:修改当前正在使用的模板。要查找正在使用的当前模板,请运行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
policy-map type network-qos jumbo
class type network-qos class-default
mtu 9216
system qos
service-policy type network-qos jumbo
使用此部分可确认您的配置已正确设置。
思科 CLI 分析器(仅适用于注册客户)支持某些 show 命令。使用Cisco CLI分析器查看show命令输出的分析。
运行show interface eth x/y命令时,验证所有Nexus平台上的第3层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
通过运行show interface vlan X命令验证SVI MTU,如以下输出所示:
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。这些命令从父交换机运行。
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]
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)时,请运行show queueing interface ethernet x/x命令检查MTU值。运行7.0(3)I2(2a)及更高版本的Nexus 3000交换机按端口显示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
本部分提供的信息可用于对配置进行故障排除。
思科 CLI 分析器(仅适用于注册客户)支持某些 show 命令。使用Cisco CLI分析器查看show命令输出的分析。
有时,需要验证软件中发生的更改。为此,请检查以太网端口管理器(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两端均不匹配MTU时导致Type 1不一致(请谨慎配置)。
| 版本 | 发布日期 | 备注 |
|---|---|---|
5.0 |
06-Jul-2026
|
更新的拼写、语法、间距和MDF标记。 |
4.0 |
06-Mar-2024
|
在“网络QoS MTU配置”和“每端口MTU配置”中添加了注释。 |
3.0 |
13-Jul-2023
|
重新认证 |
2.0 |
21-Jun-2022
|
添加了有关如何配置系统巨型MTU的信息。已编辑标题。已删除断开的链接。为清楚起见,还进行了其他小修改。 |
1.0 |
11-Aug-2015
|
初始版本 |