Dashboard Location: Switching > Configure > Routing and DHCP
Static Routing Management for Layer 3 Switches Switch routing static routes configuration in Meraki networks provides administrators with the capability to implement precise traffic routing control directly on Layer 3 switches, enabling custom network path management, traffic engineering, and network topology optimization. This functionality supports subnet-specific routing, next-hop gateway specification, OSPF integration, route preference management, and network segmentation routing. Static routing on switches is essential for multi-site connectivity, network redundancy implementation, traffic load balancing, and specialized routing scenarios where dynamic routing protocols are insufficient or inappropriate.
Diagram Classes switch (meraki.domains.organizations.networks.devices) Name Type Constraint Mandatory Default Value routing_static_routes List [routing_static_routes]
No
routing_static_routes (meraki.domains.organizations.networks.devices.switch) Name Type Constraint Mandatory Default Value name String min: 1
, max: 127
No subnet String Regex: ^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/([1-9]|[12][0-9]|3[0-2])$
No next_hop_ip IP No advertise_via_ospf Boolean true
, false
No prefer_over_ospf_routes Boolean true
, false
No management_next_hop IP No
Examples Example-1: The example below demonstrates switch static routing configuration using tested YAML configuration from pipeline fixtures.
- name : " !env network_name "
- name : " !env dmz_switch_02 "
prefer_over_ospf_routes : true
Configuration Parameters Parameter Type Required Description switch_routing_static_routes
Array No Static route configurations for the switch switch_routing_static_routes[n].name
String Yes Descriptive name for the static route switch_routing_static_routes[n].subnet
String Yes Destination subnet in CIDR notation (e.g., “192.168.1.0/24”) switch_routing_static_routes[n].next_hop_ip
String Yes Next hop gateway IP address switch_routing_static_routes[n].advertise_via_ospf
Boolean No Whether to advertise this route via OSPF (default: false) switch_routing_static_routes[n].prefer_over_ospf_routes
Boolean No Whether to prefer this static route over OSPF routes (default: false)
Static Route Types Route Type Description Use Case OSPF Integration Host Route Single IP (/32) Specific server access Optional Subnet Route Network segment Network connectivity Recommended Summary Route Aggregated networks Route optimization Common Default Route 0.0.0.0/0 Internet/WAN access Conditional
Route Preference Options Preference Setting Description Priority Behavior Static Preferred prefer_over_ospf_routes: true
Highest Always use static route OSPF Preferred prefer_over_ospf_routes: false
Lower Use OSPF if available
OSPF Advertisement Advertisement Mode Configuration Use Case Network Impact Advertise Enabled advertise_via_ospf: true
Route sharing Domain-wide visibility Advertise Disabled advertise_via_ospf: false
Local routing Switch-specific
Subnet Notation Guide CIDR Notation Subnet Mask Network Size Use Case /8 255.0.0.0 16,777,216 hosts Large networks /16 255.255.0.0 65,536 hosts Regional networks /24 255.255.255.0 256 hosts Standard LANs /30 255.255.255.252 4 hosts Point-to-point /32 255.255.255.255 1 host Host routes
Next Hop Planning Next Hop Type Configuration Requirements Verification Local Gateway Same subnet IP Layer 2 connectivity ARP resolution