Friday, November 8, 2019

DHCP-Option 82 & Concatenation


Some of the major ISP’s use Option 82 to track their end devices. These information’s contains details like to which port end devices have connected, area from which they are connected etc.

In other words, we can say Option 82 is used to provide additional information on the physical attachment of the client.

The option 82 can also be used for link selection and assigning the correct IP address etc.; we are going to discuss only about concatenating a packet with Option 82.

Before we hop into the actual discussion; it is important to understand each terminology.

Concatenation- Joining or linking information multiple packets to one.

OLT- Optical Light Terminal. (Used in Optical Fiber transmission)

ONT-Optical Network Terminal. (Device used to convert your optical light packets to ethernet frame packets)

CPE- Customer Premises Equipment (An Access point or something commonly known as a router-used in homes)

Relay Agent- Relay agents are used to forward requests and replies between clients and servers when they are not on the same physical subnet.

I came across this scenario when I was in a deployment for a customer, a well-known ISP; who had a requirement to concatenate an ACS URL along with option 82. 

This can also be used for all the concatenation scenarios.

Now, for those who are keen to know more about the Option 82 data-frame and what an ACS server is, keep reading.

For those who already know; you may skip to the DHCP part.

Option 82


Option 82 is a data-frame which contains sub options like circuit-id (subopt. 1), remote-id (subopt. 2), Vendor Specific (subopt. 9) etc. Below shows the data-frame for Option 82:





If you capture the data in Wireshark; you may see something like below:




ACS Server


The ACS server is the one which collects the information forwarded by the DHCP server; register’s the user info, VLAN ID etc. and pushes the global config to the end customers (something like group policies being pushed in Active Directory) for PnP devices.

DHCP Server


The DHCP server, gets the client request from the CPE end device which is forwarded by the Relay Agent.  The traffic flow is shown below:




For those who are yearning to know the configuration; below is the snippet from ISC-DHCP:

if exists agent.circuit-id
{
option vendor-encapsulated-options = concat ("\x01\x64http://<IP Address:Port Number>/ACS-server/ACS/",(option agent.circuit-id));
}

if not exists agent.circuit-id
{
option vendor-encapsulated-options "\x01\x39http://<IP Address:Port Number>/ACS-server/ACS";
}

Once the configuration is in place; the DHCP server strips the Circuit ID that it received in Option 82 and then concatenates the packet in its response (OFFER and ACK) in Option 43 (Need to configure as return option in the DHCP server itself).

Below is the traffic capture snippet of DHCP server response in its OFFER packet as shown below:




Same process is repeated in the REQUEST and ACK transactions. 

1 comment:

PING - Useful Tips

PING (Packet InterNet Groper) is a utility used for testing network connectivity between 2 systems. When we say system; this...