- DHCP = Dynamic Host Configuration Protocol
- DHCP Client = the one that requests for dynamic IPs
- DHCP Server = it assigns the dynamic IPs
- Enabling the DHCP on the Router.
- DHCP can be configured on different network devices such as switch, router.
- Multiple DHCP servers can be created.
- There are four steps involved in the DHCP server.
- Broadcast = to all
- Multicast = to the selected group
- Unicast = One to one communication
- First step in DHCP: Discovery - Broadcast
- Second Step in DHCP: Offer - The IP is offered by the server
- Third step in DHCP: Request - Client will then request for the IP
- Fourth step in DHCP: Acknolwedgement
- All the four steps involve broadcast because the IP is not configured.
- DHCP server consists of IP pools, and it assigns the IP for the particular lease time.
- ISP has different DHCP server
- Static IP is usually used for servers. Printers also have static IP. Network devices also use static IPs.
- to enable DHCP, simply write service dhcp in global configuration mode
- Then configure DHCP with name: ip dhcp pool S_1
- Then setting IP pool
- network 192.168.1.0 255.255.255.0
- Setting the default gateway in DHCP:
- default-router 192.168.1.1
- Setting the default DNS server:
- dns-server 8.8.8.8
- DHCP will provide 4 things
- IP Address
- Subnet Mask
- Default Gateway
- DNS Server
- When DHCP tries to assign the already assigned IP to device, there will be IP Conflict.
- Now we need to exclude the static IP addresses
- the range has been designed and 10 static IPs are reserved.
- ip dhcp excluded-address 192.168.1.1 192.168.1.10
- to see the table which DHCP made for assigned IPs:
- show ip dhcp binding
- to see the IP pool configured from DHCP:
- show ip dhcp pool
Recent Pastes