现在的位置: 首页 > 综合 > 正文

how to config Jumbo Frame in RHEL

2019年03月12日 ⁄ 综合 ⁄ 共 2512字 ⁄ 字号 评论关闭

文/一觉亮天

 

Enabling Jumbo Frame is changing MTU from 1500 to 9000.

 

We can use ping or ifconfig to get MTU. The default MTU of RHEL is 1500. From the follow ping and ifconfig commands, we can get kvm interface’s MTU is
1500.

 

[root@server4 network-scripts]# ping -I kvm 199.18.10.2 -s 1472

PING 199.18.10.2 (199.18.10.2) from 199.18.9.51 kvm: 1472(1500)
bytes of data.

1480 bytes from 199.18.10.2: icmp_seq=1 ttl=255 time=0.134 ms

1480 bytes from 199.18.10.2: icmp_seq=2 ttl=255 time=0.134 ms

 

[root@server4 network-scripts]# ping -I kvm 199.18.10.2 -s 1473

PING 199.18.10.2 (199.18.10.2) from 199.18.9.51 kvm: 1473(1501) bytes
of data.

--- 199.18.10.2 ping statistics ---

3 packets transmitted, 0 received, 100% packet loss, time 2000ms

 

[root@server4 network-scripts]# ifconfig kvm

kvm   
Link encap:Ethernet  HWaddr 1B:B1:FG:05:59:A8 

         
inet addr:199.18.9.51  Bcast:199.18.11.255 
Mask:255.255.252.0

         
UP BROADCAST RUNNING MULTICAST  MTU:1500 
Metric:1

         
RX packets:246964 errors:0 dropped:0 overruns:0 frame:0

         
TX packets:679680 errors:0 dropped:0 overruns:0 carrier:0

         
collisions:0 txqueuelen:0

         
RX bytes:27066478 (25.8 MiB)  TX bytes:981727393 (936.2 MiB)

 

 

kvm interface is a bridge. We cannot change MTU of a bridge, and we must config MTU on NIC. In our example, kvm bridges with eth2, so we can change MTU
of eth2.

 

Add an entry in config file /etc/sysconfig/network-scripts/ifcfg-eth2. The entry is a key and value pair. The key is MTU and the value is 9000. Refer to
follow config file content.

 

[root@server4 network-scripts]# cat ifcfg-eth2 

DEVICE=eth2

ONBOOT=yes

BOOTPROTO=none

HWADDR=1B:B1:FG:05:59:A8

MTU=9000

 

After the config, run follow command to make the config functions.

 

[root@server4 network-scripts]# 
service network restart

 

You can check result via follow command.

 

 

[root@server4 network-scripts]# ifconfig eth2 

eth2     
Link encap:Ethernet  HWaddr 1B:B1:FG:05:59:A8 

         
UP BROADCAST RUNNING MULTICAST  MTU:9000 
Metric:1

         
RX packets:18 errors:0 dropped:0 overruns:0 frame:0

         
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

         
collisions:0 txqueuelen:1000

         
RX bytes:2188 (2.1 KiB)  TX bytes:300 (300.0 b)

         
Interrupt:170 Memory:f8800000-f8ffffff

 

 

[root@server4 network-scripts]# ifconfig kvm

kvm   
Link encap:Ethernet  HWaddr 1B:B1:FG:05:59:A8 

         
inet addr:199.18.9.51  Bcast:199.18.11.255 
Mask:255.255.252.0

         
UP BROADCAST RUNNING MULTICAST  MTU:9000 
Metric:1

         
RX packets:89 errors:0 dropped:0 overruns:0 frame:0

         
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

         
collisions:0 txqueuelen:0

         
RX bytes:6798 (6.6 KiB)  TX bytes:252 (252.0 b)

 

Reference

http://www.itsyourip.com/redhat/how-to-set-mtu-size-for-a-network-interface-in-redhat-enterprise-linuxrhel/

 

 

抱歉!评论已关闭.