本文件說明如何在 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交換機
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
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
使用本節內容,確認您的組態已正確設定。
Cisco CLI Analyzer(僅供已註冊客戶使用)支援某些 show 指令。使用Cisco CLI Analyzer檢視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
本節提供的資訊可供您用來疑難排解組態問題。
Cisco CLI Analyzer(僅供已註冊客戶使用)支援某些 show 指令。使用Cisco CLI Analyzer檢視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,則會導致第1類與VPC不一致(請謹慎配置)。
| 修訂 | 發佈日期 | 意見 |
|---|---|---|
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
|
初始版本 |