Simulating DHCPDISCOVER

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Wed Dec 6 17:18:08 UTC 2006


fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org writes:

> Hi,
> 
> Does anyone know of a way to determine IP address of DHCP server on a
> subnet without running a dhcp client and without running a portscan?
> 
> Basically, I'd like to broadcast a DHCPDISCOVER packet like a real DHCP
> client does and see who replies.  I tried netcat but (unsurprisingly
> didn't have success.

This isn't excatly the answer you're looking for but if you look at
/etc/dhcp3/dhclient-script [1], you'll see this script takes care of the
complete configuration of the interface and sets up the routing. This
implies that dhclient is a light weight program that talks the DHCP
protocol, delegating interface configuration, routing, etc. to scripts.  By
running dhclient with a different script, config, etc. (which you can
specify on the command line), you may be able to do what you want.

If you take this approach, let me know if it works out.

[1] This is on Ubuntu 6.10 but I imagine Debian Sarge/Etch would be
similar.

-- 
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>                                  starnix inc.
647.722.5301                                      toronto, ontario, canada
http://www.starnix.com              professional linux services & products
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list