Skip to content

Switch Routing Interfaces Configuration

Dashboard Location: Switching > Configure > Routing and DHCP

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

devices (meraki.domains.organizations.networks)

Section titled “devices (meraki.domains.organizations.networks)”
NameTypeConstraintMandatoryDefault Value
switch_routing_interfacesList[switch_routing_interfaces]No

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

Section titled “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
static_v4_dns1IPNo
static_v4_dns2IPNo
uplink_v4Booleantrue, falseNo
uplink_v6Booleantrue, falseNo
ospf_settingsClass[ospf_settings]No
ipv6Class[ipv6]No
dhcpClass[dhcp]No

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

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

Section titled “ipv6 (meraki.domains.organizations.networks.devices.switch_routing_interfaces)”
NameTypeConstraintMandatoryDefault Value
assignment_modeChoiceeui-64, staticNo
prefixIPNo
addressIPNo
gatewayIPNo
static_v6_dns1IPNo
static_v6_dns2IPNo

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

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

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

Section titled “reserved_ip_ranges (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)”
NameTypeConstraintMandatoryDefault Value
startIPYes
endIPYes
commentStringmin: 1, max: 127Yes

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

Section titled “fixed_ip_assignments (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)”
NameTypeConstraintMandatoryDefault Value
nameStringmin: 1, max: 127Yes
macMACYes
ipIPYes

Important: Only one interface per switch can be designated as the uplink interface. Additionally, an uplink interface must be defined — no other L3 interfaces can exist on a switch without one.

Deleting the last remaining interface: If the last remaining L3 interface (which by definition will be the uplink) needs to be removed, the switch management IP mode must first be set to DHCP (if not already). Without this, Terraform will remove the interface from state but the interface will persist in the Meraki dashboard and will not actually be deleted.

The uplink designation behavior differs by switch type and software version:

Switch TypeUplink Designation
MS Switches and Catalyst Switches (CS software)The presence of default_gateway automatically designates the interface as the uplink. uplink_v4 / uplink_v6 tags are not required.
Catalyst Switches (IOS-XE software)The uplink type must be explicitly declared. The required fields depend on the uplink type:

For Catalyst Switches (IOS-XE), the following fields are required based on uplink type:

Uplink TypeRequired Fields
IPv4 onlydefault_gateway, uplink_v4: true, static_v4_dns1
IPv6 onlyuplink_v6: true, ipv6.gateway, ipv6.static_v6_dns1
Dual-stack (IPv4 + IPv6)All of the above: default_gateway, uplink_v4: true, static_v4_dns1, uplink_v6: true, ipv6.gateway, ipv6.static_v6_dns1

Example-1: The example below demonstrates switch routing interfaces configuration including uplink designation and static DNS configuration.

This configuration creates Layer 3 routing interfaces on capable switches for inter-VLAN routing. The example includes subnet assignment, interface IP configuration, multicast routing settings, OSPF integration, uplink designation, and static DNS server configuration.

The device named dmz_switch_02 includes three routing interfaces:

  • VLAN 10 configured on subnet 1.1.1.0/24 with IP 1.1.1.1 and VLAN ID 10. It is designated as both the IPv4 and IPv6 uplink (uplink_v4: true, uplink_v6: true) with a default gateway of 1.1.1.254. Primary and secondary static IPv4 DNS servers are set to 8.8.8.8 and 8.8.4.4. OSPF is enabled in area 0 with a cost of 1 and the interface is active. The interface also has a static IPv6 configuration with gateway and static IPv6 DNS servers. This is the required configuration for Catalyst switches running IOS-XE.
  • VLAN 20 is a standard IPv4-only interface on subnet 1.1.2.0/24, not designated as an uplink, with passive OSPF.
  • VLAN 30 is an IPv6-only interface with static assignment and no uplink designation.
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: 10
default_gateway: "1.1.1.254"
uplink_v4: true
uplink_v6: true
static_v4_dns1: "8.8.8.8"
static_v4_dns2: "8.8.4.4"
ospf_settings:
area: "0"
cost: 1
is_passive: false
ipv6:
assignment_mode: "static"
prefix: "2001:db8:85a3::/64"
address: "2001:db8:85a3::8a2e:370:7335"
gateway: "2001:db8:85a3::8a2e:370:7336"
static_v6_dns1: "2001:4860:4860::8888"
static_v6_dns2: "2001:4860:4860::8844"
- name: "VLAN 20"
subnet: "1.1.2.0/24"
interface_ip: "1.1.2.1"
multicast_routing: "disabled"
vlan_id: 20
ospf_settings:
area: "0"
cost: 1
is_passive: true
- name: "VLAN 30"
vlan_id: 30
multicast_routing: "disabled"
ipv6:
assignment_mode: "static"
prefix: "2001:db8:aaaa::/64"
address: "2001:db8:aaaa::1"

Dashboard Location: Switching > Configure > Routing and DHCP

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

devices (meraki.domains.organizations.networks)

Section titled “devices (meraki.domains.organizations.networks)”
NameTypeConstraintMandatoryDefault Value
switch_routing_interfacesList[switch_routing_interfaces]No

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

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

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

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

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

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

Section titled “reserved_ip_ranges (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)”
NameTypeConstraintMandatoryDefault Value
startIPYes
endIPYes
commentStringmin: 1, max: 127Yes

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

Section titled “fixed_ip_assignments (meraki.domains.organizations.networks.devices.switch_routing_interfaces.dhcp)”
NameTypeConstraintMandatoryDefault Value
nameStringmin: 1, max: 127Yes
macMACYes
ipIPYes

Example-1: The example below demonstrates switch routing interfaces configuration.

This configuration creates Layer 3 routing interfaces on capable switches for inter-VLAN routing. The example includes subnet assignment, interface IP configuration, multicast routing settings, and OSPF integration for distributed routing capabilities.

The device named dmz_switch_02 includes a routing interface called “VLAN 10” configured on subnet 1.1.1.0/24 with the IP address 1.1.1.1 and VLAN ID 100. Multicast routing is disabled on this interface, and the default gateway is set to 1.1.1.254. Additionally, OSPF routing is enabled with the interface assigned to area 0, a cost of 1, and the interface is active (not passive) in OSPF.

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
ipv6:
assignment_mode: "static"
prefix: "2001:db8:85a3::/64"
address: "2001:db8:85a3::8a2e:370:7335"
gateway: "2001:db8:85a3::8a2e:370:7336"