DHCP Project Report Department
DHCP Project Report Department
BONAFIDE CERTIFICATE
This is to certify that the work embodied in this Project Report entitled “Implementation of
DHCP using packet tracer” being submitted by “Animesh Singh , Abhishek Raj , Avinash
Kumar , Vishal Mandal ” 7th Semester for partial fulfillment of the requirement for the
degree of “Bachelor of Engineering in Computer Science & Engineering ” discipline in “
Centurion University of Technology and Managemnt ” during the academic session July-Dec
2019 is a record of bonafide piece of work, carried out by student under my supervision and
guidance in the “Department of Computer Science & Engineering”, Centurion
University of Technology and Management.
SIGNATURE
Miss Anisha Mukerjee
Assistant Professor of Computer Science and Engineering
Certified that the above -mentioned project has been duly carried out as per the
norms of the college and statues of the university.
SIGNATURE
Dr. Sujata Chakravarty
DEAN OF SCHOOL OF ENGINEERING AND TECHNOLOGY
Professor of Computer Science and Engineering
2
PROJECT REPORT IMPLEMENTATION OF DHCP
DECLARATION
3
PROJECT REPORT IMPLEMENTATION OF DHCP
ACKNOWLEDGEMENT
On the occasion of presenting this project report, we wish to express our deep and profound
feelings of gratitude to our friends, classmates and teachers, who helped us with their
valuable advices in the completion of my project.
First of all, we express my deep gratitude to Almighty, the supreme guide, for bestowing his
blessings upon us in our entire endeavor. We are grateful to my respected academic
coordinator for providing all the facilities for the development of this project.
We would also like to express our heartfelt gratitude to our head of the department for
rendering all possible help and support during the development, implementation and
presentation of the project.
4
PROJECT REPORT IMPLEMENTATION OF DHCP
ABSTRACT
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used
on UDP/IP networks whereby a DHCP server dynamically assigns an IP address and other
network configuration parameters to each device on a network so they can communicate with
other IP networks. A DHCP server enables computers to request IP addresses and networking
parameters automatically from the Internet service provider (ISP), reducing the need for
a network administrator or a user to manually assign IP addresses to all network devices. In
the absence of a DHCP server, a computer or other device on the network needs to be
manually assigned an IP address, or to assign itself an APIPA address, which will not enable
it to communicate outside its local subnet.
DHCP can be implemented on networks ranging in size from home networks to large campus
networks and regional Internet service provider networks. A router or a residential
gateway can be enabled to act as a DHCP server. Most residential network routers receive a
globally unique IP address within the ISP network. Within a local network, a DHCP server
assigns a local IP address to each device connected to the network.
The DHCP employs a connectionless service model, using the User Datagram
Protocol (UDP). It is implemented with two UDP port numbers for its operations which are
the same as for the bootstrap protocol (BOOTP). UDP port number 67 is the destination port
of a server, and UDP port number 68 is used by the client. DHCP operations fall into four
phases: server discovery, IP lease offer, IP lease request, and IP lease acknowledgement.
These stages are often abbreviated as DORA for discovery, offer, request, and
acknowledgement. The DHCP operates based on the client–server model. When a computer
or other device connects to a network, the DHCP client software sends a
DHCP broadcast query requesting the necessary information.
5
PROJECT REPORT IMPLEMENTATION OF DHCP
TABLE OF CONTENTS
1. INTRODUCTION 7
2. OPERATION 8-10
3. SYSTEM REQUIREMENTS 11
5. CONFIGURATION 12-14
6. SCOPE OF PROJECT 15
7. SCREENSHOTS 15
8. REFERENCES 16
6
PROJECT REPORT IMPLEMENTATION OF DHCP
1. INTRODUCTION
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used
on UDP/IP networks whereby a DHCP server dynamically assigns an IP address and other
network configuration parameters to each device on a network so they can communicate with
other IP networks. A DHCP server enables computers to request IP addresses and networking
parameters automatically from the Internet service provider (ISP), reducing the need for
a network administrator or a user to manually assign IP addresses to all network devices. In
the absence of a DHCP server, a computer or other device on the network needs to be
manually assigned an IP address, or to assign itself an APIPA address, which will not enable
it to communicate outside its local subnet.
DHCP can be implemented on networks ranging in size from home networks to large campus
networks and regional Internet service provider networks. A router or a residential
gateway can be enabled to act as a DHCP server. Most residential network routers receive a
globally unique IP address within the ISP network. Within a local network, a DHCP server
assigns a local IP address to each device connected to the network.
The DHCP operates based on the client–server model. When a computer or other device
connects to a network, the DHCP client software sends a DHCP broadcast query requesting
the necessary information. Any DHCP server on the network may service the request. The
DHCP server manages a pool of IP addresses and information about client configuration
parameters such as default gateway, domain name, the name servers, and time servers. On
receiving a DHCP request, the DHCP server may respond with specific information for each
client, as previously configured by an administrator, or with a specific address and any other
information valid for the entire network and for the time period for which the allocation
(lease) is valid. A DHCP client typically queries for this information immediately after
booting, and periodically thereafter before the expiration of the information. When a DHCP
client refreshes an assignment, it initially requests the same parameter values, but the DHCP
server may assign a new address based on the assignment policies set by administrators.
7
PROJECT REPORT IMPLEMENTATION OF DHCP
2. OPERATION
The DHCP employs a connectionless service model, using the User Datagram
Protocol (UDP). It is implemented with two UDP port numbers for its operations which are
the same as for the bootstrap protocol (BOOTP). UDP port number 67 is the destination port
of a server, and UDP port number 68 is used by the client.
DHCP operations fall into four phases: server discovery, IP lease offer, IP lease request, and
IP lease acknowledgement. These stages are often abbreviated as DORA for discovery,
offer, request, and acknowledgement.
The DHCP operation begins with clients broadcasting a request. If the client and server are
on different subnets, a DHCP Helper or DHCP Relay Agent may be used. Clients requesting
renewal of an existing lease may communicate directly via UDP unicast, since the client
already has an established IP address at that point. Additionally, there is a BROADCAST flag
(1 bit in 2 byte flags field, where all other bits are reserved and so are set to 0) the client can
use to indicate in which way (broadcast or unicast) it can receive the DHCPOFFER: 0x8000
for broadcast, 0x0000 for unicast. Usually, the DHCPOFFER is sent through unicast. For
those hosts which cannot accept unicast packets before IP addresses are configured, this flag
can be used to work around this issue.
2.1 Discovery
The DHCP client broadcasts a DHCPDISCOVER message on the network subnet using the
destination address 255.255.255.255 (limited broadcast) or the specific subnet broadcast
address (directed broadcast). A DHCP client may also request its last known IP address. If
the client remains connected to the same network, the server may grant the request.
Otherwise, it depends whether the server is set up as authoritative or not. An authoritative
server denies the request, causing the client to issue a new request. A non-authoritative server
simply ignores the request, leading to an implementation-dependent timeout for the client to
expire the request and ask for a new IP address.
8
PROJECT REPORT IMPLEMENTATION OF DHCP
For example, if HTYPE is set to 1, to specify that the medium used is Ethernet, HLEN is set
to 6 because an Ethernet address (MAC address) is 6 octets long. The CHADDR is set to the
MAC address used by the client. Some options are set as well.
2.2 Offer
2.3 Request
In response to the DHCP offer, the client replies with a DHCPREQUEST message,
broadcast to the server, requesting the offered address. A client can receive DHCP offers
from multiple servers, but it will accept only one DHCP offer. Based on required server
identification option in the request and broadcast messaging, servers are informed whose
offer the client has accepted. When other DHCP servers receive this message, they
withdraw any offers that they have made to the client and return the offered IP address to
the pool of available addresses.
2.4 Acknowledgement
When the DHCP server receives the DHCPREQUEST message from the client, the
configuration process enters its final phase. The acknowledgement phase involves sending a
DHCPACK packet to the client. This packet includes the lease duration and any other
9
PROJECT REPORT IMPLEMENTATION OF DHCP
configuration information that the client might have requested. At this point, the IP
configuration process is completed.
The protocol expects the DHCP client to configure its network interface with the negotiated
parameters.
After the client obtains an IP address, it should probe the newly received address (e.g. with
ARP Address Resolution Protocol) to prevent address conflicts caused by overlapping
address pools of DHCP servers.
ILLUSTRATION
10
PROJECT REPORT IMPLEMENTATION OF DHCP
3. SYSTEM REQUIREMENTS
Hardware: -
1. Monitor
2. Keyboard
3. Mouse
Software: -
1. Windows 7 or more
2. Cisco Packet Tracer 7.0 or higher
1. Animesh Singh(200301120038):
Animesh dealt with the design and implementation of the front end and
functionalities of the project.
2. Abhishek Raj(200301120025):
Abhishek dealt with the internal coding required for the working of this project.
3. Avinash Kumar(200301120002):
Avinash dealt with the functionalities of the project and working of this project.
4. Vishal Mandal(200301120055):
Vishal dealt with the internal coding required for the working of this project.
11
PROJECT REPORT IMPLEMENTATION OF DHCP
5. CONFIGURATION
12
PROJECT REPORT IMPLEMENTATION OF DHCP
Default-router 1.1.1.1
Dns-server 8.8.8.8
Exit
Ip dhcp excluded-address 172.16.1.1 172.16.1.10
Ip dhcp pool NET2
Network 172.16.1.0 255.255.255.0
Default-router 1.1.1.1
Dns-server 8.8.8.8
Exit
Step 4: We now need to require DCHP services on the respective physical interfaces of
the router. We must be very careful that we are requiring the DHCP service in the
correct interface, for this we must note that the address of the interface matches the
address of the DHCP together with the subnet mask, to require the service we must use
the address of the Default-router.
To prevent confusions in this step we will only configure the DHCP request on the Fa0/0
interface. The commands are:
Int Fa0/0
Ip helper-address 1.1.1.1
Step 5: Now proceed to verify that if the IP addresses have been automatically
distributed for the final devices that are connected to the Fa0/0 interface.
To do this we go to a laptop and select the IP Configuration option, then we have to
click the DHCP option. It may take some time to give the address automatically but if
we are sure that our configuration is fine we will not have to worry, there is a possibility
that it will be late to give the address automatically, for that we can select the Static
option and then DHCP again to get the IP address.
Step 6: In this part we will configure the DHCP service for the Fa0/1 interface as it
was done in Step 4, the commands we will use are:
Int Fa0/1
Ip helper-address 1.1.1.1
Do write memory
Step 7: We need to select the DHCP option on the laptops that are connected to the
Fa0/1 interface as was done in Step 5.
13
PROJECT REPORT IMPLEMENTATION OF DHCP
Step 8: Now proceed to configure the DHCP service of the second form, in this method
we have to configure it on a Server.
Step 9: In this step we will configure the IP addresses for the physical interfaces.
The programming will be done in the global configuration with the following
commands: Int fa0/0
Ip address 10.10.10.1 255.255.255.252
No shutdow
Int fa0/1
Ip address 172.32.0.1 255.255.255.0
No shutdow
Do write memory
Step 10: In this step, select the server by selecting and clicking the Desktop option, then
selecting IP Configuration to place an IP address together with the Subnet Mask and its
default Gateway that matches the physical interface of the Router that is connected.
Step 11: Now select the Services option and then the DHCP service.
Step 12: At this moment we have to select the option On to start the service and proceed
to configure it, just like the DHCP programming on the router, it must match the network
address we want to give you the service IP addresses automatically.
We must take into account that the Default Gateway must be the IP address of the
interface where we will request the service, when we have everything configured we will
click the Add button and then the Save button.
Step 13: Then we will return to the configuration of the router to require the DHCP
service of the Server, for this we must note that the service will be requested based on the
IP address of the Server. The commands to be used will be programmed in the global
configuration:
Int Fa0/1
Ip helper-address 10.10.10.2
Do write memory
Step 14: Finally, on a laptop select the option of Desktop and IP Configuration, then select
the DHCP option to receive the IP address automatically.
It should be remembered that if you do not give the address automatically you can
implement the recommendations in Step 5.
14
PROJECT REPORT IMPLEMENTATION OF DHCP
6. SCOPE OF PROJECT
7. SCREENSHOT
15
PROJECT REPORT IMPLEMENTATION OF DHCP
8. REFERENCES
http://www.google.com
http://wikipedia.org
http://github.com
http://tutorialspoint.com
16