Skip to content

Static Route

Static routing provides manual route configuration that defines explicit paths for network traffic by specifying destination networks and their associated next-hop addresses or exit interfaces, offering predictable and deterministic routing behavior without the overhead of dynamic routing protocols. It supports advanced features including multiple next-hop addresses for load balancing and redundancy, administrative distance adjustment for path preference, route tagging for policy application, and object tracking for conditional route installation based on network reachability. Static routes are essential for simple network topologies, default route configuration, policy routing, and situations requiring precise control over traffic paths without the complexity and resource consumption of dynamic routing protocols.

Diagram

Diagram

Classes

routing (iosxe.devices.configuration)

NameTypeConstraintMandatoryDefault Value
static_routesList[static_routes]No

static_routes (iosxe.devices.configuration.routing)

NameTypeConstraintMandatoryDefault Value
prefixIPYes
maskIPYes
vrfStringNo
next_hopsList[next_hops]No

next_hops (iosxe.devices.configuration.routing.static_routes)

NameTypeConstraintMandatoryDefault Value
ipIPYes
interface_typeChoiceLoopback, Vlan, GigabitEthernet, TwoGigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, TwentyFiveGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernetNo
interface_idIntegerNo
distanceIntegermin: 1, max: 255No
globalBooleantrue, falseNo
nameStringNo
permanentBooleantrue, falseNo
tagIntegermin: 1, max: 4294967295No
track_idIntegermin: 1, max: 1000No

Examples

iosxe:
devices:
- name: Device1
configuration:
routing:
static_routes:
- prefix: 5.5.5.5
mask: 255.255.255.255
next_hops:
- ip: 7.7.7.7
metric: 10
permanent: true
- prefix: 4.4.4.4
mask: 255.255.255.255
next_hops:
- ip: 8.8.8.8