Skip to content

Switch Routing Static Routes Configuration

Dashboard Location: Switching > Configure > Routing and DHCP

Static Routing Management for Layer 3 Switches

Section titled “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

switch (meraki.domains.organizations.networks.devices)

Section titled “switch (meraki.domains.organizations.networks.devices)”
NameTypeConstraintMandatoryDefault Value
routing_static_routesList[routing_static_routes]No

routing_static_routes (meraki.domains.organizations.networks.devices.switch)

Section titled “routing_static_routes (meraki.domains.organizations.networks.devices.switch)”
NameTypeConstraintMandatoryDefault Value
nameStringmin: 1, max: 127No
subnetStringRegex: ^((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_ipIPNo
advertise_via_ospfBooleantrue, falseNo
prefer_over_ospf_routesBooleantrue, falseNo
management_next_hopIPNo

Example-1: The example below demonstrates switch static routing configuration using tested YAML configuration from pipeline fixtures.

meraki:
domains:
- name: !env domain
administrator:
name: !env org_admin
organizations:
- name: !env org
networks:
- name: !env network_name
product_types:
- appliance
- switch
- wireless
- camera
- sensor
- cellularGateway
devices:
- name: !env dmz_switch_02
switch:
routing_static_routes:
- name: Route 1
subnet: "2.2.2.0/24"
next_hop_ip: 1.1.1.254
advertise_via_ospf: true
prefer_over_ospf_routes: true