cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
915
Views
2
Helpful
12
Replies

How to Show/view/see a MAC reservation

Josh732532
Level 1
Level 1

Please no pedantic responses, I don't care if my wording/terminology is correct or not, all I want is 1 command that will let me see the hardware-address attached to a reservation pool, when I type:

sh ip dhcp pool <poolname>

I don't get the hardware address as you would naturally expect, probably the only relevant information other than the IP address. This is so much simpler in Microsoft DHCP but nevermind, instead I get all this:

Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 1
Leased addresses : 1
Excluded addresses : 1
Pending event : none
0 subnet is currently in the pool :
Current index IP | address range | Leased/Excluded/Total
10.0.0.100    10.0.0.100 - 10.0.0.100  1/1/1

Please just tell me a command to show the mac address, I know it might be preceeded by '01', again don't care about that I can figure all that out, just need the command.

1 Accepted Solution

Accepted Solutions

Richard Pidcock
Level 1
Level 1

Within IOS you can issue "show run | section dhcp pool "pool-name" and that will show you the hardware address defined in your running configurationSWITCH#sh run | section dhcp pool <pool-name>

SWITCH#sh run | section dhcp pool <pool-name>
ip dhcp pool pool-name
host 192.168.x.x 255.255.255.192
client-identifier 0112.3456.7890.AB
default-router 192.168.x.1
domain-name domain.name
dns-server dns1 dns2
!

Is that what you're looking for, or are you wanting more of an operational view?  A "show ip dhcp binding <IP-ADDRESS>" command will show you the hardware address but won't necessarily reference the defined DHCP pool.  HTH

Richard W. Pidcock

View solution in original post

12 Replies 12

Richard Pidcock
Level 1
Level 1

What system are you working on?  What IOS version?  Can you just issue a "show ip arp" or "show ip arp <ip_address>".  The output from those commands will give you the hardware address.  

 

Richard W. Pidcock

Joseph W. Doherty
Hall of Fame
Hall of Fame

Sorry, unclear what you asking for.

Maybe "show ip DHCP binding"?

If not, perhaps you could post the MS DHCP command and it's output.

Well, a pretty common network function is an IP reservation, so that your dhcp server doesn't give out your static addresses to other devices. But with Cisco it is insanely difficult to do this simple task, you have to create a DHCP pool of 1 single address and bind a mac address to that pool, e.g.:

ip dhcp pool CLIENT_10
hardware-address aabb.ccdd.eeff
host 192.168.1.10 255.255.255.0

But after you create this pool-reservation, there is seemingly no way to read the "hardware-address" value that you inputted in to create it. In MS DHCP it's as simple as right-clicking the reservation, then properties:

https://i.imgur.com/qDH0Cb2.png

Richard Pidcock
Level 1
Level 1

Within IOS you can issue "show run | section dhcp pool "pool-name" and that will show you the hardware address defined in your running configurationSWITCH#sh run | section dhcp pool <pool-name>

SWITCH#sh run | section dhcp pool <pool-name>
ip dhcp pool pool-name
host 192.168.x.x 255.255.255.192
client-identifier 0112.3456.7890.AB
default-router 192.168.x.1
domain-name domain.name
dns-server dns1 dns2
!

Is that what you're looking for, or are you wanting more of an operational view?  A "show ip dhcp binding <IP-ADDRESS>" command will show you the hardware address but won't necessarily reference the defined DHCP pool.  HTH

Richard W. Pidcock

Ah, I was just responding to @Josh732532 reply to mine, when I noticed @Richard Pidcock's reply, which uses about the same approach.  One minor difference, I was going to suggest possibly using "include" rather than "section" hoping its RegEx might be able to show just the data.  (NB don't have, at the moment, a IOS to experiment with.)

BTW @Josh732532 , just as you didn't want pedantic responses, your constant bashing Cisco's approach vs. MS's, just is wasted "filler" to resolving your query.  If you want to bash Cisco, I suggest posting an issue just on that.

sh run | section, that will be really helpful thanks, Cisco really need to make a GUI though. I heard there was a program called CNA, which quickly got retired, why can't we have nice things?

". . . why can't we have nice things?"

Laugh, we do have some nice things.  "Nice", like beauty, is in the eye of the beholder.

Professional network engineers, often prefer using a CLI, as you often can get much more done in less time.

Beginners or non-professionals, like the training wheels aspect of GUIs.

Since the Cisco product line encompasses customers from home users to the largest commercial and/or government networks, Cisco also sometimes provides different UI options.  GUIs are pretty commonly offered on their bottom end devices.

Lol "Network Engineers" and "less time" in the same sentence, isn't that an oxymoron? If you don't recognise that cisco configs are an unstructured, unneccesary mess then you are not an IT professional.

Hello @Josh732532 ,

>> If you don't recognise that cisco configs are an unstructured, unneccesary mess then you are not an IT professional.

the text configuration of devices is now just a front end for human operators behind the scenes a structured hierarchical approach is used by using models and rendering the models with XML or JSON format.

This is the basis for model based network automation. 

But guess it , there is not a single model that fits all needs.

API accesses this model derived objcects within the device.

So for example some models and approach are used for streaming telemetry based on OpenConfig models .

Other models are used for configuration and monitoring of devices based on XML or JSON over netconf or restconf .

So some attempts have been done to move to more structured approaches but there is still need of network engineers ( so I hope )

Hope to help

Giuseppe

 

"Lol "Network Engineers" and "less time" in the same sentence, isn't that an oxymoron?"

Not, I believe, as I used those terms in the sentence I did.

However, possibly any professional often seems to take longer than a non professional believes is necessary.  Much of a professional's extra time may be consumed by thinking something through before just doing something, the goal being to avoid making mistakes that an amateur wouldn't know to avoid.

As to your comments that a Cisco config appears to be an unstructured unnecessary mess, they're not quite as bad as you imply, but, possibly they could be better.

Simple thing you might do, is define a high level structure, supporting all IOS's features along with a way to generate actual IOS configuration statements.  Basically, much as high structured languages generate (messy and unstructured) machine code.  Should be easy, correct?  ; )

Possibly you're overlooking two aspects of technical progress.

First, how best something might be done is considerably more difficult to determine than looking back after it has been and determining it could be better done.

Second, something that has been done, and works okay, often has inertia against change, unless the change is really, really better.

Consider, for example, the "qwerty" keyboard layout is still in common use, even though it was, I understand, designed to slow typing!

It's not just how quickly you can apply a config. Most struggles in networking come from having to decipher what someone else has put in. I know people who can write code 1000x faster than me, but I can actually debug it faster than they can because it's such a painful process without a good UI. This is the issue with cisco, yes, 1 person will know the system inside and out because they implemented it from scratch, but as mentioned above, "there is not a single model that fits all needs" - introducing the UI. A location-based interface which allows for logical tree structures with physically different locations (rather than the same single line in a CLI over and over again), which allow intuition and spacial memory to actually speed up IT, the same reason every other area of IT has moved to UIs over CLI. The only reason Cisco has managed to avoid a UI until now is because 90% of the changes in the back-end are integrated into new versions of the same functions, allowing for lazy config migrations, when you try to either decipher someone else's config or re-learn cisco from scratch you will realise how insanely unintuitive it is and how poor the documentation is.

BTW, I'm not arguing a CLI is always better than a UI, because most definitely, it's not.  Conversely, though, if you are arguing a UI is always better than a CLI, I disagree.

For something like Cisco's IOS CLI configurations, it came into existence for some technology reason that no longer apply, but as wrote in my prior reply, it still works.  Second, there's some times a UI has trouble representing high levels of complexity.  Even your model of using logical tree structures doesn't cleanly represent many to many relationships.

Over the years, Cisco has provided some non-CLI interfaces for device configuration, still does, especially in low end simple networks, but even on some of those devices, for some advanced configurations options you need to drop into the CLI.

Again, I believe you're overlooking providing a UI to make it all simple to configure advanced features, isn't simple, and even if possible, the benefits of such a UI (which I agree there would be some) probably don't outweigh the perceived cost of providing such.

Lastly, technology can negate improvements along some line because something much, much better comes along.

In my prior example of keyboard layouts, might the advances in computers understanding spoken language sort of negate the need to worrying whether the keyboard layout is the best possible?

For Cisco configurations, might AI advances negate the need for either a CLI or UI and logical tree structures?

BTW, what other network vendor's, top of the line Enterprise or Service Provider devices have what you would consider an ideal UI for device configuration management?

Review Cisco Networking for a $25 gift card