# [SOLVED] getting DHCP lease when server requests MTU change

## amk

Have strange problem with new install of gentoo amd64 in LenovoW510 laptop.

Using dhcpcd  5.2.10-r2, e1000e in 2.6.36-tuxonice-r3, everything works fine

until I attach to a network where DHCP server requests updated MTU.

Once dhcpcd tries to update MTU, carrier is lost momentarily and the

DHCP ACK does not arrive, leading to new DHCP request and no IP address

acquired.

ifconfig eth0 mtu 1430 (value requested by dhcp server) before starting interface

eth0 prevents the change and allows the lease to get accepted.

I know there is option to ignore dhcp option to set MTU but I do not want

to use that as the server has a reason to lower it.

On all other networks including wireless dhcpcd works fine for me, but they

do not ask clients to change MTU.

I am not sure about the root cause and way to address or report this issue.

Is carrier flap upon mtu change an issue with kernel, driver or dhcpcd?

The last one could eventually fix it when allowing a flap upon programming

the interface parameter? I have googled for dhcpcd issues but did not find

anything current and relevant. But it could be also that the flap is unique

to this (Intel) NIC hardware.

On all other networks including wireless dhcpcd works fine. I did not try

other dhcp clients. Initially I wanted to deploy networkmanager but this failed

for me as it cannot pass TKIP to wpa_supplicant.

```

Mar 20 16:23:00 hrk2 kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX

Mar 20 16:23:00 hrk2 kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO

Mar 20 16:23:00 hrk2 dhcpcd[8271]: eth0: carrier acquired

Mar 20 16:23:00 hrk2 dhcpcd[8271]: eth0: rebinding lease of x.x.5.26

Mar 20 16:23:04 hrk2 dhcpcd[8271]: eth0: acknowledged x.x.5.26 from x.x.6.79

Mar 20 16:23:04 hrk2 dhcpcd[8271]: eth0: checking for x.x.5.26

Mar 20 16:23:07 hrk2 ntpd[3869]: sendto(206.209.110.2) (fd=22): Invalid argument

Mar 20 16:23:09 hrk2 dhcpcd[8271]: eth0: leased x.x.5.26 for 3543 seconds

Mar 20 16:23:09 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1500 to 1430

Mar 20 16:23:09 hrk2 dhcpcd: eth0: MTU set to 1430

Mar 20 16:23:09 hrk2 rc-scripts: status:  stopped

Mar 20 16:23:09 hrk2 dhcpcd[8271]: eth0: carrier lost

Mar 20 16:23:09 hrk2 dhcpcd: eth0: MTU restored to 1500

Mar 20 16:23:09 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1430 to 1500

Mar 20 16:23:09 hrk2 rc-scripts: status:  stopped

Mar 20 16:23:11 hrk2 kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX

Mar 20 16:23:11 hrk2 kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO

Mar 20 16:23:11 hrk2 dhcpcd[8271]: eth0: carrier acquired

Mar 20 16:23:11 hrk2 dhcpcd[8271]: eth0: rebinding lease of x.x.5.26

Mar 20 16:23:16 hrk2 dhcpcd[8271]: eth0: acknowledged x.x.5.26 from x.x.6.79

Mar 20 16:23:16 hrk2 dhcpcd[8271]: eth0: checking for x.x.5.26

Mar 20 16:23:20 hrk2 dhcpcd[8271]: eth0: leased x.x.5.26 for 3531 seconds

Mar 20 16:23:20 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1500 to 1430

Mar 20 16:23:20 hrk2 dhcpcd: eth0: MTU set to 1430

Mar 20 16:23:20 hrk2 rc-scripts: status:  stopped

Mar 20 16:23:20 hrk2 dhcpcd[8271]: eth0: carrier lost

Mar 20 16:23:20 hrk2 dhcpcd: eth0: MTU restored to 1500

Mar 20 16:23:20 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1430 to 1500

Mar 20 16:23:20 hrk2 ntpd[3869]: sendto(173.193.227.67) (fd=22): Invalid argument

Mar 20 16:23:20 hrk2 rc-scripts: status:  stopped

Mar 20 16:23:22 hrk2 kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX

Mar 20 16:23:22 hrk2 kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO

Mar 20 16:23:22 hrk2 dhcpcd[8271]: eth0: carrier acquired

Mar 20 16:23:22 hrk2 dhcpcd[8271]: eth0: rebinding lease of x.x.5.26

Mar 20 16:23:25 hrk2 dhcpcd[8271]: eth0: acknowledged x.x.5.26 from x.x.6.79

Mar 20 16:23:25 hrk2 dhcpcd[8271]: eth0: checking for x.x.5.26

Mar 20 16:23:30 hrk2 dhcpcd[8271]: eth0: leased x.x.5.26 for 3522 seconds

Mar 20 16:23:30 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1500 to 1430

Mar 20 16:23:30 hrk2 dhcpcd: eth0: MTU set to 1430

Mar 20 16:23:30 hrk2 rc-scripts: status:  stopped

Mar 20 16:23:30 hrk2 dhcpcd[8271]: eth0: carrier lost

Mar 20 16:23:30 hrk2 dhcpcd: eth0: MTU restored to 1500

Mar 20 16:23:30 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1430 to 1500

Mar 20 16:23:30 hrk2 rc-scripts: status:  stopped

Mar 20 16:23:32 hrk2 kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX

Mar 20 16:23:32 hrk2 kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO

Mar 20 16:23:32 hrk2 dhcpcd[8271]: eth0: carrier acquired

Mar 20 16:23:32 hrk2 dhcpcd[8271]: eth0: rebinding lease of x.x.5.26

Mar 20 16:23:35 hrk2 dhcpcd[8271]: eth0: acknowledged x.x.5.26 from x.x.6.79

Mar 20 16:23:35 hrk2 dhcpcd[8271]: eth0: checking for x.x.5.26

```

No working lease. Shutdown interface and change MTU manually:

```

Mar 20 16:23:37 hrk2 sudo:      amk : TTY=pts/16 ; PWD=/home/amk ; USER=root ; COMMAND=/etc/init.d/net.eth0 stop

Mar 20 16:23:37 hrk2 sudo: pam_unix(sudo:session): session opened for user root by amk(uid=0)

Mar 20 16:23:37 hrk2 dhcpcd[13694]: sending signal 1 to pid 8271

Mar 20 16:23:37 hrk2 dhcpcd[13694]: waiting for pid 8271 to exit

Mar 20 16:23:37 hrk2 dhcpcd[8271]: received SIGHUP, releasing

Mar 20 16:23:37 hrk2 dhcpcd[8271]: eth0: removing interface

Mar 20 16:23:49 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1500 to 1430

Mar 20 16:23:51 hrk2 sudo:      amk : TTY=pts/16 ; PWD=/home/amk ; USER=root ; COMMAND=/etc/init.d/net.eth0 start

Mar 20 16:23:51 hrk2 sudo: pam_unix(sudo:session): session opened for user root by amk(uid=0)

Mar 20 16:23:51 hrk2 kernel: e1000e 0000:00:19.0: irq 47 for MSI/MSI-X

Mar 20 16:23:51 hrk2 kernel: e1000e 0000:00:19.0: irq 47 for MSI/MSI-X

Mar 20 16:23:51 hrk2 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready

Mar 20 16:23:51 hrk2 dhcpcd[14266]: version 5.2.10 starting

Mar 20 16:23:51 hrk2 dhcpcd[14266]: eth0: waiting for carrier

Mar 20 16:23:53 hrk2 kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX

Mar 20 16:23:53 hrk2 kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO

Mar 20 16:23:53 hrk2 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Mar 20 16:23:53 hrk2 dhcpcd[14266]: eth0: carrier acquired

Mar 20 16:23:53 hrk2 dhcpcd[14266]: eth0: broadcasting for a lease

Mar 20 16:23:57 hrk2 dhcpcd[14266]: eth0: offered x.x.5.26 from x.x.6.79

Mar 20 16:23:57 hrk2 dhcpcd[14266]: eth0: ignoring offer of x.x.5.26 from x.x.6.79

Mar 20 16:23:57 hrk2 dhcpcd[14266]: eth0: acknowledged x.x.5.26 from x.x.6.79

Mar 20 16:23:57 hrk2 dhcpcd[14266]: eth0: checking for x.x.5.26

Mar 20 16:24:02 hrk2 dhcpcd[14266]: eth0: leased x.x.5.26 for 3490 seconds

Mar 20 16:24:02 hrk2 dhcpcd: eth0: MTU set to 1430

Mar 20 16:24:02 hrk2 rc-scripts: status:  stopped

Mar 20 16:24:02 hrk2 dhcpcd[14266]: forked to background, child pid 14407

```

Lease working.Last edited by amk on Tue Apr 26, 2011 3:23 pm; edited 1 time in total

----------

## UberLord

Your driver is at fault here.

You can do several things, assuming you cannot change the driver or the interface hardware.

1) Disable MTU in dhcpcd.conf, which you have said you don't want to do

2) Disable carrier support in dhcpcd.conf by using the nolink command for the interface with this problem

----------

## amk

Hi UberLord,

Only today I arrived back to the specific network to test the change suggested.

nolink in /etc/dhcpcd made the lease working:

```
Apr 26 17:12:07 hrk2 kernel: e1000e 0000:00:19.0: eth0: changing MTU from 1500 to 1430

Apr 26 17:12:07 hrk2 dhcpcd: eth0: MTU set to 1430

Apr 26 17:12:07 hrk2 rc-scripts: status:  stopped

Apr 26 17:12:07 hrk2 dhcpcd[18298]: forked to background, child pid 18416

Apr 26 17:12:09 hrk2 kernel: eth0: no IPv6 routers present

Apr 26 17:12:09 hrk2 kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
```

So far I did not notice problem with this setting in other networks,

I do not change cable between networks while booted.

But in case it is needed, this can be removed easily and applied in this network only.

Thanks a lot for help.

----------

