cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1092
Views
0
Helpful
6
Replies

What is the best way to assign static IP addresses to multiple client devices

tnayak
Level 1
Level 1

I configured the DHCP Server on my Catalyst 3750G switch to use a DHCP database (text file)?  Can I assign static IP Addresses to the devices on my network by editing the DHCP Database text file (#1 below) or it better to do it by creating DHCP sub pools (#2 below)?

 

1) DHCP Database File

*time* Jun 03 2019 05:20 PM
*version* 3
!IP address     Type    Hardware address       Lease expiration                VRF
10.x.x.1           id       xxxx.xxxx.8eba           Jun 03 2019 07:52 PM
10.x.x.2           id       xxxx.xxxx.8ebb           Jun 03 2019 06:16 PM
10.x.x.3           id       xxxx.xxxx.8ebc           Jun 04 2019 02:40 PM
10.x.x.4           id       xxxx.xxxx.8ebd           Jun 04 2019 04:32 PM
etc.

 

!IP address     Type    Hardware address       Interface-index


!IP address     Interface-index     Lease expiration     Server IP address     Hardware address     Vrf
*end*

 

2) DHCP Sub Pool

ip dhcp pool Office1
 network 10.x.x.0 255.255.255.0
 dns-server 10.x.x.x
 default-router 10.x.x.x
    address 10.x.x.1 hardware-address xxxx.xxxx.8eba
    address 10.x.x.2 hardware-address xxxx.xxxx.8ebb
    address 10.x.x.3 hardware-address xxxx.xxxx.8ebc
    address 10.x.x.4 hardware-address xxxx.xxxx.8ebd

etc.

 

1 Accepted Solution

Accepted Solutions

Mark Malone
VIP Alumni
VIP Alumni
Hi
IF you need to use addresses out of the DHCP pool ,best practice is too exclude them from the pool so they cant be given out by DHCP then apply the address to the client or clients
example
ip dhcp excluded-address 172.16.1.100 172.16.1.103

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4/dhcp-12-4-book/config-dhcp-server.html

View solution in original post

6 Replies 6

Mark Malone
VIP Alumni
VIP Alumni
Hi
IF you need to use addresses out of the DHCP pool ,best practice is too exclude them from the pool so they cant be given out by DHCP then apply the address to the client or clients
example
ip dhcp excluded-address 172.16.1.100 172.16.1.103

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4/dhcp-12-4-book/config-dhcp-server.html

thx

No problem glad i could help

I have thought about this too. Is there any other way to config. static routes faster  than going to every  router and #ip rou xxxx xxxx xxxx?  

Yes there is but only if you had a management tool like Cisco Prime or KIWI CAT tools which would allow you build a template and push the config to every device you wanted at once , without a central tool like that unfortunately not.

If you were good at scripting you could probably do it through python too or some other programming tool too

yes another reason this is going collaboration w/ python code in 10 to 20 years networking will be all script?? well I thought it would be all ipv6 by now too so who knows? Thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card