Hi every body!
I understand what is option 82 in dhcp but why do we need it ?
The link that I provided has the following:
To solve this problem, a relay agent residing at the switch inserts the relay information option (option 82), which carries information specific to the port
I don't know the field being used. I guess the only way to find out is to sniff the packet.
My question is can we assign ip addreses from same subnet to two interface(SVI , one for vlan 1 and the other for vlan 2) on the same switch?
You could have 2 IP addresses under the SVI belonging to 2 IP subnets.
interface vlan 1
ip address 192.168.1.1 255.255.255.0
ip address 192.168.2.1 255.255.255.0 secondary
When a client on Vlan 1 sends a DHCP request, the giaddr will be of 192.168.1.1 but with the addition of Option 82, the DHCP server can differenciate if the client will belong to 192.168.2.0 or 192.168.1.0 subnet
Is option 42 only used in such cases like above?
Option 82, yes :)
Your understanding is correct.
The portion of the document explains one condition for using Option 82