Skip to content

Switch Routing Interfaces Configuration

Dashboard Location: Switching > Configure > Routing and DHCP

Layer 3 Interface Management

Switch routing interfaces configuration in Meraki networks provides administrators with the capability to implement Layer 3 routing functionality on capable switches, enabling inter-VLAN routing, gateway services, and advanced networking features. This functionality supports subnet management, IP address assignment, multicast routing, OSPF protocol integration, and dual-stack IPv4/IPv6 configuration. Switch routing interfaces are essential for distributed routing architectures, network segmentation, reducing network hops, and providing high-performance inter-VLAN communication without requiring dedicated routers.

Diagram

Diagram

Classes

devices (meraki.domains.organizations.networks)

NameTypeConstraintMandatoryDefault Value
switch_routing_interfacesList[switch_routing_interfaces]No

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

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
interface_ipIPNo
multicast_routingChoiceIGMP snooping querier, disabled, enabledNo
vlan_idAnyInteger[min: 1, max: 4094] or String[matches: `(?:[1-9][1-9][0-9][1-9][0-9]2
default_gatewayIPNo
ospf_settingsClass[ospf_settings]No
ipv6Class[ipv6]No
dhcpClass[dhcp]No

ospf_settings (meraki.domains.organizations.networks.devices.switch_routing_interfaces)

NameTypeConstraintMandatoryDefault Value
areaAnyString[min: 1, max: 13] or IP or Integer[min: 1, max: 4294967295]No
costIntegermin: 1, max: 65535No
is_passiveBooleantrue, falseNo

ipv6 (meraki.domains.organizations.networks.devices.switch_routing_interfaces)

NameTypeConstraintMandatoryDefault Value
assignment_modeChoiceeui-64, staticNo
prefixStringmin: 1, max: 1024No
addressStringmin: 1, max: 1024No
gatewayIPNo

dhcp (meraki.domains.organizations.networks.devices.switch_routing_interfaces)

NameTypeConstraintMandatoryDefault Value
dhcp_modeChoicedhcpDisabled, dhcpRelay, dhcpServerNo
dhcp_relay_server_ipsListIPNo
dhcp_lease_timeChoice1 day, 1 hour, 1 week, 12 hours, 30 minutes, 4 hoursNo
dns_nameservers_optionChoicecustom, googlePublicDns, openDnsNo
dns_custom_nameserversListIPNo
boot_next_serverIPNo
boot_file_nameStringmin: 1, max: 127No
dhcp_optionsList[dhcp_options]No
reserved_ip_rangesList[reserved_ip_ranges]No
fixed_ip_assignmentsList[fixed_ip_assignments]No
boot_optionsBooleantrue, falseNo

dhcp_options (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)

NameTypeConstraintMandatoryDefault Value
codeStringRegex: ^([2-9]|1[0-9][0-9]?|2[0-9]|2[0-5][0-4]|[3-9][0-9])$Yes
typeChoicehex, integer, ip, textYes
valueStringmin: 1, max: 127Yes

reserved_ip_ranges (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)

NameTypeConstraintMandatoryDefault Value
startIPYes
endIPYes
commentStringmin: 1, max: 127No

fixed_ip_assignments (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)

NameTypeConstraintMandatoryDefault Value
nameStringmin: 1, max: 127Yes
macMACYes
ipIPYes

Examples

Example-1: The example below demonstrates switch routing interfaces 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_interfaces:
- name: "VLAN 10"
subnet: "1.1.1.0/24"
interface_ip: "1.1.1.1"
multicast_routing: "disabled"
vlan_id: 100
default_gateway: "1.1.1.254"
ospf_settings:
area: "0"
cost: 1
is_passive: false

Configuration Parameters

ParameterTypeRequiredDescription
switch_routing_interfacesArrayNoList of routing interface definitions
switch_routing_interfaces[n].nameStringYesDescriptive name for the routing interface
switch_routing_interfaces[n].subnetStringYesNetwork subnet in CIDR notation (e.g., “192.168.1.0/24”)
switch_routing_interfaces[n].interface_ipStringYesIP address of the switch interface
switch_routing_interfaces[n].multicast_routingStringNoMulticast routing: “enabled”, “disabled” (default: “disabled”)
switch_routing_interfaces[n].vlan_idIntegerYesVLAN ID associated with the routing interface
switch_routing_interfaces[n].default_gatewayStringNoDefault gateway for the interface
switch_routing_interfaces[n].ospf_settingsObjectNoOSPF configuration for the interface
switch_routing_interfaces[n].ospf_settings.areaStringYesOSPF area ID
switch_routing_interfaces[n].ospf_settings.costIntegerYesOSPF interface cost (1-65535)
switch_routing_interfaces[n].ospf_settings.is_passiveBooleanYesEnable passive OSPF interface
switch_routing_interfaces[n].ipv6ObjectNoIPv6 configuration settings
switch_routing_interfaces[n].ipv6.assignment_modeStringYesIPv6 assignment: “static”, “auto”
switch_routing_interfaces[n].ipv6.prefixStringConditionalIPv6 prefix (required for static mode)
switch_routing_interfaces[n].ipv6.addressStringConditionalIPv6 address (required for static mode)
switch_routing_interfaces[n].ipv6.gatewayStringNoIPv6 default gateway

Interface Types and Deployment

Interface TypeUse CaseRouting BehaviorPerformance Characteristics
VLAN InterfaceInter-VLAN routingLayer 3 gatewayWire-speed routing
Loopback InterfaceManagement/OSPF router IDVirtual interfaceHigh availability
Point-to-PointWAN connectionsDirect routingLow latency
Management InterfaceOut-of-band managementAdministrative accessDedicated management

Subnet Planning Guidelines

Subnet SizeCIDRHostsRecommended UseGrowth Consideration
/24256 addresses254 hostsDepartmental networksStandard deployment
/25128 addresses126 hostsSmall departmentsConservative allocation
/23512 addresses510 hostsLarge departmentsFuture expansion
/221024 addresses1022 hostsCampus networksSignificant growth