gigabit
01-10-2009, 20:43
Oh right then fair enough, Ive never used Debian before
#!/bin/sh if [ "$#" -ne "4" ]; then echo Usage: echo " $0 interface ip range netmask" echo " examples:" echo " 1) Assuming you want to bind the IP range 192.168.0.1..192.168.0.254 to eth0 with netmask 255.255.255.0:" echo " $0 eth0 192.168.0. 1..254 255.255.255.0" echo " 2) Assuming you want to bind the IPv6 range 2001:41d0:1:5000::1-2001:41d0:1:5000::254 to eth0 with netmask /$ echo " $0 eth0 2001:41d0:1:5000:: 1..254 56" else echo "Attempting to assign the IP range $2($3) to interface $1 with netmask $4" for ip in $(eval echo "{$3}"); do ifconfig -v $1 add $2$ip netmask $4; done fi