Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

DHCP config: assign fixed IP to one device while assigning others from a pool

This is IOS 15.1(4)M3 on a 1921 router. The LAN is 192.168.42.1/24. (DHCP config is further down.)

We have a small range that we want to assign via DHCP to devices; .200 through .220 . At the same time, we have a handful of Macintosh systems to which we want to assign a specific address that is not in that 200-220 range. I don't want to configure the assignment based on the Ethernet MAC addresses because these systems might connect via UTP or wireless; that is to say, they have more than one MAC address. They only ever connect using one interface/MAC address at a time, but it's their choice; in some areas wi-fi is available, and in some areas they have to cable-up.

The Mac OSX network settings has a field for "DHCP Client ID". It would be much easier to tell the users of these systems to put their Mac's name in the Client ID field for both their wired and wireless DHCP configs. (As opposed to having them all lookup, and then give me their Ethernet MAC addresses for both of their interfaces.)

Screen Shot 2012-06-20 at 10.21.41 AM.png

I tried this with my Mac's (named "shrike") wi-fi interface, but I don't get the 192.168.42.14 address that I expected. I get an address from the .200 to .220 range.

Here's the DHCP-related config from the router:

router#sh run | s dhcp

ip dhcp excluded-address 192.168.42.1 192.168.42.199

ip dhcp excluded-address 192.168.42.221 192.168.42.254

ip dhcp pool OurOffice

network 192.168.42.0 255.255.255.0

default-router 192.168.42.3

dns-server 192.168.42.108

ip dhcp pool static-shrike

host 192.168.42.14 255.255.255.0

client-name shrike

router#

Is "client-name" the wrong place to configure the DHCP Client ID? ...or am I doing something else wrong?

Everyone's tags (2)
3 REPLIES

Re: DHCP config: assign fixed IP to one device while assigning o

Craig,

Try changing the client-name to client-identifier and use the mac address associated to the workstation that you want to statically assign. You'll also want to put all of your other information in that pool though like dns, default gw, etc.

HTH,

John

HTH, John *** Please rate all useful posts ***
New Member

Re: DHCP config: assign fixed IP to one device while assigning o

...I specifically don't want to have to code the MAC ethernet addresses in the router's config.

My goal is to configure in the router something fixed -- like a persons name, or a name/label for their Mac. Then they just use that to ensure they get "their" IP address. Then I only have to manage add/remove of people (very rare.) rather than add/remove of physical devices (these are mac laptops) and people get new ones a lot. And each Mac has two (wifi and wired) mac addresses.

New Member

Re: DHCP config: assign fixed IP to one device while assigning o

I opened a TAC case and they figured this out in short order. I'm typing it up here for posterity.

1) The field in the Mac network config pane labeled "DHCP Client ID"

It is correctly passed in the DHCP DISCOVERY packet in the Client-ID option. If you set it to "bob" and sniff the packet you'll see "Client-ID Option 61, length 3: "bob" (captured via tcpdump.)

2) The "client-identifier" configuration command in IOS

IOS (ref version info in first msg!) compares against the discovery packet literally. The packet's option value is hex encoded. So it's not

client-identifier bob  (wrong!)

but instead ('b' is 62 in base16, 'o' is 6F):

client-identifier 00626F62

2560
Views
1
Helpful
3
Replies