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
NameTypeConstraintMandatoryDefault Value
domainsListdomainsNo

NameTypeConstraintMandatoryDefault Value
organizationsListorganizationsYes

NameTypeConstraintMandatoryDefault Value
networksListnetworksNo

NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo

devices (meraki.domains.organizations.networks)

Section titled “devices (meraki.domains.organizations.networks)”
NameTypeConstraintMandatoryDefault Value
switchClassswitchNo

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

Section titled “switch (meraki.domains.organizations.networks.devices)”
NameTypeConstraintMandatoryDefault Value
routing_static_routesListrouting_static_routesNo

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 routing static routes configuration.

This configuration defines static routing entries on Layer 3 switches for controlled traffic forwarding. The example includes destination networks, next-hop addresses, and routing metrics for predictable network connectivity.

The device named dmz_switch_02 has a static route called “Route 1” for subnet 2.2.2.0/24 with a next hop IP of 1.1.1.254, which is advertised via OSPF and preferred over OSPF learned routes.

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