12-07-2023 11:49 AM
Hi,
Im running an xr box as dhcp ipv4 server for a lab validation setup. It works fine with one pool, but when using dhcp option 82 subopt 2 (remote-id) as match criteria to use multiple/specific pools, ie assigning ip from a pool based on matching the remoteid this doesnt work, and it defaults back to the 'default' pool.
config as per below where i converted the ascii remote-id '50' to hex '3530' - not sure if this is the correct way to do it
anyone can share insight of what could be wrong ?
thanks
Mark
dhcp ipv4
profile TEST-PROFILE server
lease 0 0 30
pool DEF-POOL
dns-server 10.10.129.2
subnet-mask 255.255.255.255
default-router 10.10.209.1
class TEST-CLASS
pool TEST-POOL
match option remoteid hex 3530
!
!
interface TenGigE0/0/0/0 server profile TEST-PROFILE
interface TenGigE0/0/0/5 server profile TEST-PROFILE
pool vrf default ipv4 TEST-POOL
address-range 10.10.209.1 10.10.209.254
exclude 10.10.209.0 10.10.209.1
exclude 10.10.209.255 10.10.209.255
!
pool vrf default ipv4 DEF-POOL
address-range 10.10.208.1 10.10.208.254
exclude 10.10.208.0 10.10.208.1
exclude 10.10.208.255 10.10.208.255
RP/0/RP0/CPU0:DHCP-SRV#show dhcp ipv4 server binding detail
MAC Address: ec08.6b37.5ced
VRF: default
IP Address: 10.10.208.7
Server IP Address: 10.100.0.7
ReceivedCircuit ID: 101CA7F
InsertedCircuit ID: 101CA7F
ReceivedRemote ID: 50
InsertedRemote ID: 50
12-07-2023 12:03 PM
Hello @Mark Pace Balzan,
You mentioned converting '50' to hex '3530', which seems correct, but in the output of "show dhcp ipv4 server binding detail," the "ReceivedRemote ID" is shown as "50," which might indicate that the device is sending it in decimal format. Ensure that the remote-id sent by the device matches the format specified in your DHCP configuration (hexadecimal).
12-07-2023 12:36 PM
Hi
yes it may appear that way but it is ascii - i could put text in there - reason why i did an ascii to hex conversion
note sure if I need to specify as 0x3530 or pad with zeros
not sure which part is not being liked by xr !
12-07-2023 12:12 PM
Dhcp options 82 is not inserted by default it need dhcp snooping or dhcp relay.
MHM
12-07-2023 12:47 PM
The hex can not add like this 50 will be 3530.
debug ip dhcp server class
Use this see what ( I dont know device insert the op82) send to you then add under class of dhcp.
Hope it work
Good luck
MHM
12-07-2023 01:01 PM
Hi
this is on ios-xr - the debug option available is "debug dhcp ipv4 server" which shows the arriving discover in ascii not hex so cant do what you suggest
the device inserting opt82 remote-id is another asr9k which is dhcp proxy for cpe
Mark
12-07-2023 01:07 PM
The op82 is start with 0x52 and end with 0xff
When you debug dhcp server do you see this hex?
MHM
12-07-2023 01:17 PM
Hi
no i dont see 0x52
this is the relevant part
LC/0/0/CPU0:2023 Dec 7 21:54:46.501 CET: dhcpd[235]: DHCPD: pktRx id 67: option: RELAY_INFORMATION: REMOTE_ID: 50
as you can see its not in hex
nothing with 0x52:
#sh log | inc 0x52
M
12-08-2023 03:01 AM
The command is
Match option X sub-option Y hex Z
X The option is 82 which 0x52 (the command reference and example use decimal not hex' but in case we will try both)
Y is sub-option which is router-id 2
Z is hex of 50 (and here also we will try both 50 and 0x3530)
Hope this work
MHM
12-08-2023 11:15 AM
Hi
the cli will only allow 'X' or 'Y' as fixed options - not as you suggest above
the only 'open' option is 'Z' - and ive tried multiple variations to no avail
so im asking if the configuration in my first post is correct or not ?
thanks for your help
M
12-08-2023 11:30 AM
Do you see sub-option keyword after you enter X
MHM
12-08-2023 11:46 AM
here goes...
RP/0/RSP0/CPU0:R9(config-dhcpv4-server-profile-class)#match option ?
124 Match option 124 vendor-identifying vendor class
125 Match option 125 vendor-indentifying vendor-specific info
60 Match option 60 vendor class id
77 Match option 77 user class
circuitid Match circuit id of option 82 Relay-agent specific class
remoteid Match remote id of option 82 Relay-agent specific class
RP/0/RSP0/CPU0:R9(config-dhcpv4-server-profile-class)#match option remoteid ?
hex Insert hex pattern string
RP/0/RSP0/CPU0:R9(config-dhcpv4-server-profile-class)#match option remoteid hex ?
WORD Enter hex pattern string
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide