cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6773
Views
8
Helpful
22
Replies

DHCP Option-82

nwekechampion
Level 3
Level 3

Hi All,

Can anyone explain what dhcp option-82 is used for?

Like any specific use-cases?

I really do not see the point in using it as I have always had success relaying with out it to dhcp server.

 

Thanks

2 Accepted Solutions

Accepted Solutions

in MPLS SP core you can use DHCP relay with op-82 to provide IP to CE depend on VRF that CE connect to. 

Screenshot (420).pngScreenshot (421).pngScreenshot (422).png

View solution in original post

22 Replies 22

Hi,

it can be used in different scenarios or in provider network.

https://www.cisco.com/c/en/us/td/docs/ios/12_2sb/12_2sba/feature/guide/sbcpopt.html

https://community.cisco.com/t5/wireless-mobility-knowledge-base/dhcp-option-82-service-provider-wi-fi/ta-p/3137080

Normally, in LAN it is not used if you don't have specific requirement. But why do we see it frequently, because of DHCP snooping. When you enable DHCP snooping on switch (mostly, access layer switch), it by default inserts option-82. And on upstream devices you should take care of configuration so DHCP packets with option-82 is not ignored (Or, you simple disable option-82 insertion on dhcp snooping enabled switch).

HTH,
Please rate and mark as an accepted solution if you have found any of the information provided useful.

So @Kanan Huseynli , 

basically u are saying when dhcp snooping is enable it inserts option-82?

I was thinking the same too, but I  am pretty sure I saw a cisco documentation that enables dhcp snooping without op-82.

nwekechampion_0-1680839067154.png

 

Also what is the purpose of opt-82 if I can relay my dhcp request without it to the dhcp server and client still gets an ip?

 

Also the doc sent says it provides additional security, but does not clarify how it does that (with or without dhcp snooping).

nwekechampion_0-1680839402366.png

Also what is common use case for dhcp snooping?

Why op-82?

DHCP assign ip from pool to host if dhcp request receive from interface match defualt router config under dhcp pool'

Now what if I want to give host connect to SW1 different IP that host connect to SW2 ( give ip from same subnet)??

Here op-82 play rule' it can add info. About Sw port vlan host connect to. This info. Will send with dhcp request and dhcp server will use it to assign different range of ip to hosts connect to different sw.

Hi @MHM Cisco World ,

 

But dhcp relay does it anyway without option-82 included.

PLease can you clarify?

I have two category in my company sales and engineer hosts and all in one subnet (VLAN), and there is DHCP relay router.
how can I info. the DHCP server about give specific portion of subnet to sales and give other portion of subnet to engineer ??
this done with op-82 
you can add op-82 to dhcp request receive rom host which will later use by DHCP server to assign correct IP <<- NOTE that both DHCP request from sales and engineer hosts will have same DHCP relay IP. 

other example, 
the WLC and Wireless connect to it, 
WLC act as DHCP relay, 
now how DHCP server know that this DHCP request come from specific AP with specific SSID ??
the answer is op-82 

hope this clear the idea of op-82 in DHCP 

hi @MHM Cisco World ,

So if  I am to understand you correctly, we can use option-82 to to give dhcp different dhcp addresses within the same scope to a clients in the same subnet? This is the first I am hearing of this. If so can you give me a high-level of how that works from end-to-end?

With WLC, I have ssid running with dhcp relay without option-82 and it works fine. So my previous question, is it really neccessary to have it enabled?

are it clear now or not ?  
thanks 
MHM

M02@rt37
VIP
VIP

Hello @nwekechampion 

As i Concerned,  option 82 is used to enforce access policies based on the location of the client device on the network. It's also used to allocate IP addresses based on the subnet or relay agent interface through which the client device is connected.

By definition, DHCP option 82 is a DHCP relay agent information option that is used to provide additional information to the DHCP server about the location of the client device on the network. This option is used when a DHCP relay agent is deployed to forward DHCP messages between the DHCP client and server in a multi-subnet network environment.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

thanks M02@rt37 ,

 

But what is a use-cae for this (enforcement of policies).

I am pretty sure you can still do a relay successfully with out op-82 enabled.

When you say a multi-subnet environment, can you break that down please, what do you mean? Aren't all use cases for dhcp relay a multi-subnet environment with dhcp relay agent in gateway?

You're correct @nwekechampion.

Regarding the term "multi-subnet environment," it refers to a network architecture where there are multiple subnets or network segments within the same physical network. In such an environment, DHCP clients located in different subnets need to communicate with a DHCP server located in another subnet. This is where DHCP relay agents come in, as they are used to forward DHCP messages from the client's subnet to the server's subnet.

In a multi-subnet environment, a DHCP relay agent is typically deployed on a router or layer 3 switch that connects the subnets. The relay agent intercepts DHCP messages broadcast by clients on one subnet and forwards them to a DHCP server located on another subnet. The DHCP server then responds with the appropriate DHCP information, which is relayed back to the client via the relay agent.

So, to answer your question, yes!! All use cases for DHCP relay involve a multi-subnet environment with a DHCP relay agent deployed on the gateway device connecting the subnets.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Yes, but why do i need option-82, if it all works well without it, that is my main question.

What extra information does op-82 need to pass across to dhcp server, if I can relay my DHCP with an agent, without op-82?

nwekechampion
Level 3
Level 3

Hi guys,

From what I can gather, option-82 is mainly used when we have dhcp snooping enabled on a switch that connects to relay agent or has the relay-agent running on it. In this case DHCP option-82 allows the switch to pass on information from the untrusted dhcp ports to trusted dhcp replier (DHCP-Server).

Else their would not be any need for op-82 as they would just work fine without it.