Before performing a dhcp request, /etc/netstart explicitly takes the
interface down. As noted (by me) at g2k14, and also at work, this results
in a significant delay in getting the address.

I'm not all into enterprise switch magic, but someone hinted that this
could come from the switch reinitializing the port, with all kinds of
spanning-tree magic etc involved.

Looking at the history of pre-dhclient ' down' in /etc/netstart
(introduced in -r1.43, 18 Sep 1998 18:42:10), I cannot see a reason
for keeping it.

This cuts 'sh /etc/netstart' time from ~minute to ~nothing at work.

OK?

/Alexander


Index: netstart
===================================================================
RCS file: /cvs/src/etc/netstart,v
retrieving revision 1.141
diff -u -p -r1.141 netstart
--- netstart    12 Jul 2014 14:39:31 -0000      1.141
+++ netstart    26 Sep 2014 05:32:22 -0000
@@ -63,7 +63,7 @@ ifstart() {
                        [ "$name" = "NONE" ] && name=
                        [ "$mask" = "NONE" ] && mask=
                        [ "$bcaddr" = "NONE" ] && bcaddr=
-                       cmd="ifconfig $if $name $mask $bcaddr $ext1 $ext2 down"
+                       cmd="ifconfig $if $name $mask $bcaddr $ext1 $ext2"
                        cmd="$cmd;dhclient $if"
                        dhcpif="$dhcpif $if"
                        ;;


Reply via email to