Adventures in Networking - DHCP - Part 2: Redundancy
In my last post, I described the simplest DHCP functionality. Your computers can grab an IP from a DHCP server and boom, you're done. What if you're an availability kind of guy and the idea of having a single point of failure for IP acquisition rustles your jimmies? Have no fear, redundancy is totally a possibility.
Let's review what the server does during a DHCP request.
- Hear a DHCP discover.
- Reserve an available IP from a DHCP pool, recording the MAC of the requester.
- Offer the IP.
- Acknowledge that the IP was accepted.
In my examples, I will use Cisco IOS's built-in DHCP running on a router or layer 3 switch. I will post examples for dhcpd and Windows AD on another day.
Simple Setup - Single DHCP Server
This DHCP server will hand out IPs for the 10.0.0.0/24 network. It will use Google for DNS (8.8.8.8). We exclude the range 10.0.0.1 - 10.0.0.10 for our network equipment.Router 1
Router(config)# ip dhcp excluded-addresses 10.0.0.1 10.0.0.10 Router(config)# ip dhcp pool david Router(dhcp-config)# network 10.0.0.0 255.255.255.0 Router(dhcp-config)# domain-name example.davidisbad.com Router(dhcp-config)# dns-server 8.8.8.8 Router(dhcp-config)# default-router 10.0.0.1
Redundancy Setup - Two DHCP Servers
Router 1 serves 10.0.0.11 - 10.0.0.127.Router 2 serves 10.0.0.128 - 10.0.0.254.
Router 1
Router1(config)# ip dhcp excluded-addresses 10.0.0.1 10.0.0.10 Router1(config)# ip dhcp excluded-addresses 10.0.0.128 10.0.0.255 Router1(config)# ip dhcp pool david Router1(dhcp-config)# network 10.0.0.0 255.255.255.0 Router1(dhcp-config)# domain-name example.davidisbad.com Router1(dhcp-config)# dns-server 8.8.8.8 Router1(dhcp-config)# default-router 10.0.0.1
Router 2
Router2(config)# ip dhcp excluded-addresses 10.0.0.1 10.0.0.127 Router2(config)# ip dhcp pool david Router2(dhcp-config)# network 10.0.0.0 255.255.255.0 Router2(dhcp-config)# domain-name example.davidisbad.com Router2(dhcp-config)# dns-server 8.8.8.8 Router2(dhcp-config)# default-router 10.0.0.1
No comments:
Post a Comment