In this blog I will explain how to setup a DHCP and DNS server on your Cisco router.
The network subnet is as follows:
Network Address: 192.168.0.0
Subnet Mask: 255.255.255.0
Router: 192.168.0.1
Dynamic Range: 192.168.0.10 - 192.168.0.254
ISP DNS Server: 8.8.8.8
Subnet Domain Name: mylan.local
These commands specify the DNS server and local domain to the router:
ip domain name mylan.local
ip name-server 8.8.8.8
This command enables the Cisco DNS Service
ip dns server
Before we create our DHCP server, we should specify which IP's are not to be assigned. This being 192.168.0.1 to 192.168.0.9
ip dhcp excluded-address 192.168.0.1 192.168.0.9
Now we specify our DHCP Pool:
ip dhcp pool MyLAN
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 192.168.0.1
domain-name mylan.local
lease 7
!
You may now wish to assign statically assigned IP addresses to various hosts on your network. You can do this by creating another DHCP pool
ip dhcp pool MyLaptop
host 192.168.0.10 255.255.255.0
client-identifier 0100.0430.52c7.88
!
Note: The client identifier is NOT the MAC address of the client. The easiest way to find the client identifier is to connect the machine to the network and wait for it to be assigned an IP by the router.
In enable mode, type in:
show ip dhcp binding
Match the client identifier with the IP address you were dynamically assigned then create your static pool like the one mentioned above.
No comments:
Post a Comment