All of lore.kernel.org
 help / color / mirror / Atom feed
* ip=dhcp woes
@ 2016-07-28 11:26 Uwe Kleine-König
  2016-07-29  9:30 ` [PATCH 0/3] net: ipconfig: improve DHCP timeout handling Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2016-07-28 11:26 UTC (permalink / raw)
  To: netdev; +Cc: kernel

Hello,

I have a machine with four network interfaces and I'm using ip=dhcp
during development on it.

in ic_dynamic the procedure is the following (assuming no successful
reply is received in time):

  timeout = 2s + random([0, 1]) s
loop:
  send bootp on 1st dev
  wait 1s
  send bootp on 2nd dev
  wait 1s
  send bootp on 3rd dev
  wait 1s
  send bootp on 4th dev
  wait timeout
  timeout = timeout * 4 / 7
  goto loop;

My problem now is: The dhcp server is reachable via the first device and
takes little more than 1s to respond. A reply must match the last sent
request to be accepted.

So the obvious questions are:

Why is only the last timeout increased for each loop? Why is there a
difference at all between the waits which results in a special casing of
the last device?

Alternatively, why not accept a reply on eth0 when eth1 has already sent
a request? Then the procedure could be:

  timeout = 2s + random([0, 1]) s
loop:
  send bootp on 1st dev
  send bootp on 2nd dev
  send bootp on 3rd dev
  send bootp on 4th dev
  wait timeout
  timeout = timeout * 4 / 7
  goto loop;

which looks more effective.

Is there anything I missed?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-29  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 11:26 ip=dhcp woes Uwe Kleine-König
2016-07-29  9:30 ` [PATCH 0/3] net: ipconfig: improve DHCP timeout handling Uwe Kleine-König
2016-07-29  9:30   ` [PATCH 1/3] net: ipconfig: Add device name to debug messages Uwe Kleine-König
2016-07-29  9:30   ` [PATCH 2/3] net: ipconfig: Support using "delayed" DHCP replies Uwe Kleine-König
2016-07-29  9:30   ` [PATCH 3/3] net: ipconfig: drop inter-device timeout Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.