Allocating Static IP Addresses with DHCP
Problem
You want to ensure that your router assigns the same IP address to a particular device every time it connects.
Solution
The following commands ensure that the router assigns the same IP address to a device each time it requests one:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip dhcp poolRouter1(dhcp-config)#IANhostRouter1(dhcp-config)#172.25.1.33 255.255.255.0client-identifierRouter1(dhcp-config)#0100.0103.85e9.87client-nameRouter1(dhcp-config)#win2kdefault-routerRouter1(dhcp-config)#172.25.1.1domain-nameRouter1(dhcp-config)#oreilly.comdns-serverRouter1(dhcp-config)#172.25.1.1exitRouter1(config)#endRouter1#
Discussion
The router allows you to statically bind an IP address to a MAC address to ensure that a particular device always receives the same IP address. This is particularly useful for devices such as servers that must be available for access via a well-known IP address or DNS entry. Any device that accepts inbound sessions will probably require a static address. Being able to allocate these addresses via DHCP provides network administrator with greater control.
The configuration for a static DHCP mapping is slightly
different than a dynamic pool. In particular, you must assign a
separate dhcp pool for each
static server. In our example, we created a pool named IAN to allocate a static IP address to user Ian. Also, instead of defining a network range of IP ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access