Skip to content
Guides & References

IOS-XE routing authentication

Worked examples for Cisco IOS-XE routing authentication: MD5 area authentication on every OSPF process, and a password on BGP neighbours.

Policy LibraryUpdated
Platform
Cisco IOS-XE
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

IOS-XE routing authentication

Rules that stop a rogue device from joining your routing. Without authentication, anything that can talk OSPF or BGP to the router can send it routes. They come from the ios-routing-authentication policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 5 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. A card marked changed has one line edited to show a failure.

All the rules come from ios-routing-authentication.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 Cisco IOS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
OSPF area authentication evaluate_block 8.3.0
BGP neighbour password must_match_regex 8.0.0

OSPF area authentication

This rule checks every router ospf block on its own. Each one needs an area ... authentication message-digest line. A config with no OSPF process fails, because the rule’s scope finds nothing to check.

Definition
// Every OSPF process enables message-digest authentication for an area (area ... authentication message-digest)
#[evaluate_block]
scope: ^router ospf
all:
- regex: '/^\s*area \S+ authentication message-digest/m'
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
router ospf 1
router-id 192.0.2.12
area 0 authentication message-digest
passive-interface default
no passive-interface Vlan99
network 192.0.2.0 0.0.0.255 area 0
!

Why: OSPF process 1 uses MD5 authentication for area 0.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic), changed: area authentication line removed
router ospf 1
router-id 192.0.2.12
passive-interface default
no passive-interface Vlan99
network 192.0.2.0 0.0.0.255 area 0
!

Why: OSPF process 1 has no area authentication. The result names router ospf 1.

failFailing config: Cisco 1921 lab sample (IOS 15.7)
router bgp 64500
bgp log-neighbor-changes
network 192.0.2.1
!

Why: There is no router ospf block at all. The reason says no config block matched the scope.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing config 1failFAIL
Failing config 2failFAIL

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 IOS 15.7 (lab) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


BGP neighbour password

A BGP password adds TCP MD5 authentication to the session, so a spoofed peer cannot reset it or inject routes. This rule passes when at least one neighbor ... password line is there. It does not check that every neighbour has one.

Definition
// At least one BGP neighbor has a password (neighbor ... password)
#[must_match_regex]
/^\s*neighbor .+ password .+$/m
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
router bgp 64496
bgp router-id 192.0.2.12
bgp log-neighbor-changes
neighbor 192.0.2.1 remote-as 64497
neighbor 192.0.2.1 description WAN edge
neighbor 192.0.2.1 password 7 EXAMPLEONLY0000
!

Why: The neighbour 192.0.2.1 has a password.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic), changed: neighbor password line removed
router bgp 64496
bgp router-id 192.0.2.12
bgp log-neighbor-changes
neighbor 192.0.2.1 remote-as 64497
neighbor 192.0.2.1 description WAN edge
!

Why: No neighbour has a password.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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 IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.