[Debian-uk] Ethernet bridge problem

Simon McVittie smcv at pseudorandom.co.uk
Thu, 5 Apr 2007 22:38:38 +0100


On Thu, 05 Apr 2007 at 21:13:01 +0100, James Cranwell-Ward wrote:
> so I cant assign a new address by DHCP that I can use to access the web
> front end. I need away to scan for the IP address in use when it is
> connected to my computer. I have already tried a ping utility that scans IP
> ranges, to scan the range used by the router for DHCP but with no luck. It
> could be any address with in the 255.255.255.0 subnet.

If it has a web interface, you could do something like:

for i in `seq 1 254`; do wget -t 1 -T 5 -O $i.out http://1.2.3.$i; done

(where 1.2.3.x is your subnet).

After a while you'll get 254 numbered files 1.out up to 254.out. Some of
them will be more than zero bytes long; those numbers are the last byte
of the IP address of all the hosts running a web server. Look through the
non-empty files for one that looks like it came from the bridge.

(I'm sure this solution could be optimized with a bit of thought.)

	Simon