cli: one ip name-server line carries up to six addresses, in typed order #2013

Merged
jaylouisw merged 2 commits from rev/1118-1731 into main 2026-11-18 18:08:56 +00:00
Owner

Question. How many addresses does one ip name-server line carry, and whose order wins?

Verdict. All of them, space separated, in typed order, up to six on the line and six on the box - and the first address is the primary. ip name-server 172.16.1.111 172.16.1.2 used to store the first address, print a receipt that read like the whole line was taken, and silently drop the second (defect class of #2004).

Evidence. Cisco IOS XE 17.x IP Addressing Configuration Guide (Configuring DNS) - server-address1 [server-address2 ... server-address6], "up to six", worked example with two addresses; the IP Addressing Services Command Reference parameter table - "a maximum of six name servers"; the Aironet 15.3(3)JB guide - "Separate each server address with a space. The first server specified is the primary server."

Change. engine/cli.js: every word on the line is validated before anything is stored; addresses are appended in typed order; an address already configured is not counted twice; a line that would exceed six on the line or on the box is refused with nothing configured. test/ip-name-server-list.test.js (23 assertions) covers all of it plus the unchanged single-address, bare-command and bad-address paths. research/ip-name-server-list.md records what is known, inferred and unresolved. docs/CLI.md printer/refusal rows updated.

Gates. node scripts/syntax-check.js 420 files OK; full npm test 346 suites, 12,005 assertions, 0 failed.

Unresolved. The exact IOS sentence for a seventh address; whether a second line appends or replaces (Cisco Business 250/350 boxes say replace, IOS examples show accumulate); whether show running-config groups the list on one line (IOS XE guide) or one line per address (fundamentals guide sample); whether no ip name-server <addr> removes one server or clears the list.

**Question.** How many addresses does one `ip name-server` line carry, and whose order wins? **Verdict.** All of them, space separated, in typed order, up to six on the line and six on the box - and the first address is the primary. `ip name-server 172.16.1.111 172.16.1.2` used to store the first address, print a receipt that read like the whole line was taken, and silently drop the second (defect class of #2004). **Evidence.** Cisco IOS XE 17.x IP Addressing Configuration Guide (Configuring DNS) - `server-address1 [server-address2 ... server-address6]`, "up to six", worked example with two addresses; the IP Addressing Services Command Reference parameter table - "a maximum of six name servers"; the Aironet 15.3(3)JB guide - "Separate each server address with a space. The first server specified is the primary server." **Change.** `engine/cli.js`: every word on the line is validated before anything is stored; addresses are appended in typed order; an address already configured is not counted twice; a line that would exceed six on the line or on the box is refused with nothing configured. `test/ip-name-server-list.test.js` (23 assertions) covers all of it plus the unchanged single-address, bare-command and bad-address paths. `research/ip-name-server-list.md` records what is known, inferred and unresolved. `docs/CLI.md` printer/refusal rows updated. **Gates.** `node scripts/syntax-check.js` 420 files OK; full `npm test` 346 suites, 12,005 assertions, 0 failed. **Unresolved.** The exact IOS sentence for a seventh address; whether a second line appends or replaces (Cisco Business 250/350 boxes say replace, IOS examples show accumulate); whether `show running-config` groups the list on one line (IOS XE guide) or one line per address (fundamentals guide sample); whether `no ip name-server <addr>` removes one server or clears the list.
cli: one ip name-server line carries up to six addresses, in typed order
Some checks failed
CI / Classify the change (pull_request) Successful in 7s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 20) (pull_request) Successful in 47s
CI / Arm auto-merge (pull_request) Has been cancelled
CI / Test (Node 18) (pull_request) Has been cancelled
CI / Test (Node 22) (pull_request) Has been cancelled
b509f2e7d1
`ip name-server 172.16.1.111 172.16.1.2` stored the first address, answered
"Name server 172.16.1.111", and threw the second away silently - a documented
command form losing half its configuration without a word (the defect class of
#2004). The vendor syntax is `server-address1 [server-address2 ... server-address6]`
with the first address the primary, so the line is a list: every address is now
validated before anything is stored, appended in typed order, and a line that
would exceed six - on the line or on the box - is refused with nothing configured.

research/ip-name-server-list.md records what is known (six, space separated, order
is preference), what is inferred (a seventh is a parse error), and what is not
settled (the exact wording for a seventh address, whether a second line appends or
replaces, how running-config groups the list, and whether `no ip name-server <addr>`
removes one server or clears the list).
forgejo-actions force-pushed rev/1118-1731 from b509f2e7d1
Some checks failed
CI / Classify the change (pull_request) Successful in 7s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 20) (pull_request) Successful in 47s
CI / Arm auto-merge (pull_request) Has been cancelled
CI / Test (Node 18) (pull_request) Has been cancelled
CI / Test (Node 22) (pull_request) Has been cancelled
to 3d98b8c44e
All checks were successful
CI / Classify the change (pull_request) Successful in 5s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 7s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 18) (pull_request) Successful in 54s
CI / Test (Node 20) (pull_request) Successful in 54s
CI / Test (Node 22) (pull_request) Successful in 55s
CI / Arm auto-merge (pull_request) Successful in 22s
2026-11-18 18:02:11 +00:00
Compare
forgejo-actions force-pushed rev/1118-1731 from 3d98b8c44e
All checks were successful
CI / Classify the change (pull_request) Successful in 5s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 7s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 18) (pull_request) Successful in 54s
CI / Test (Node 20) (pull_request) Successful in 54s
CI / Test (Node 22) (pull_request) Successful in 55s
CI / Arm auto-merge (pull_request) Successful in 22s
to 8387d4845b 2026-11-18 18:08:51 +00:00
Compare
jaylouisw deleted branch rev/1118-1731 2026-11-18 18:08:58 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2013
No description provided.