DHCP client tool

P

Peter Lohmeier

Hi NG,

want to test DHCP responses ...

Do you mean, it is possible to send a DHCP request with Active State
Perl under W2k ??

And if so, would it be possible to set a special MAC Address also ??

Thanks

..pl
 
J

James Willmore

On 29 Oct 2003 05:32:35 -0800
want to test DHCP responses ...

Do you mean, it is possible to send a DHCP request with Active State
Perl under W2k ??

Not sure. Try using 'ppm' to 'search' for a DHCP module.
And if so, would it be possible to set a special MAC Address also ??

Huh? That's a very difficult task to perform. The MAC address is a
hardware address. So, you _could_ use different NIC's to change the
MAC address - but that's not practical :)

I'm thinking that you _could_ do it in Perl, but it's a very difficult
task.

What is it you're trying to test?

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
The light at the end of the tunnel is the headlight of an
<approaching train.
 
P

Peter Lohmeier

James Willmore said:
On 29 Oct 2003 05:32:35 -0800


Not sure. Try using 'ppm' to 'search' for a DHCP module.

I found one in the news.

----------------------------
From: "nudnav" <[email protected]>
Newsgroups: comp.lang.perl.modules
Subject: ANNOUNCE: Net-DHCP-Packet v0.1
Lines: 137
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Message-ID: <[email protected]>
Date: Sat, 15 Dec 2001 16:10:46 GMT
NNTP-Posting-Host: 213.224.170.139
X-Complaints-To: (e-mail address removed)
X-Trace: afrodite.telenet-ops.be 1008432646 213.224.170.139 (Sat, 15
Dec 2001 17:10:46 MET)
NNTP-Posting-Date: Sat, 15 Dec 2001 17:10:46 MET
Organization: Telenet Internet


The uploaded file
Net-DHCP-Packet-0.1.tar.gz
has entered CPAN as
file: $CPAN/authors/id/F/FV/FVANDUN/Net-DHCP-Packet-0.1.tar.gz
size: 5661 bytes
----------------------------

But I'm not shure wether it works with my Active State Perl
Answer to "perl -v" is
"This is perl, version 5.005_03 built for MSWin32-x86-object ......."

Huh? That's a very difficult task to perform. The MAC address is a
hardware address. So, you _could_ use different NIC's to change the
MAC address - but that's not practical :)

I'm thinking that you _could_ do it in Perl, but it's a very difficult
task.

What is it you're trying to test?

Simply I want to prove whether a DHCP request for a specific Client PC
- and that isn't actually my PC - gets the right answer from the
Server.
Therefore I have to fake the MAC Address of the Client.

… But if I think about that … obviously the answer to that request
would get lost, because although my scanning PC has a different MAC
than the client to fake it would never listen to the answer, right ??

In that case I have to change to the promiscuous mode of a ‘sniffer'
with perl and filter the right packets for the faked client. That
might be the main problem. :-/

May perl be mighty to do that ??

..pl
 
J

James Willmore

I found one in the news.

Good :)

Simply I want to prove whether a DHCP request for a specific Client PC
- and that isn't actually my PC - gets the right answer from the
Server.
Therefore I have to fake the MAC Address of the Client.

And, to further complicate an already complicated task, if you're on a
switch, the MAC address becomes even more critical. This is because a
switch _cares_ about the MAC address - versus a hub, which listens and
sends _everything_ on the same subnet. Read on ...
? But if I think about that ? obviously the answer to that request
would get lost, because although my scanning PC has a different MAC
than the client to fake it would never listen to the answer, right ??

If you're trying to test DHCP requests, the MAC address only comes
into play _after_ getting a lease. Before that, the DHCP server (at
least, most of them) don't care about MAC addresses. It's only
important _after_ getting the lease. Then the DHCP server is going to
marry the IP's and MAC's together. Before that, it doesn't care about
what MAC addresses are out there - only the ones with leases.
In that case I have to change to the promiscuous mode of a ?sniffer'
with perl and filter the right packets for the faked client. That
might be the main problem. :-/

Well, depending upon the issue you're having, you may just want to
skip writting something in Perl and just snif the line :) Not real
sure _why_ you want to fake a client. No offense, but this sounds a
lot like a "man in the middle" type situation you're trying to set up.
May perl be mighty to do that ??

I'm thinking yes (minus the MAC address mileu).

HTH

Jim
(jwillmore _at_ adelphia _dot_ net)
 
B

Ben Morrow

But I'm not shure wether it works with my Active State Perl
Answer to "perl -v" is
"This is perl, version 5.005_03 built for MSWin32-x86-object
......."

That's very old... are you unable to upgrade for some reason?

Ben
 
P

Peter Lohmeier

Ben Morrow said:
That's very old... are you unable to upgrade for some reason?

Ben

Ok. On other PC I get:

c:\work-prl>perl -v

This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

But actually I don't use perl with linux, and I have no experience to
work with CPAN Modules.
And there is absolutely no hint to DHCP in the installed folders.
..pl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top