host refuses the dotted MAC that show mac address-table prints, and show ip dhcp binding <mac> answers a MAC lookup as an address #1861
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1861
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three answers to one question: what is a hardware address?
show mac address-table,show arp,show interfaces <port>andshow vrrpprint a MAC dotted -0200.0000.0001. The DHCP engine accepts that spelling too:dhcp.normalizePool()canonicalisesAABB.CC00.0005ontoaa:bb:cc:00:00:05(test/dhcp.test.jspins it). The DHCP console does not. It decides what a MAC is with three private shapes of its own - a colon-only regex inhost(engine/cli.js), a/:/.test(...)inno host, and a third copy in theshow ip dhcp bindingfilter - so the address the box prints is refused, and a MAC lookup is answered as an address lookup.Reproduction (origin/main,
ISR 4331)It is a MAC: six hex pairs, in the notation the console prints on every table it shows.
host 192.168.10.105 aa:bb:cc:00:00:99is accepted; the same 48 bits, dotted, are refused and the refusal says the token is neither an address nor a MAC.The same defect at the other site - a lease held by
02:00:00:00:00:0a:There is no address
0200.0000.000a; the token was a MAC, the lease is held by exactly that MAC, and the message answers a question that was not asked.no hostcarries the third copy, so a reservation would be addable in one spelling and unfindable in another.Expected
One rule -
net.macToInt(), the engine's own - should answer "is this token a hardware address?", so the colon, hyphen and dotted spellings all work inhost,no hostandshow ip dhcp binding <mac>, the reservation is stored once under the canonical form, and a miss echoes the token that was typed.Out of scope, and worth its own note:
show ip dhcp bindingprints its MACs colon-separated while the rest of the console prints them dotted. That is a display question (the colon form is also whathostechoes back), so this issue is about accepting every spelling, not about changing what the table prints.