Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

DHCP Option 82 SG300, How to decipher circuitid bytes

Hey guys,

I'm having trouble figuring out the meaning of the bytes in Option82 that Cisco's SG300 switches send. The switch is in l3 mode, and I have dhcp relay setup and working great.

Looking at the packet captures, the switch always sends it's MAC address as the remote-id in option 82:

Option 82 Suboption: (2) Agent Remote ID

Length: 8

Agent Remote ID: 000634bdc8xxxxxx

34:bd:c8 is an OUI registered to Cisco Systems.

I'm having trouble deciphering the circuitid. The last couple bytes have something to do with the port:

Port 1:

0004007d0131

Port 2:

0004007d0132

Port 3

0004007d0133

Port 4

0004007d0134

Port 49:

0004007d0161

Port 50:

0004007d0162

But really what makes me scratch my head is the byte 'd' following the 0004007, call it the mystery digit. This byte systems to have a meaning connected to the type of device immediately connected. When I connected a computer, there is a 'd' there. When I connect an aastra phone, I get a '8'. When I connected a Ubiquiti networks AP, I got a '7'.

I can't figure out the numbering scheme for ports nor the meaning of the mystery digit. Any help appreciated!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Green

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

Hi Jonathan with sub option 2, from your example D is the node identifier.

When seeing the variable per connection type, I would give a safe assumption it is verbose padding the sub type 1.

The verbose pad formatting for the packet should contain

sub option

length

node identifier

port type

interface number

vlan id

For normal pad format it should contain

sub option

length

circuit

length

vlan id

interface number

-Tom
Please mark answered for helpful posts

-Tom Please mark answered for helpful posts http://blogs.cisco.com/smallbusiness/
Green

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

Jonathan, there is not documentation. Here is the break down on the example.

0004007d0133

00 - circuit

040 - length

007d-VID=125

0133-global ID

-Tom
Please mark answered for helpful posts

-Tom Please mark answered for helpful posts http://blogs.cisco.com/smallbusiness/
7 REPLIES
Green

DHCP Option 82 SG300, How to decipher circuitid bytes

Hi Jonathan, DHCP option 82 can support 2 sub options, the circuit ID and remote ID. There is not a unified definition and varies from vendor to vendor.

With the sub option 1, circuit ID there is verbose padding which inserts the node identifier which is what you are seeing.

-Tom
Please mark answered for helpful posts

-Tom Please mark answered for helpful posts http://blogs.cisco.com/smallbusiness/
New Member

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

Hey Tom, first, thank you for your answer. I really appreciate you taking a crack at it.

The option82 information here is being inserted by the Cisco switch. I completely get what you're saying when you said it varies from vendor to vendor.

So in this particular case, the vendor is Cisco and I'm trying to figure out what information Cisco is sending in the option 1 field. I've figured it out it has _something_ to do with which port # the device is connected on, but the rest of the bytes are a mystery.

Green

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

Hi Jonathan with sub option 2, from your example D is the node identifier.

When seeing the variable per connection type, I would give a safe assumption it is verbose padding the sub type 1.

The verbose pad formatting for the packet should contain

sub option

length

node identifier

port type

interface number

vlan id

For normal pad format it should contain

sub option

length

circuit

length

vlan id

interface number

-Tom
Please mark answered for helpful posts

-Tom Please mark answered for helpful posts http://blogs.cisco.com/smallbusiness/
New Member

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

Is there documentation laying around about the verbose padding format? The hex bytes still aren't making any sense.

Green

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

Jonathan, there is not documentation. Here is the break down on the example.

0004007d0133

00 - circuit

040 - length

007d-VID=125

0133-global ID

-Tom
Please mark answered for helpful posts

-Tom Please mark answered for helpful posts http://blogs.cisco.com/smallbusiness/
New Member

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

In case this helps anyone else,

Port #3:

0x0133 = 307 in base10

307 - 304 = 3

Port #50

0x0162 = 354

54 - 304 = 50

304 is some sort of magic constant it seems.

New Member

Re: DHCP Option 82 SG300, How to decipher circuitid bytes

The SG300 uses the type 1 circuit-id format, which goes like this:

 

byte 1 - "1" indicates option 1 format

byte 2 - length of the circuit-id option in bytes, but it is always "4" for option 1

bytes 3 & 4 - VLAN id

byte 5 - Slot number; always "1" on SG300 switches

byte 6 - Port number; this is the SNMP ifIndex number

 

On the SG300 switches that I've checked, gi1 starts at ifIndex 49 and are numbered consecutively.  But ifIndex numbers do not have to be consecutive.

 

You can find out your ifIndex to name mapping, by snmpwalk'ing the ifDescr table.

 

This is what that looks like:

 

tom$ snmpwalk -v2c -c yourcommunity my-sg300.domain.com ifDesc
IF-MIB::ifDescr.49 = STRING: gigabitethernet1
IF-MIB::ifDescr.50 = STRING: gigabitethernet2
IF-MIB::ifDescr.51 = STRING: gigabitethernet3
IF-MIB::ifDescr.52 = STRING: gigabitethernet4
IF-MIB::ifDescr.53 = STRING: gigabitethernet5
IF-MIB::ifDescr.54 = STRING: gigabitethernet6
IF-MIB::ifDescr.55 = STRING: gigabitethernet7
IF-MIB::ifDescr.56 = STRING: gigabitethernet8
IF-MIB::ifDescr.57 = STRING: gigabitethernet9
IF-MIB::ifDescr.58 = STRING: gigabitethernet10
IF-MIB::ifDescr.59 = STRING: gigabitethernet11
IF-MIB::ifDescr.60 = STRING: gigabitethernet12
IF-MIB::ifDescr.61 = STRING: gigabitethernet13
IF-MIB::ifDescr.62 = STRING: gigabitethernet14
IF-MIB::ifDescr.63 = STRING: gigabitethernet15
IF-MIB::ifDescr.64 = STRING: gigabitethernet16
IF-MIB::ifDescr.65 = STRING: gigabitethernet17
IF-MIB::ifDescr.66 = STRING: gigabitethernet18
IF-MIB::ifDescr.67 = STRING: gigabitethernet19
IF-MIB::ifDescr.68 = STRING: gigabitethernet20
IF-MIB::ifDescr.69 = STRING: gigabitethernet21
IF-MIB::ifDescr.70 = STRING: gigabitethernet22
IF-MIB::ifDescr.71 = STRING: gigabitethernet23
IF-MIB::ifDescr.72 = STRING: gigabitethernet24
IF-MIB::ifDescr.73 = STRING: gigabitethernet25
IF-MIB::ifDescr.74 = STRING: gigabitethernet26
IF-MIB::ifDescr.75 = STRING: gigabitethernet27
IF-MIB::ifDescr.76 = STRING: gigabitethernet28
IF-MIB::ifDescr.77 = STRING: gigabitethernet29
IF-MIB::ifDescr.78 = STRING: gigabitethernet30
IF-MIB::ifDescr.79 = STRING: gigabitethernet31
IF-MIB::ifDescr.80 = STRING: gigabitethernet32
IF-MIB::ifDescr.81 = STRING: gigabitethernet33
IF-MIB::ifDescr.82 = STRING: gigabitethernet34
IF-MIB::ifDescr.83 = STRING: gigabitethernet35
IF-MIB::ifDescr.84 = STRING: gigabitethernet36
IF-MIB::ifDescr.85 = STRING: gigabitethernet37
IF-MIB::ifDescr.86 = STRING: gigabitethernet38
IF-MIB::ifDescr.87 = STRING: gigabitethernet39
IF-MIB::ifDescr.88 = STRING: gigabitethernet40
IF-MIB::ifDescr.89 = STRING: gigabitethernet41
IF-MIB::ifDescr.90 = STRING: gigabitethernet42
IF-MIB::ifDescr.91 = STRING: gigabitethernet43
IF-MIB::ifDescr.92 = STRING: gigabitethernet44
IF-MIB::ifDescr.93 = STRING: gigabitethernet45
IF-MIB::ifDescr.94 = STRING: gigabitethernet46
IF-MIB::ifDescr.95 = STRING: gigabitethernet47
IF-MIB::ifDescr.96 = STRING: gigabitethernet48
IF-MIB::ifDescr.97 = STRING: gigabitethernet49
IF-MIB::ifDescr.98 = STRING: gigabitethernet50
IF-MIB::ifDescr.99 = STRING: gigabitethernet51
IF-MIB::ifDescr.100 = STRING: gigabitethernet52
IF-MIB::ifDescr.1000 = STRING: Po1
IF-MIB::ifDescr.1001 = STRING: Po2
IF-MIB::ifDescr.1002 = STRING: Po3
IF-MIB::ifDescr.1003 = STRING: Po4
IF-MIB::ifDescr.1004 = STRING: Po5
IF-MIB::ifDescr.1005 = STRING: Po6
IF-MIB::ifDescr.1006 = STRING: Po7
IF-MIB::ifDescr.1007 = STRING: Po8
IF-MIB::ifDescr.3000 = STRING: tunnel1
IF-MIB::ifDescr.7000 = STRING: loopback1
IF-MIB::ifDescr.20000 = STRING: Logical-int 1
IF-MIB::ifDescr.100000 = STRING: 1
IF-MIB::ifDescr.100001 = STRING: 2
IF-MIB::ifDescr.100002 = STRING: 3
IF-MIB::ifDescr.300000 = STRING: 2

 

 

 

 

720
Views
0
Helpful
7
Replies