Junos interface descriptions
A rule that checks every interface. A description says what is plugged in, and a port that is on with no description is one nobody can account for. It comes from the junos-interfaces policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 2 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template.
All the rules come from junos-interfaces.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Juniper Junos templates page lists the file’s known limitations. Run the rules against show configuration | display set.
| Rule | Method | Since |
|---|---|---|
| Every interface disabled or described | must_not_match_regex |
8.0.2 |
Every interface disabled or described
This rule passes an interface if it has a description line or a disable line of its own. It fails if any interface has neither. The rule is a single regex, so the report does not name the interface.
// Every interface is disabled or has a description (set interfaces <name> disable or set interfaces <name> description)#[must_not_match_regex]/(?:\A|^(?!set interfaces (\S+) [^\n]*\nset interfaces \1 )[^\n]*\n)set interfaces (?!interface-range )(\S+) (?!disable$|description )[^\n]*(?:\nset interfaces \2 (?!disable$|description )[^\n]*)*$(?!\nset interfaces \2 )/mset interfaces ge-0/0/22 disableset interfaces ge-0/0/22 unit 0 family ethernet-switching interface-mode accessset interfaces xe-0/1/0 description "Uplink to br-gwy-fw01 ge-0/0/1"set interfaces xe-0/1/0 unit 0 family ethernet-switching interface-mode trunkset interfaces irb description "Routed VLAN interfaces"set interfaces irb unit 99 description "Switch management"set interfaces irb unit 99 family inet address 192.0.2.21/24set interfaces lo0 description "Routing engine loopback"set interfaces lo0 unit 0 family inet filter input PROTECT-REWhy: ge-0/0/22 is disabled. xe-0/1/0, irb and lo0 each have a description.
set interfaces xe-0/1/0 description "Uplink to br-gwy-fw01 ge-0/0/1"set interfaces xe-0/1/0 unit 0 family ethernet-switching interface-mode trunkset interfaces irb unit 99 description "Switch management"set interfaces irb unit 99 family inet address 192.0.2.22/24set interfaces lo0 unit 0 family inet filter input PROTECT-REWhy: irb has a description only on unit 99, and lo0 has none, so neither has one of its own.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| ISO/IEC 27001:2022 Annex A | A.8.20 |
Tested with: sample excerpts from Junos 15.1 (synthetic) and Junos 23.2 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Juniper Junos policy templates: every rule in
junos-interfaces.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.