tag 537271 +patch thanks Matthew Palmer wrote: > > the simple, 100% effective fix for the > > situation where your port has link up but the bridge port has not > > entered the forwarding state is to send ARP requests for the default > > gateway's IP address until they are answered. an IPv4 router must > > answer ARP requests or it cannot route packets. > > Emphasis on "IPv4" and "router", neither of which are required items.
then the fix would be made conditional on an IPv4 router being configured. > > > the improved DHCP configuration, whereby DHCP DISCOVER packets are > > > sent every second, is the best possible fix for this (coupled with the > > > ability to preseed whatever length of DHCP timeout you want). > > > > irrelevant for statically configured networks. i.e., servers. > > You are correct. I'm not exactly in a mood to fix this for you, though, so > patches welcome. 537271_busybox_arping.patch enables arping in the busybox udeb. 537271_netcfg_arping.patch modifies netcfg_detect_link() to wait invoke busybox's arping with the '-f' flag (quit on first ARP reply). waits up to 45 seconds for an ARP reply from the default gateway. (this should probably actually be a loop that repeatedly invokes arping with a short timeout in order to update the progress bar.) > severity 537271 wishlist > thanks > > I'd say that "for any bugs that are very difficult to fix due to major > design considerations" where the "major design consideration" is "STP > doesn't signal link availability" applies nicely here. yes, it would be very difficult to fix this if the proposed solution were to modify STP, a protocol baked into millions of switches... fortunately polling for layer 2/3 connectivity to the gateway is far easier. on cisco switches there is a per-port mode called "spanning-tree portfast", and on every cisco switch i've ever used this mode defaults to off. when you turn it on, a warning message like this is printed: Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to this interface when portfast is enabled, can cause temporary bridging loops. Use with CAUTION consequently it's frequently left off in many environments, so the usual sequence of events ends up going something like: * start up a preseeded installation on a new server. * installer fails when trying to download something. * realize the failure is due to portfast not being enabled. * call up the networking guy and get him to enable portfast on this server's switch port. * power cycle the server and start the preseeded installation again. -- Robert Edmonds edmo...@debian.org
diff -Npru busybox-1.17.1.orig/debian/config/pkg/udeb busybox-1.17.1/debian/config/pkg/udeb --- busybox-1.17.1.orig/debian/config/pkg/udeb 2010-11-09 05:37:10.000000000 -0500 +++ busybox-1.17.1/debian/config/pkg/udeb 2011-02-06 21:13:04.455899401 -0500 @@ -697,7 +697,7 @@ CONFIG_NC_EXTRA=y # CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_ARP is not set -# CONFIG_ARPING is not set +CONFIG_ARPING=y # CONFIG_BRCTL is not set # CONFIG_FEATURE_BRCTL_FANCY is not set # CONFIG_FEATURE_BRCTL_SHOW is not set
diff -Npru netcfg-1.60.orig/netcfg-common.c netcfg-1.60/netcfg-common.c --- netcfg-1.60.orig/netcfg-common.c 2011-02-05 20:42:06.000000000 -0500 +++ netcfg-1.60/netcfg-common.c 2011-02-06 21:44:10.611927865 -0500 @@ -1048,6 +1048,14 @@ int netcfg_detect_link(struct debconfcli break; } if (ethtool_lite (if_name) == 1) /* ethtool-lite's CONNECTED */ { + if (gateway.s_addr) { + char arping[256]; + char s_gateway[INET_ADDRSTRLEN]; + + inet_ntop (AF_INET, &gateway, s_gateway, sizeof(s_gateway)); + sprintf(arping, "arping -w 45 -f -I %s %s", if_name, s_gateway); + di_exec_shell_log(arping); + } debconf_progress_set(client, NETCFG_LINK_WAIT_TIME * 4); rv = 1; break;