Cisco – DHCP static
First some news, I finally passed my CCNP Switch exam.. Happy days!
next up is the CCNP Route… glad I’m doing a course on that one..
But as a network nerd, I’m still improving my home network, and lately I’ve moved more away from my beloved PFSense box.
My Cisco 2960S that makes up the core of my network right now, is now taking a big roll in my Network. After enabling ip routing, I also had to add dhcp support for my little switch.. But hey, static dhcp binding ain’t that easy I guess.. well you can make a dedicated pool for every one of your static mappings, but that’s a big hazel.. here is my quick fix after searching the web for a while.
!Reserved the first 50 addressess
ip dhcp excluded-address 192.168.0.1 192.168.0.50
!Setup my pool for LAN
ip dhcp pool LAN
network 192.168.0.0 255.255.255.0
!Setup my static pool for LAN
ip dhcp pool static
origin file flash://static-map
And the content of my flash://static-map file
*time* Sep 28 2013 11:10 AM
!IP address Type Hardware address Lease expiration
192.168.0.5 /25 id xxxx.yyyy.zzzz.KK Infinite
192.168.0.6 /25 id xxxx.yyyy.zzzz.KK Infinite
And here is the catch, you can’t use the mac address, you need the ID…
But if you let the machine/device get a normal dhcp ip, you can find the id by running
#sh ip dhcp binding
Clear it, with the ip x.x.x.x
#clear ip dhcp binding x.x.x.x
And today’s tip, use tftp to transfer the file.. you can use tclsh, but that’s why to complicated.