I created an enhancement for arping (all patches against baselayout 1.12.0_pre19-r2) to use also MAC address - if specified. It works like this: gateways_eth0=( "192.168.0.1[01:23:45:67:89:AB]" ) config_192168000001_0123456789AB=( "192.168.0.200/24" ) xxx_192168000001_0123456789AB=( ... ) The MAC address is converted to uppercase and colons are removed. MAC address is optional and if ommited, the original behaviour is back - if the MAC is not specified, the variable_AAABBBCCCDDD is used as usual. Both configurations (with and without MAC) can be mixed in one gateways_NET variable. *** There is also another enhancement: to wait some time, before the actual arping is started. I found it useful for me, because when I started arping immediately, there was no response (switch problem). But after some time, the network started to send reply - verified in Ethereal. It can be activated by arping_eth0="wait" to wait 5 (default) seconds, or arping_eth0="wait=10" to wait specified number of seconds, or arping="wait" to wait on all interfaces using arping Currently the arping wait is not needed, if you use DHCP for configuration and arping as a fallback - the DHCP will wait the same time as the arping would wait. So this is an option for the user, if he uses arping directly and needs some wait timeout. *** Possible enhancements: * Cache already received MAC addresses for pinged IPs * More fail-safe MAC recognition, not only *:*:*:*:*:*
Created attachment 87428 [details, diff] MAC address recognition patch
Created attachment 87429 [details, diff] Wait for some time patch This should be applied after the MAC address patch.
I like the look of this - very nice. We're in the process of stabalising 1.12 at the present so I'll address this shortly after 1.12 is stable on all arches. Probably not going to apply the wait patch as the user can always do this preup() { # Sleep for 5 seconds so that the switch can respond to my arping [[ ${IFACE} == "eth1" ]] && sleep 5 }
Created attachment 87970 [details, diff] Alternative patch OK, I've been playing around with this patch, basically taking your idea and refining it a little. Here's a patch that combines both the above patches. Different variable setup though - I think this is cleaner. gateways_lan="192.168.0.1,00:11:22:AA:BB:CC" arping_sleep_lan=5 Thoughts?
Created attachment 87982 [details, diff] Alternative patch New patch - fixes a few bugs with my last one and also allows the arping wait time to be changed from the default 3 seconds.
Fixed in baselayout-1.12.1