Link to home
Start Free TrialLog in
Avatar of biggynet
biggynet

asked on

dhcp and layer 3

I am implementing dhcp service on my Catalyst 3560. But I am not sure if I need to enable routing. My guess is no if I do not need intervlan. Correct?
Avatar of Garry Glendown
Garry Glendown
Flag of Germany image

DHCP is a layer 2 protocol which does not require routing (if you need inter-vlan communication, you'd need to set up an IP helper for it). The workstation sends out a broadcast asking for an IP, the server responds by sending out a frame with target set to that workstation's MAC address ... So if your 3560 is the DHCP server, all connected VLANs are able to communicate without routing ...
Avatar of eeRoot
eeRoot

You would need intra VLAN routing only if you have multiple VLAN's and the devcies need to communicate across the VLAN's.
Avatar of biggynet

ASKER

I am a bit confused. Isn't DHCP a layer 2 protocol because it deals with IP addresses.
Nobody said otherwise ... eeRoot only mentioned inter-VLAN-routing because you asked about routing in your original question ...
I meant isn't DHCP a layer 3 service because it deals with IP addresses.
ASKER CERTIFIED SOLUTION
Avatar of Garry Glendown
Garry Glendown
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I read the CCNA 7th edition and it says that DHCP is a service at the application layer. So is it layer 2 or application layer in the tcp/ip model?
Due to the quality of CCNA questions (and by that, the documents about CCNA) I personally do not trust anything about it ;) Too many "bugs" in the whole CCNA certification questions to take it serious ...

Application layer in the TCP/IP model is layer 4 ... how can a protocol that distributes IP addresses to clients be a layer 4 protocol, if the client does not even has to have a valid IP address at that point?
The typical DHCP request uses source address 0.0.0.0 in a UDP broadcast packet with destination 255.255.255.255 to ask for an IP address. One or multiple DHCP servers will reply to destination 255.255.255.255 again, but with the client's MAC address as sent in the original DHCP discover packet, and filling data fields appropriately (client IP address, gateway, DNS, etc.)
So it is layer 2. Correct?
OK, did a bit more reading on the topic ...
Short answer is ... depends on who you ask ... ;)
There are many documents out there that count DHCP as an application layer protocol (so, OSI L7 / TCP/IP L4). While the logic behind this may be understandable (it shares several things with other application level protocols), it's also different in other areas ... e.g, every other Layer 7 (sticking with OSI for now) protocol takes advantage of lower level features like routing. Of course, for all intents and purposes, taking such a broadcast message and distributing it upwards would not really be helpful in most cases.
OTOH, there's many documents out there that count DHCP as OSI L3 / TCP/IP L2, which I would lean towards, as its function is to provide the information required to actually set up the higher levels ...
I guess your best bet is to do a search for something like "dhcp osi layer" and make your own mind up ... ;) for now, there does not seem to be a agreed-upon definition ;)
Or, if you need it for a test, make sure you know what the tester/manufacturer wants to hear and stick with that ;)
I'll go with application layer, http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol, because it relies on layer 2 and 3 to provide the dhcp service.