DHCP static mapping

Unanswered Question
Jun 24th, 2006

I've been playing with the DHCP server function provided by the IOS.

After some test I've run into this problem:

Setting up a pool = everything works

Setting up a static mapping = it works ONLY if I use the client-id command, but not the hardware-address.

The cisco device is a 3550 and the client is a windows xp laptop whom nic MAC address is: 0012.3f21.9b4d

Enabling Debug on the 3550 I get this:

02:46:21: DHCPD: DHCPREQUEST received from client 0100.123f.219b.4d.

Q1)If I use this number as client-identifer as mentioned above, it works fine! But why is the client-id 01+MAC?

Q2)According to the cisco site, I can use either network-address or client-idenfier.

Why if I use the network-address isn't working?

ip dhcp excluded-address 33.33.33.1 33.33.33.99

!

ip dhcp pool c1720

host 33.33.33.150 255.255.255.0

hardware-address 0012.3f21.9b4d

client-name d410

domain-name static.com

!

ip dhcp pool TEST

network 33.33.33.0 255.255.255.0

domain-name static.com

dns-server 33.33.33.1

default-router 33.33.33.1

!

no ip domain-lookup

ip dhcp-server 127.0.0.1

interface fastethernet 0/2

ip address 33.33.33.1 255.255.255.0

FULL DEBUG MESSAGES when I've configed the hardware-address. As you can see it's picking up the address from the generic pool rather than from the static mapping:

03:03:05: DHCP opt82: extract option 82.

03:03:05: DHCPD: DHCPDISCOVER received from client 0100.123f.219b.4d on interface FastEthernet0/2.

03:03:05: DHCPD: Sending DHCPOFFER to client 0100.123f.219b.4d (33.33.33.100).

03:03:05: DHCPD: creating ARP entry (33.33.33.100, 0012.3f21.9b4d).

03:03:05: DHCPD: unicasting BOOTREPLY to client 0012.3f21.9b4d (33.33.33.100).

03:03:05: DHCP opt82: extract option 82.

03:03:05: DHCPD: DHCPREQUEST received from client 0100.123f.219b.4d.

03:03:05: DHCPD: Sending DHCPACK to client 0100.123f.219b.4d (33.33.33.100).

03:03:05: DHCPD: creating ARP entry (33.33.33.100, 0012.3f21.9b4d).

03:03:05: DHCPD: unicasting BOOTREPLY to client 0012.3f21.9b4d (33.33.33.100).

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 4.3 (3 ratings)
bosalaza Sat, 06/24/2006 - 16:07

From what I found, the dhcp server will look at the client indentifier in the dhcp discover packet and use that, not the mac address. How do you know what the client identifier is? You have to either use a sniffer or turn on debugs on the dhcp server. Since you have doen the debug already then you already know what client-identifier to use. For example:

ip dhcp pool c1720

host 33.33.33.150 255.255.255.0

client-identifier 0100.123f.219b.4d

client-name d410

domain-name static.com

Try this and it should assign that host address to that device with mac-address 0012.3f21.9b4d. Why does it add the "01"? That I still have to look around. I found that in some cases too, that some devices uses a uses ASCII hex characters.

I you use an ascii hex to ascii symbol conversion chart you see the following.

There is a complete chart at

http://www.ascii.cl/index.htm

So, in some cases you will see a DHCP binding to some mac-address that looks like:

0063.6973.636f.2d61.6162.622e.6363.3030.2e30.3630.302d.4574

If you use the ascii symbol conversion above it will give you "nul c i s c o - - v l 1"

Please rate all posts.

bellocarico Sun, 06/25/2006 - 00:42

Thanks!

That really helps!

Regarding the 01, I've got an idea...

I think it is related to the "option 82".

If I'm not mistaken, this is the class paramenter.

The class is a new IOS addition (although it's an old RFC standard), and permits to assign different IPs based on the client classes (rather than client-id or mac address).

Refering to the doc CD there should be a *class* command in both global and dhcp poool config.

I've looked for it on all the router I've got (about 12) with different up2date IOS versions and I wasn't able to find it.

Could you please clarify the las part of your post?

From the example you've given

2e30.3630.302d.4574 is the mac address, but what's again the

0063.6973.636f.2d61.6162.622e.6363.3030 preceding?

Thanks!

bosalaza Sun, 06/25/2006 - 01:10

Some clients/hosts (I think like CE500 that is configured to get IP address through DHCP) send their client-identifier in ascii hexadecimal character and it would like as such:

0063.6973.636f.2d61.6162.622e.6363.3030.2e30.3630.302d.4574

If you use the ascii hex to ascii symbol conversion chart you see the following.

There is a complete chart at

http://www.ascii.cl/index.htm

you will find that

0063.6973.636f.2d30.3030.352e.3331.3365.2e39.6330.302d.566c.31

nul c i s c o - 0 0 0 5 . 3 1 3 e . 9 c 0 0 - v l 1

2e30.3630.302d.4574 is NOT the mac address.

bellocarico Sun, 06/25/2006 - 07:46

I was actually translating using the ASCII column, but of course I've got to use the HEX one instead.

Thanks!

ariela Tue, 06/27/2006 - 03:36

http://www.cisco.com/en/US/products/ps6441/products_configuration_guide_chapter09186a00805ecec2.html

"Specifies a hardware address for the client.

or

Specifies the unique identifier for Microsoft DHCP clients.

?Microsoft clients require client identifiers instead of hardware addresses. The unique identification of the client is specified in dotted hexadecimal notation, for example, 01b7.0813.8811.66, where 01 represents the Ethernet media type. "

hope this help

Andrea

Actions

Login or Register to take actions

This Discussion

Posted June 24, 2006 at 5:12 AM
Stats:
Replies:5 Avg. Rating:4.25
Views:1116 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard