DHCP Snooping

 Hello,

We're gonna talk about DHCP snooping,

DHCP SNOOPING is a technology that prevents our local network users or any device that should be asigned an ip address to contact a suspiciours dhcp server,


So we need to understand how DHCP process works first, in order to understand how we can protect our local users and their IP attributions.


There are four steps through which we need to pass in order to attribute an ip address from our internal dhcp servers or server/


First of all the client sends a DHCP discovery request in the form of a broadcast, then the DHCP server will go ahead and respond to that request with a DHCP offer frame, our client then goes ahead and accepts offer by issuing back a DHCP request for the address that was offered and then the DHCP server will send back an acknowledgment saying yes you can go ahead and use that ip and then it's installed in its database and our user starts to connect in a normal way on our internal network.

Example:



The problem comes into action when we have multiple DHCP servers on our network, and in real world we should have multiple dhcp servers in order to ensure a certain failover between them, that way if our primary server is down for a certain reason the users can ask ip addresses from the backup dhcp servers or server, so the client would still go ahead and do its discovery and all of the servers will go ahead and respond to that discovery probe and issue an offer.

The problem is that the client will accept whichever one it receives first and so on this example if the green one got there first that's the only one that would respond to and send a DHCP request back.


Then that DHCP server would go ahead and acknowledge that and install it in the database and if that particular DHCP server was a rogue, that client now it just got a bad address and may now be black hold it may be going somewhere it's not supposed to and things like that...


So what we want to do is try and mitigate that so let's pretend that this is what

we have for a network:



*We have two different switches on our data center switch which we call switch DC 

*We have a DHCP server that's installed on GE 5/12.


*On our closets which we have multiple pcs that are sitting down there that's maybe in sitting in VLANs 5 & 6 and let's just say we have an uplink port back to switch DC that's on ge 1/1 and that happens to be a trunk.


 *Now the switch DC also happens to have multiple VLANs which I've noted there you know

5, 6, 7, 8 then VLAN 15.



There's really three different things we want to go ahead and do:



It's really easy to install this 

All we have to do is at the global level we want to go ahead and turn on IP dhcp snooping then at the interface level we want to tell it which interface to trust in other words which ones would we expect to see the dhcp servers responses coming back from.

Remember those two that we saw that the server sound those are  the ones we want to have and then the last thing we do is we tell which VLANs does apply for.


 If we take a look at the different scenario we just did we'd have here's the following things we do on those switches we first get into switch DC which is the one that we have our DHCP server on and we get into config terminal mode and we turn it on globally by saying IP dhcp snooping.



Now we go in just to the interface that the server is on which is GE5/12 and say IP dhcp snooping trust 

The last thing to do is to say which VLANs we want to do the DHCP snooping on and you can go ahead and conglomerated a bunch of those together and so I did that in here where we do IP dhcp snooping VLAN 5-8 comma 15.


Last thing to do is go down to the closet switch we say closet 1 we get in config mode again once again to the global IP dhcp snooping get into the interface which on this case would be the uplink that's where we expect to see the server responses coming back from.


so only on that uplink everything else by default will be untrusted and on that interface we say DC simply trust and then since that switch happens to have two different VLANs 5 & 6 we also add in the IP dhcp snooping VLANs 5 & 6.

Comments

Popular Posts

Network Access Control NAC | IT NETWORKS

CISCO : Dynamic Multipoint Virtual Private Network (DMVPN) | ITNETWORKS

Issues with CISCO WIRELESS Controller (And resolution) | IT NETWORKS