Introduction to Failover Events and Routing Convergence
A failover event occurs when a network component (link, node, or protocol adjacency) becomes unavailable and the routing system selects an alternate path to maintain reachability. Routing convergence is the process whereby all routers in a domain agree on a consistent set of best‑path routes after a topology change. Convergence is measured from failure detection to the installation of a new forwarding entry in the Routing Information Base (RIB) and its propagation to the Forwarding Information Base (FIB).
Traditional convergence validation focuses on reachability and loop‑free topology. In environments where segmentation boundaries (VRFs, security groups, micro‑segment policies) enforce who may talk to whom, a converged route may still be policy‑incorrect if it forwards traffic across a boundary that the original design forbade. Consequently, policy correctness must be treated as a first‑class convergence metric: the network is not truly converged until the selected path satisfies both routing optimality and the applicable segmentation policy.
Understanding Segmentation Boundaries and Policy Constraints
Overview of Segmentation Boundaries
Segmentation boundaries are logical partitions that isolate traffic based on trust domains, tenant identity, or application tiers. Common implementations include:
| Boundary Type | Typical Technology | Enforcement Point |
|---|---|---|
| VRF‑lite / VRF‑aware routing | Cisco IOS‑XR, Juniper Junos, Arista EOS | RIB/FIB lookup (vrf‑aware) |
| VXLAN‑based overlay | Cisco Nexus 9000, VMware NSX, Linux VXLAN | VTEP encapsulation/decapsulation |
| Security groups / micro‑segmentation | AWS Security Groups, Azure NSR, Cisco ACI contracts, Calico | Host‑based or distributed firewall |
| ACL‑based zones | Cisco ASA, Palo Alto, nftables/iptables | Inline packet filter |
| Policy‑based routing (PBR) | Route‑maps, policy‑routing tables | Prior to FIB lookup |
Each boundary defines an identity selector (e.g., VRF name, VNI, security‑group tag) and a set of allow/deny rules that decide whether a packet may traverse from one selector to another.
Types of Policy Constraints and Their Impact on Routing
- Static ACLs / firewall rules – applied after routing lookup; a route may be installed but packets dropped if the ACL denies the flow.
- VRF import/export maps – control which prefixes may leak between VRFs; a route learned in the wrong VRF is ignored even if the underlying IGP advertises it.
- Overlay segmentation (VNI, VLAN) – encapsulation adds a tenant identifier; mis‑matched VNI results in drop at the VTEP.
- Distributed policy engines (e.g., Calico, Cilium) – evaluate policies based on labels; a route may be valid but the policy engine denies based on workload labels.
- Route‑map based PBR – can override the routing table; a mis‑ordered route‑map may send traffic to a next‑hop that lies outside the allowed segmentation domain.
When a primary path is forbidden by any of these constraints, operators rely on the routing protocol to avoid installing that path. However, if the routing protocol’s decision process does not consider the constraint (e.g., OSPF metric only), a backup path that does violate the constraint may become the new best path after a failure, leading to a policy‑drift failover.
Analyzing the Failover Event
Identifying the Primary and Backup Paths
Consider a three‑tier application:
- Web tier – VRF
WEB, VNI 5010, SGweb-sg - App tier – VRF
APP, VNI 5020, SGapp-sg - DB tier – VRF
DB, VNI 5030, SGdb-sg
Intended communication flow: WEB → APP → DB. Segmentation policy explicitly denies any direct WEB → DB flow (no inter‑VRF import/export, no security‑group rule allowing web-sg to db-sg).
Normal operation
-
Primary path:
WEB→ (leaf switch) →APP→ (leaf switch) →DB.- Routing: OSPF intra‑area cost 10 each hop.
- Policy: VRF
WEBimports only routes withrt:65000:100(APP) – DB routes filtered by an import‑map. - Security:
web-sgallows TCP 80/443 toapp-sgonly.
-
Backup path (pre‑computed but unused):
WEB→ (transit leaf) →DBdirectly (via a shared core link).- Routing: OSPF cost via core = 5 + 5 = 10 (same as two‑hop via APP). Tie‑break uses lower router‑ID, so the primary path wins.
How the Backup Path Crosses a Segmentation Boundary
When the link between WEB leaf and APP leaf fails, OSPF recomputes:
- The direct
WEB → DBlink now has cost 10 (equal to the two‑hop via APP). - OSPF’s tie‑break (lowest neighbor router‑ID) selects the direct link as the new best path.
The resulting FIB entry in VRF WEB points to the DB next‑hop without any VRF import‑map check because the route was learned via OSPF inside the same VRF (the DB prefix is redistributed into OSPF from the DB VRF via a static route with vrf DB and redistribute static into OSPF under vrf WEB). The import‑map that should have blocked DB prefixes is missing on the WEB VRF due to a recent configuration push that omitted the import map line. Consequently, the backup path crosses the segmentation boundary that was intended to forbid direct WEB ↔ DB traffic.
Implications of Policy Correctness on Convergence Validation
If validation only checks show ip route vrf WEB and sees a valid route to the DB subnet, the event would be reported as “converged”. However, the policy path (VRF import‑map → security‑group ACL) would deny the flow, resulting in a blackhole despite routing convergence. Therefore, convergence validation must include a policy‑correctness check: verify that the selected next‑hop resides in a domain allowed by all applicable segmentation policies for the source VRF/security‑group.
Troubleshooting the Failover Event
Identifying the Root Cause
- Detect the symptom – users report loss of DB connectivity from web servers; ping to DB IP fails.
- Check routing –
show ip route vrf WEB <db-prefix>reveals a route via the direct core next‑hop. - Check policy –
show vrf import map WEBreturns “% No import map configured”. - Correlate – the missing import map explains why the DB prefix was allowed into VRF
WEB.
Analyzing Routing Tables and Logs
- OSPF logs (
show logging | include OSPF) show the LSDB change and SPF run after the link loss. - RIB/FIB (
show ip route vrf WEB db-prefix detail) displays the next‑hop IP and the originating protocol (OSPF). - Forwarding plane (
show ip cef vrf WEB db-prefix) confirms the hardware entry points to the core MAC.
CLI Commands to Validate Routing Configuration
| Platform | Command | Purpose |
|---|---|---|
| Cisco IOS‑XR | show route vrf WEB <prefix> | Verify RIB entry |
| Cisco IOS‑XR | show ospf vrf WEB database | Confirm LSDB contents |
| Cisco IOS‑XR | show vrf import map WEB | Detect missing import‑map |
| Juniper Junos | show route routing-table WEB <prefix> | RIB check |
| Juniper Junos | show ospf vrf WEB database | LSDB |
| Juniper Junos | show policy-options policy-statement WEB-IMPORT | Import policy |
| Arista EOS | show ip route vrf WEB <prefix> | RIB |
| Arista EOS | show ip ospf vrf WEB database | LSDB |
| Linux (VRF) | ip -d route show vrf WEB <prefix> | RIB |
| Linux (VRF) | vtysh -c "show ospf vrf WEB database" (if FRR) | LSDB |
If the import‑map is absent, the root cause is a policy‑drift introduced during a recent change (e.g., a template update that omitted the import‑map stanza).
Code and CLI Examples for Validation
Using CLI to Verify Routing Configuration
# Cisco IOS‑XR – check that the DB prefix is NOT imported into VRF WEB
show route vrf WEB 10.100.200.0/24
% Network is not in table
# If the route appears, verify the import-map:
show vrf import map WEB
Import map: WEB-IMPORT
Match ip address prefix-list WEB-ALLOWED
Set vrf WEB
If the output shows “% No import map configured”, the policy is missing.
Example Code for Validating Policy Correctness (Python + Netmiko)
from netmiko import ConnectHandler
def check_policy_convergence(device, vrf, src_sg, dst_prefix):
"""
Returns True if the selected path for dst_prefix in vrf respects
segmentation policy (import-map + security-group).
"""
ssh = ConnectHandler(**device)
# 1. Get the best‑path next‑hop
out = ssh.send_command(f"show route vrf {vrf} {dst_prefix} | include via")
# Example output: "via 10.0.0.5, Ethernet0/0"
nhop = out.split()[1] # extract next‑hop IP
# 2. Verify that the next-hop belongs to an allowed VRF/SG
# a) Check import-map for vrf
import_map = ssh.send_command(f"show vrf import map {vrf}")
if "No import map configured" in import_map:
ssh.disconnect()
return False # policy missing → potential leak
# b) Check that the prefix is permitted by the import-map's prefix-list
pl_name = ssh.send_command(f"show vrf import map {vrf} | include Match")
pl_name = pl_name.split()[-1] # assume format "Match ip address prefix-list <name>"
pl_out = ssh.send_command(f"show ip prefix-list {pl_name}")
if dst_prefix not in pl_out:
ssh.disconnect()
return False # prefix not allowed by import-map
# c) Verify security-group (example using Cisco ACI REST, omitted for brevity)
# For illustration, we assume a local ACL check:
acl_out = ssh.send_command(f"show access-lists | include {nhop}")
if "deny" in acl_out and src_sg in acl_out:
ssh.disconnect()
return False # ACL blocks traffic to next-hop
ssh.disconnect()
return True
# Usage
device = {
'device_type': 'cisco_xr',
'host': '10.0.0.1',
'username': 'admin',
'password': '*****',
}
print(check_policy_convergence(device, vrf='WEB', src_sg='web-sg',
dst_prefix='10.100.200.0/24'))
The function returns False when either the import‑map is missing or the prefix is not permitted, indicating a policy‑incorrect convergence.
Debugging Commands for Troubleshooting Failover Events
- OSPF debug (caution in production):
debug ospf events/debug ospf spf. - VRF import‑map trace:
show vrf import map <vrf> detail. - Packet capture at the enforcement point to confirm drop:
- Cisco:
monitor capture mycap interface Gig0/0/0/0 both - Linux:
tcpdump -i vrf-WEB -nn dst 10.100.200.0/24
- Cisco:
- Policy engine logs (e.g., Calico):
calicoctl node statusandcalicoctl get felixconfiguration -o yaml.
Scaling Limitations and Considerations
Impact of Network Size on Failover Events and Convergence
- State explosion – each additional VRF/security‑group multiplies the number of import‑maps and ACLs that must be kept in sync with routing protocols.
- Convergence time – in large‑scale fabrics (e.g., Clos with hundreds of leafs), OSPF/IS‑IS SPF runs can take seconds; during that window, a transient micro‑loop may forward traffic across a boundary before the policy engine updates.
- Policy distribution lag – centralized policy controllers (e.g., Cisco DNA Center, VMware NSX) may push updates asynchronously; if a routing change occurs before the policy push, a temporary policy violation can appear.
Scaling Policy Constraints and Segmentation Boundaries
- Hierarchical VRFs – use a parent VRF for broad transit and child VRFs for tenant isolation; import‑maps can be inherited, reducing per‑tenant configuration.
- Policy as code – store import‑maps, ACLs, and security‑group definitions in a Git repo; CI pipelines render device‑specific configs (e.g., using Jinja2 templates) and run
pyATSorAnsiblevalidation jobs before committing. - Aggregated prefix‑lists – instead of per‑tenant prefix‑lists, aggregate by address range and use community‑based filtering (e.g., BGP communities) to signal membership, reducing the number of objects.
Best Practices for Mitigating Scaling Limitations
- Decouple routing decisions from policy – rely on routing protocols for reachability only; enforce segmentation strictly at the egress point (firewall, security‑group, VRF import).
- Implement pre‑change validation – use tools like
batfish,forward networks, orCisco Network Conductorto simulate the effect of a config change on both RIB and policy before push. - Continuous compliance – run periodic jobs that compare the effective policy (as seen by the data plane) against the desired policy stored in version control; alert on drift.
- Fail‑fast design – configure routing protocols to ignore prefixes that fail import‑map checks (e.g., use
route-policyto drop rather thanmaximum-pathswithbgp bestpath as-path ignore). - Monitor convergence metrics – track not only RIB convergence time but also policy convergence latency (time from routing change to policy update enforcement).
Validation of Convergence with Policy Correctness
True convergence is achieved only when the data plane forwards traffic along a path that is both routably optimal and policy‑compliant. Validation should therefore:
- Confirm RIB/FIB installation of the expected prefix.
- Verify segmentation enforcement (import‑map, security‑group, ACL) permits the flow from the source VRF/security‑group to the destination.
- Measure end‑to‑end latency from failure detection to policy‑correct forwarding, ensuring no blackhole or micro‑loop persists.
By integrating policy checks