Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 14368  / 3 Years ago, mon, august 23, 2021, 4:18:24

I'm running Ubuntu Server 12.04 LTS, and I want to override the MTU my cable company provides via DHCP. They provide an MTU of 576 and I want to use 1492. I can change it with ifconfig, but it won't persist across reboots. I tried to edit the file /etc/network/interfaces, but the setting gets ignored on the interface (the MTU setting works on the internal interface that uses a static IP address). How can I make the interface force an MTU of 1492 even when it is provided with an MTU via DHCP?


More From » networking

 Answers
7

Edit the interfaces file to set the mtu when the interface comes up:



$ sudo vi /etc/network/interfaces


Edit the file so it includes the post-up line:



iface eth0 inet dhcp
. . .
post-up /sbin/ifconfig eth0 mtu 1500

[#29240] Monday, August 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tusmuumu

Total Points: 195
Total Questions: 122
Total Answers: 104

Location: Oman
Member since Tue, Feb 7, 2023
1 Year ago
;