Here is my current network configuration :

wou@ubuntu15-10:~$ ifconfig -a
eno16777984 Link encap:Ethernet HWaddr 00:0c:29:d4:c3:f2
          inet addr:192.168.1.202 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed4:c3f2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:783 errors:2 dropped:52 overruns:0 frame:0
          TX packets:252 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:68817 (68.8 KB) TX bytes:31652 (31.6 KB)

eno33557248 Link encap:Ethernet HWaddr 00:0c:29:d4:c3:fc
          inet6 addr: fe80::20c:29ff:fed4:c3fc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:544 errors:1 dropped:41 overruns:0 frame:0
          TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42638 (42.6 KB) TX bytes:9766 (9.7 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:65536 Metric:1
          RX packets:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5920 (5.9 KB) TX bytes:5920 (5.9 KB)

vlan100   Link encap:Ethernet HWaddr 00:0c:29:d4:c3:fc
          inet addr:192.168.2.202 Bcast:192.168.2.255 Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed4:c3fc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:306 (306.0 B) TX bytes:928 (928.0 B)

I want to change the MTU size (to 9000) for the “vlan100” interface.

Logon as root :

wou@ubuntu15-10:~$ sudo bash
[sudo] password for wou:

root@ubuntu15-10:~# id
uid=0(root) gid=0(root) groups=0(root)

We don’t use the “network manager” utility :

root@ubuntu15-10:~# dpkg -l | grep network-manager
root@ubuntu15-10:~# apt-cache policy network-manager
network-manager:
 Installed: (none)
 Candidate: 1.0.4-0ubuntu5
 Version table:
 1.0.4-0ubuntu5 0
 500 http://ch.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages

Don’t try to change the MTU size on the VLAN interface first, it doesn’t work :

root@ubuntu15-10:~# ip link set vlan100 mtu 9000
RTNETLINK answers: Numerical result out of range

To enable Jumbo frames :

  • Enable Jumbo frames on the base interface :
root@ubuntu15-10:~# ip link set eno33557248 mtu 9000
  • Then, enable jumbo frames on the tagged interface :
root@ubuntu15-10:~# ip link set vlan100 mtu 9000

Display the MTU size :

root@ubuntu15-10:~# ip link show dev vlan100
4: vlan100@eno33557248: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default
    link/ether 00:0c:29:d4:c3:fc brd ff:ff:ff:ff:ff:ff

To get it permanent across reboot, just edit “/etc/network/interfaces” configuration file (we use “post-up” IFACE option) :

root@ubuntu15-10:~# perl -ne 'print unless 1.../secondary/' /etc/network/interfaces
auto eno33557248 eth0
iface eno33557248 inet manual

auto eno33557248 vlan100
iface vlan100 inet static
vlan-raw-device eno33557248
address 192.168.2.202
netmask 255.255.255.0
post-up ip link set eno33557248 mtu 9000
post-up ip link set vlan100 mtu 9000

We reboot to verify :

root@ubuntu15-10:~# shutdown -r now

And after this reboot …

root@ubuntu15-10:~# uptime
 15:56:23 up 1 min, 1 user, load average: 0.14, 0.06, 0.03

We still have jumbo frames enable :

root@ubuntu15-10:~# ip addr show dev vlan100
4: vlan100@eno33557248: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default
 link/ether 00:0c:29:d4:c3:fc brd ff:ff:ff:ff:ff:ff
 inet 192.168.2.202/24 brd 192.168.2.255 scope global vlan100
 valid_lft forever preferred_lft forever
 inet6 fe80::20c:29ff:fed4:c3fc/64 scope link
 valid_lft forever preferred_lft forever

Good, but does it really work ?

Launch this “ping” command to verify :

root@ubuntu15-10:~# ping -v -M do -s 8972 -c2 192.168.2.200
PING 192.168.2.200 (192.168.2.200) 8972(9000) bytes of data.
8980 bytes from 192.168.2.200: icmp_seq=1 ttl=64 time=0.586 ms
8980 bytes from 192.168.2.200: icmp_seq=2 ttl=64 time=0.430 ms
--- 192.168.2.200 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.430/0.508/0.586/0.078 ms

During this “ping” session, we collected a “tcpdump” trace :

root@ubuntu15-10:~# tcpdump -i eno33557248 -w /tmp/tcpdump.log

We analyze this trace using WireShark :

ubuntupingwireshark

 

 

 

PDF24    Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *


*