cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2066
Views
5
Helpful
5
Replies

DHCP: An entry for all devices? (Client-Identifier or Hardware-Address)

pastorbadger
Level 1
Level 1

First, let me say that I am in way over my head here.  I have searched the darned heck out of this forum but one of three things happen: I try the suggested solution and it doesn't fix my problem; I can't implement the suggested solution for some reason; or I can't understand the suggestion.  So, here's my attempt at finding someone who can talk to me like I'm six...or a manager.  Thanks in advance.

 

The environment:  Three Cisco 891 wired routers; a few switches (dumb); and about thirty (wildly varied) end-devices. 

 

The goal: The ones that I'm really hung  up on, are the bank of docking stations.  They have their own NIC cards, and I want to give them static IP addresses.   That seemed easy.

 

The problem: The clients have docking stations that run Linux, Windows, and anything else they find laying around.  I have zero control over the client laptops, other than they have to physically fit in the docking stations.  If I do this:

 

ip dhcp pool olympic
host 10.22.120.49 255.255.255.0
client-identifier 015c.260a.41f8.12

 

Then it works for most of the Windows folks, and if I do this:

 

ip dhcp pool municipal
host 10.22.120.49 255.255.255.0
hardware-address 5c26.0a41.f812

 

It works for the Linux folks. 

 

Now, since my home router (Cisco RV180) only asks for a MAC ID and an IP address and it works for everything, then (even) I can deduce that this must be somehow possible.  My hurdle is, how do you tell Cisco IOS to do it! 

 

I've read a bunch of posts here, and a lot of the problems are solved by doing <something> to the client machine.  I could set the LAN printers and IP cameras to fixed addresses and exclude them, but that wouldn't fix my docking stations.  I want to DHCP everything except the office PC's and the WiFi'd tablets.  I've tried reading rfc2131 and, once I regained consciousness from my head exploding, I figured out that it had something to do with a BOOTP message and the chaddr.  Over my head (like, Sputnik over my head). 

 

To my boss, I'm quoting Captain America from The Avengers : "It seems to run on some form of electricity."  Which pleases him, because he accuses me of usually quoting from Monty Python.  (And I actually have quoted Samantha Carter to him. But that's a post for a different forum.)

 

Can anyone help me?  Oh, and please speak s-l-o-w-l-y.  

 

1 Accepted Solution

Accepted Solutions

Ben Walters
Level 3
Level 3

Alright enough about the why of it all, lets go through the how.

 

You need to add client "pools" using the set of commands you mentioned earlier, however in the one you use the hardware-address and in another you use the client-identifier, you need to use both for each docking station to account for any type of client, since they can send different identifiers when requesting a DHCP address.

 

ip dhcp pool municipal
host 10.22.120.49 255.255.255.0
hardware-address 5c26.0a41.f812

!

ip dhcp pool municipal2
host 10.22.120.50 255.255.255.0

client-identifier 015c.260a.41f8.12

 

This is because some clients (windows) send the client identifier in the request, and some won't (Linux) so the DHCP service needs to be able to read both types of requests, so basically you are assigning 2 addresses to each dock depending on how the device requests a DHCP address.

 

View solution in original post

5 Replies 5

Ben Walters
Level 3
Level 3

I have to ask, what are you trying to achieve here?

 

Are you trying to make it so that if any device connects to a docking station that docking station will always give the laptop connected to it the same address? If so, why?

 

In my experience docking stations are dumb devices that don't actually connect by themselves to a network. Something has to be connected for the port to function. Essentially when the laptop is disconnected it is like there is nothing connected to that port on the router/switch.  

 

Also, when that device is connected to the dock it uses it's own MAC address to connect, not the MAC address of the dock so if you could possibly have 30 devices connected to any dock, each dock could have one of 30 different MAC addresses, not one static MAC address on the dock itself.

 

If I were you I would just treat the docks like any other end user machine and give out DHCP to whatever device connects to it, unless you want to just give everything a static address.

Absolutely no offense intended, but I always hated it when I asked dad where the hammer was, and he would ask "why do you want to know?"  lol  So, suppressing my urge to say "because I want to know where the **bleep** hammer is, all right!?", I will answer as intelligently as I can.

 

These docking stations have their own nic cards in them.  When a user connects his laptop to "Station 1" in "room 1", he always has the same MAC address.  But, it's not just about the docking stations... There a mish-mash of other crap.  Cameras, some of which are able to set their own IP, and some which can't.  But the software (local, proprietary) insists on using IP only, so they've go to be fixed IP.  A couple of QNAP NAS's, which can set fixed IPs, but it's just one more interface to learn.

 

The easiest way to do this (thus explaining why my predecessor did it this way) is to simply tell the DHCP server who everyone is.  Works great on a Cisco RV180.  Just hand him a list of MACs and he passes them out the IP's like candy.  (The side bonus: when some loose cannon hooks up a PlayStation in his office, he draws from the IP pool and works fine but instantly outs himself.)

 

So, they've got new routers (Cisco 891f) and switch (Cisco 4560x) and they're ready to do some upgradin'.  And I got tapped because I speak basic IOS. (I know "en" and "conf t", and then I start flapping pages in the manual.)

 

So that's the "why":  Because that's what they want, and the checks cash.

What's the "how"??? There must me an entry that recognized all of their hardware, because the stupid little home router they live behind now is doing it 100% right.  There's got be a DHCP entry that will recognize a Windows, Linux, IoTs, NAS, tablet, TV, etc., etc. MAC ID and be able to assign the IP.  

 

What I've found on this forum and on YouTube has been aimed at the right target, but I can't seem to find the bulls-eye.  (In the end, I still just want to know where the damned hammer is.)

Ben Walters
Level 3
Level 3

Alright enough about the why of it all, lets go through the how.

 

You need to add client "pools" using the set of commands you mentioned earlier, however in the one you use the hardware-address and in another you use the client-identifier, you need to use both for each docking station to account for any type of client, since they can send different identifiers when requesting a DHCP address.

 

ip dhcp pool municipal
host 10.22.120.49 255.255.255.0
hardware-address 5c26.0a41.f812

!

ip dhcp pool municipal2
host 10.22.120.50 255.255.255.0

client-identifier 015c.260a.41f8.12

 

This is because some clients (windows) send the client identifier in the request, and some won't (Linux) so the DHCP service needs to be able to read both types of requests, so basically you are assigning 2 addresses to each dock depending on how the device requests a DHCP address.

 

Bless you, Ben!  THAT's the spark of ingenuity I wasn't getting from the manual and my own caffeine-addled brain.  I was trying to add a hardware address AND a client identifier in the same IP, and just got stuck on that specific detail.  

 

I will have to peel the IP stickers off of the stations (or change them to "x.x.x.7 or 8").  But the range will get them the permission they need at the other end.  Perfect.

 

There are plenty of addresses to go around on the subnet, and two for each docking station is completely palatable.  I'll still be able to group them all in a batch.  Thank you for the excellent work-around. 

 

P.S.  I do still wonder how the "stupid" RV180 router manages to get one MAC to got to the same IP no matter what, though.  But I can live with an intellectual curiosity, though.  lol

 

Ooh!! Ooh!!  I'm really showing my ignorance here...but these docking stations don't interact with each other nor anything else behind that router.  Is it possible to use NAT to manually change each stations two potential IP's manually to one IP on the other side?

 

Don't answer.  That's something I should research for myself.  I come here only when I'm thoroughly stumped.  But the idea has got me excited.  I could actually get back to exactly the current setup.

 

Review Cisco Networking for a $25 gift card