Anda di halaman 1dari 4

5/20/2011

How DHCP works - Very detailed guide

Knowurtech.com

Home

Be an Expert

About us

Ads by Google

Cisco Router Conf ig

IP Netw orking

Cisco Netw orking

Cisco IP Phone

DHCP Server Settings

SEARCH

DHCP ADDRESS ASSIGNMENT

Keywords: - : How does DHCP work, DHCP IP address assignment process Web This Site Search Reference: - nokia.com Author: - Surender Singh DHCP is a very c ommon protocol and we often here about it. DHCP is muc h more complex than it looks. DHCP IP address assignment process goes through a few steps explained in this artic le. DHCP stands for Dynamic Host Configuration Protoc ol and is used to automatically assign IP configuration to hosts connecting to a network. The Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCPIP network. DHCP is based on the Bootstrap Protoc ol (BOOTP)A DHCP client makes a request to a DHCP server that may or may not reside on the same subnet. The automatic distribution of IP configuration information to hosts eases the administrative burden of maintaining IP networks. In its simplest form, DHCP distributes the IP address, subnet mask and default gateway to a host, but can include other c onfiguration parameters suc h as name servers and netbios configuration. A DHCP client goes through six stages during the DHCP process. These stages are: Initializing MAIN MENU
Networking Cisco Security Checkpoint Window s Tips and tricks Linux Window s Technical Tips and tricks SEO

NETWORKING
DNS queries Configuring MRTG- Part-1 Configuring MRTG- Part-2 mac address flapping Best practices for conducting w ireless site surveys How DHCP works Network cabling Digital and Analog loops Multicast Addressing What is SONET Configuring packer shaper Troubleshooting Ethernet collisions DSL

Selecting Requesting Binding Renewing Rebinding The DHCP client starts the DHCP process by issuing a DHCPDISCOVER message to its local subnet on UDP port 67. Since the client does not know what subnet it belongs to, a general broadc ast is used (destination address 255.255.255.255). If the DHCP server is loc ated on a different subnet, a DHCP-relay agent must be used. The DHCP-relay agent can take several forms. The ip-helper IOS command is used to set up a DHCP-relay agent on a Cisc o router.

TODAY`S RECOMMENDATION Some of the useful links for today are shown below. You may explore them for more details.
Ads by Google
IP Address DHCP DNS and DHCP Cisco Sw itching Cisco Conf iguration

The DHCP-relay agent forwards the DHCPDISCOVER message to a subnet that contains a DHCP server. Once the DHCP server receives the DHCPDISCOVER message, it replies with a

knowurtech.com//how_dhcp_works.ht

1/4

5/20/2011

How DHCP works - Very detailed guide


DHCPOFFER message. The DHCPOFFER message contains the IP configuration information for the client. THE DHCPOFFER message is sent as a broadcast on UDP port 68. The client will know that the DHCPOFFER message is intended for it because the client's MAC address is included in the message. If the c lient is on a different subnet than the server, the message is sent unic ast to the DHCPrelay agent on UDP port 67. The DHCP-relay agent broadcasts the DHCPOFFER on the client's subnet on UDP port 68.

After the client rec eives the DHCPOFFER, it sends a DHCPREQUEST message to the server. The DHCPREQUEST message informs the server that it acc epts the parameters offered in the DHCPOFFER message. The DHCPREQUEST is a broadcast message, but it includes the MAC address of the server, so that other DHCP servers on the network will know which server is serving the c lient.

The

DHCP server will send

a DHCPACK message

to the client

to ac knowledge

the

DHCPREQUEST. The DHCPACK message contains all the configuration information that was requested by the client. After the client receives the DHCPACK, it binds the IP address and is ready to communicate on the network. If the server is unable to provide the requested configuration, it sends a DHCPNACK message to the client. The client will resend the DHCPREQUEST message. If the DHCPREQUEST message does not return a DHCPACK after four attempts, the client will start the DHCP process from the beginning and send a new DHCPDISCOVER message. There is a great diagram of the DHCP proc ess at the "Understanding DHCP" link at the end of this article.

After the client receives the DHCPACK, it will send out an ARP request for the IP address assigned. If it gets a reply to the ARP request, the IP address is already in use on the network. The client then sends a DHCPDECLINE to the server and sends a new DHCPREQUEST. This step is optional, and is often not performed. Since the DHCP works on broadcast, two pc which are on different networks (or VLANs) cannot work on the DHCP protocol. Does that mean we should have one dedic ated server of DHCP in eac h vlan? No in Cisco devices IP helper-address command helps to broadcast DHCP messages from one vlan to other vlan. For more detailed discussion on the DHCP protocol go through the below link from cisco.c om

http://www.c isco.com/warp/public /473/100.html If you have any suggestions or want to add more to this article do write us an email artic les@knowurtech.com

What Next? If you liked this artic le, you can share it with others using the following link: ShareThis Related Content :
Ads by Google Ethernet IP Protocol DHCP Relay on Cisco Windows DHCP Management Switch VLAN

Comments (16)
Sort by: Date Rating Last Activity

Login

knowurtech.com//how_dhcp_works.ht

2/4

5/20/2011

How DHCP works - Very detailed guide


Madhu Sudan 105 weeks ago excellent & simple content...............
Reply

Santosh Gaikwad 93 weeks ago Good One....


Reply

duc hebag 75 weeks ago rfc 2131 please.


Reply

Jack 70 weeks ago sweet thanks


Reply

Ravikiran 64 weeks ago Thanks alot for the gist.


Reply

Jayendra 61 weeks ago Realy Greate one


Reply

1 reply active 61 weeks ago

Shailesh Shinde 61 weeks ago Simply Best.......... If you have knowledge, let others light their candles at it.
Reply

Muhammad Rayees 43 weeks ago Nice Answer...Simple to Understand......


Reply

+2

Napenthe 39 weeks ago Great article. Simple and to the point!


Reply

srini 37 weeks ago

thanks mate.very useful to get the basics. and even the cisc o link was very informative. thanks again.
Reply

arun 23 weeks ago super great!!!! Thanks


Reply

ChetanSM 14 weeks ago Thanks, nice.....I think it was sufficient to introduce DHCP & details
Reply

knowurtech.com//how_dhcp_works.ht

3/4

5/20/2011

How DHCP works - Very detailed guide


hardip 11 weeks ago Thanks a lot its good.
Reply

1 reply active less than 1 minute ago

mohin 5 hours ago mind blowing


Reply

derekchia89 1p 11 weeks ago

+1

"The DHCPREQUEST is a broadc ast message, but it includes the MAC address of the server, so that other DHCP servers on the network will know whic h server is serving the client." I dont think DHCPREQUEST includes MAC address of server to announce to other DHCP servers on the network which server is serving the c lient. http://technet.microsoft.com/en-us/library/cc7499... "Destination Hardware Address of FFFFFFFFFFFF. A broadc ast is used, even though the client does know the address of the server, to let other DHCP servers know the client has accepted an offer from a specific server. " http://support.microsoft.com/kb/169289 refer to this as well. Correct me if im wrong. thx!
Reply

surindra 5 weeks ago perfec t for a starter to understand basic concept, thanks a lot bloke.........
Reply

Post a new comment

Comment as a Guest, or login: Name


Displayed next to your comments.

Email
Not dis played publicly.

Website (optional)
If you have a website, link to it here.

Subsc ribe to None

Submit Comment

Co nta ct o r se nd us sugge stio ns a t : Adm in@k no wurte ch.co m Co pyright 2007-2008 kno wurte ch.co m . All R ights Re se rve d.

knowurtech.com//how_dhcp_works.ht

4/4

Anda mungkin juga menyukai