Router> enable
Router# config t
Router(config)# ip dhcp pool LANPOOL
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Router(dhcp-config)# domain-name mycompany.com
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 4.4.4.2
Router(dhcp-config)# netbios-name-server 192.168.1.2
Router(dhcp-config)# host 192.168.1.10
Router(dhcp-config)# hardware-address 0101.A800.0432 75A2
Router(dhcp-config)# client-name MyPC
Router(dhcp-config)# exit
Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
Each command line interpreted below.
Router> enable
Router# config t
# Define name to IP Pool
Router(config)# ip dhcp pool LANPOOL
#Define network range
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
#Domain to prefix to client
Router(dhcp-config)# domain-name mycompany.com
#Gateway IP that get assigned to client
Router(dhcp-config)# default-router 192.168.1.1
#Define the dns server for the clients
Router(dhcp-config)# dns-server 4.4.4.2
#Define a WINS server if you have one
Router(dhcp-config)# netbios-name-server 192.168.1.2
#IP Address to be reserved to the HOST
Router(dhcp-config)# host 192.168.1.15
#MAC Address of the cient
Router(dhcp-config)# hardware-address 0101.A800.0432 75A2
#Optional – Full name of the client(Not to include client name).
Router(dhcp-config)# client-name MyPC
Router(dhcp-config)# exit
#IP Exclude has to be given from config mode
Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
#Enables debugging on DHCP service
Router# debug ip dhcp server {events | packets | linkage}
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)