[fusion_text]Guest LAN users need to receive an IP address from the specified pool along with a default gateway, domain name, and ip-address of an DNS server. [/fusion_text][separator style_type=”none” top_margin=”5″ bottom_margin=”” sep_color=”” border_size=”” icon=”” icon_circle=”” icon_circle_color=”” width=”” alignment=”center” class=”” id=””]
In this example , a DHCP server will be configured on Router1.
The lease should be valid for 12 hours.Click on image for larger picture!The DHCP-Server need to be configured with the following options:
The lease should be valid for 12 hours.Click on image for larger picture!The DHCP-Server need to be configured with the following options:
Pool name | Clients |
Network (ip’s) | 172.16.0.0 /24 |
Default router (gateway) | 172.16.0.1 |
Domain name | linuxsource.nl |
Lease | 12 hours |
ip dhcp excluded | 172.16.0.1 to 172.16.0.4 |
First, go to Router1 into configuration mode
Shell
1 2 3 | Switch1# conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# |
Set the dhcp server and the options we want
Shell
1 2 3 4 5 6 | router1(config)# ip dhcp pool Guests router1(dhcp-config)# network 172.16.0.0 255.255.255.0 router1(dhcp-config)# default 172.16.0.1 router1(dhcp-config)# dns-server 8.8.8.8 router1(dhcp-config)# lease 0 12 router1(dhcp-config)# exit |
Exclude switch1 and switch2, CoreSwitch1 and the router itself from the DHCP-Server. (so it can’t give the ip-addresses 172.16.0.1 to 172.16.0.4 to the clients)
Shell
1 | router1# ip dhcp excluded-address 172.16.0.1 172.16.0.4 |
Verify the dhcp configured parameters with:
Shell
1 2 3 4 5 6 7 8 9 10 | router1# show ip dhcp pool Pool Guests : Utilization mark (high/low) : 100 / 0 Subnet size (first/next) : 0 / 0 Total addresses : 254 Leased addresses : 1 Pending event : none 1 subnet is currently in the pool : Current index IP address range Leased addresses 172.16.0.5 172.16.0.1 - 172.16.0.254 1 |
Verify the the operation of the DHCP Server with:
Shell
1 2 3 4 5 | router1# show ip dhcp binding IP address Client-ID/ Lease expiration Type Hardware address 172.16.0.5 00D0.D39B.6485 -- Automatic 172.16.0.6 000B.BED0.043E -- Automatic |
View if there are any conflicts.. (in this case, none!)
Shell
1 2 3 | <span class="uk-width-1-1">router1# show ip dhcp conflict</span> <span class="uk-width-1-1">IP address Detection method Detection time VRF</span> ..... ..... ..... ... |
Save the configuration of router1
Shell
1 2 3 4 5 | Router1# copy running-config startup-config Destination filename [startup-config]? <ENTER> Building configuration... [OK] Router1# |
You are done!