Here in the days of DHCP running on everything from cable modems to knock off cisco switches, what do you do when DHCP fails to assign an address to a large multi-user LAN?
Instead of having a stroke, you implement this script in Ubuntu to auto assign an ip address. As it was designed specifically for fact that the LTSP projects DHCP-3d can not assign multiple networks DHCP leases without physical adapters being present.
#take the start ip, make sure its less than end ip else add one
for (( ; $START < $END ; START += 1))
ping -c 1 -w 1 $NETWORK$START
if ping -c 1 -w 1 “$NETWORK$START” | grep “100% packet loss”
/sbin/ifconfig eth0:1 $NETWORK$START
/sbin/route add default gw $NETWORK$ROUTER eth0:1
/sbin/route del default gw 192.168.2.254