Hormuud University
Dynamic Host Configuration Protocol
Lecturer: Huthaifa Nour Hassan
Advanced Networking 1 Lecturer: Huthaifa Nour Hassan, Hormuud University
Hormuud University
Lecture 8
DHCP
Lecturer: Huthaifa Nour Hassan
Advanced Networking 2 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCP(Ipv4 & IPv6)
Allows a server to dynamically distribute IP addressing and configuration
information to the clients.
» IP address
» Subnet mask
» Default Gateway
» DNS server
Advantages.
» Centralized Network Client Configuration.
» Easier IP address Management.
» Reduced Network Administration
» Large Network Support.
Advanced Networking 3 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCP Process
Advanced Networking 4 Lecturer: Huthaifa Nour Hassan, Hormuud University
Assigning a Dynamic IPv4 Address to a Host
DHCP – prefered method of “Leasing”
IPv4 address to host on large networks,
reduces the burden on network support
staff and virtually eliminates entry
errors
Advanced Networking 5 Lecturer: Huthaifa Nour Hassan, Hormuud University
Assigning a Dynamic IPv4 Address to a Host
LAN Interface Properties Configuring a Static IPv4 address
Advanced Networking 6 Lecturer: Huthaifa Nour Hassan, Hormuud University
LAB: DHCP Configuration
TASK:
Configure R-1 and PC in the LAN with IP address as per the diagram given
Configure R1 as DHCP with the following details.
» Use DHCP pool name LAN
» Use network 192.168.1.0/24
» Excluded addresses : 192.168.1.1 – 192.168.1.20 to
192.168.1.50 – 192.168.1.51, 192.168.1.100
» DNS server in the Network 192.168.1.50, 192.168.1.51
Advanced Networking 7 Lecturer: Huthaifa Nour Hassan, Hormuud University
Router as DCHP Server
Syntax:
Rx(config)# ip dhcp pool <Pool_Name>
DHCP(config# )# ip dhcp pool CCNA
DHCP(dhcp-config)# )# nework 192.168.1.0 255.255.255.0
DHCP(dhcp-config)# )# default-router 192.168.1.100
DHCP(dhcp-config)# )# default-router 192.168.1.100
DHCP(dhcp-config)# )# dns-server 192.168.1.50
DHCP(dhcp-config)# )# dns-server 192.168.1.51
Excluded addresses
DHCP(config)# )# ip dhcp excluded-address 192.168.1.100
DHCP(config)# )# ip dhcp excluded-address 192.168.1.50
DHCP(config)# )# ip dhcp excluded-address 192.168.1.51
Advanced Networking 8 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCP(Ipv4 & IPv6)
Disadvantages of Router as DHCP
» Will increase the load on the router
» Best suited for network that support 10 to 15 users.
Advanced Networking 9 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCP Relay Agent (IP Helper Address)
Forwards Broadcast DHCP request received on interface to the DHCP server
specified by the IP Helper Address via Unicast
IP Helper Address A.B.C.D
Advanced Networking 10 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCP Relay Agent (IP Helper Address)
IP Helper Address
R-3(config)# interface f0/0
R-3(config-if)# ip helper-address 10.0.0.1
R-3(config-if)# exit
Advanced Networking 11 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCPv6
Functionality of DHCPv6 is the same as DHCP for IPv6 but there some
differences.
There’s no broadcast instead uses Solicited Multicast address.
Clients listen for DHCP messages on UDP port 546.
Server and relay agents listen for DHCP messages on UDP port 547.
Gateway information learns based on Router Advertisement Message.
Advanced Networking 12 Lecturer: Huthaifa Nour Hassan, Hormuud University
DHCPv6 Configuration
Syntax:
Rx(config)# ipv6 dhcp pool <Pool_Name>
R-1(config)# ipv6 dhcp pool CCNA
R-1(dhcp-config)# address prefix 2001:123:123:123::/64
R-1(dhcp-config)# dns-server 2001:1234::1234
R-1(dhcp-config)# domain-name Hormuud.com
R-1(config)# int f0/0
R-1(config-if) # ipv6 address 2001:123:123:123::1/64
R-1(config-if)# ipv6 dhcp server CCNA
R-1(config-if)#ipv6 nd managed-config-flag CCNA
R-1(config-if)# no shutdown
R-2(config)# int f0/0
R-2(config-if) # ipv6 address dhcp
R-2(config-if)# ipv6 enable
R-2(config-if)# no shutdown
Advanced Networking 13 Lecturer: Huthaifa Nour Hassan, Hormuud University