Skip to content

Interface Group

Interface groups provide a powerful mechanism for applying consistent configurations to multiple interfaces across one or more devices. They enable you to define reusable interface configuration templates that can be applied to interfaces with similar roles or requirements, promoting standardization and reducing configuration complexity.

Interface groups are particularly valuable for:

  • Role-based interface configuration: Standardizing configurations for server ports, uplinks, access ports, etc.
  • Service deployment: Applying consistent security policies, QoS settings, or VLAN configurations
  • Operational consistency: Ensuring uniform interface behaviors across your network infrastructure
  • Configuration maintenance: Centralizing interface policies for easier updates and troubleshooting

Interface groups work by:

  1. Defining a named configuration template with interface-specific settings
  2. Referencing the interface group from individual interfaces via the interface_groups attribute
  3. Supporting variables for dynamic configuration based on device or group context
  4. Allowing multiple interface groups to be applied to a single interface (configurations are merged)

This approach separates interface policy definition from individual interface declarations, making your network configurations more modular and maintainable.

Diagram

Diagram

Classes

iosxe

NameTypeConstraintMandatoryDefault Value
interface_groupsList[interface_groups]No

interface_groups (iosxe)

NameTypeConstraintMandatoryDefault Value
nameStringYes
variablesMapNo
configurationClass[configuration]No

configuration (iosxe.interface_groups)

NameTypeConstraintMandatoryDefault Value
media_typeChoiceauto-select, rj45, sfpNo
bandwidthIntegermin: 1, max: 200000000No
mtuIntegermin: 64, max: 18000No
descriptionStringNo
shutdownBooleantrue, falseNo
vrf_forwardingStringNo
ipv4Class[ipv4]No
ipv6Class[ipv6]No
bfdClass[bfd]No
spanning_treeClass[spanning_tree]No
speedChoice100, 1000, 2500, 5000, 10000, 25000, 40000, 100000, autoNo
speed_nonegotiateBooleantrue, falseNo
port_channel_idIntegermin: 1, max: 512No
port_channel_modeChoiceactive, auto, desirable, on, passiveNo
source_templatesList[source_templates]No
arp_timeoutIntegermin: 0, max: 2147483No
negotiation_autoBooleantrue, falseNo
service_policy_inputStringNo
service_policy_outputStringNo
load_intervalIntegermin: 30, max: 600No
snmp_trap_link_statusBooleantrue, falseNo
logging_event_link_statusBooleantrue, falseNo
device_trackingBooleantrue, falseNo
device_tracking_attached_policiesListStringNo
encapsulation_dot1q_vlan_idIntegermin: 1, max: 4094No
nbar_protocol_discoveryBooleantrue, falseNo
mplsClass[mpls]No
ospfClass[ospf]No
ospfv3Class[ospfv3]No
pimClass[pim]No
switchportClass[switchport]No
network_access_controlClass[network_access_control]No
auto_qosClass[auto_qos]No
autostateBooleantrue, falseNo

ipv4 (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
addressIPNo
address_maskIPNo
proxy_arpBooleantrue, falseNo
arp_inspection_trustBooleantrue, falseNo
arp_inspection_limit_rateIntegermin: 0, max: 4294967295No
dhcp_snooping_trustBooleantrue, falseNo
dhcp_relay_source_interface_typeChoiceLoopback, Vlan, GigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernet, PortChannelNo
dhcp_relay_source_interface_idStringNo
helper_addressesList[helper_addresses]No
access_group_inStringNo
access_group_outStringNo
flow_monitorsList[flow_monitors]No
redirectsBooleantrue, falseNo
unreachablesBooleantrue, falseNo
unnumberedStringNo

ipv6 (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
enableBooleantrue, falseNo
addressesList[addresses]No
link_local_addressesListIPNo
address_autoconfig_defaultBooleantrue, falseNo
address_dhcpBooleantrue, falseNo
mtuIntegermin: 1280, max: 9976No
nd_ra_suppress_allBooleantrue, falseNo
flow_monitorsList[flow_monitors]No

bfd (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
templateStringNo
enableBooleantrue, falseNo
local_addressStringNo
intervalIntegermin: 50, max: 9999No
interval_min_rxIntegermin: 50, max: 9999No
interval_multiplierIntegermin: 3, max: 50No
echoBooleantrue, falseNo

spanning_tree (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
guardChoiceloop, none, rootNo
link_typeChoiceshared, point-to-pointNo
portfast_trunkBooleantrue, falseNo

source_templates (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
nameStringYes
mergeBooleantrue, falseNo

mpls (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
ipBooleantrue, falseNo
mtuIntegerNo

ospf (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
costIntegermin: 1, max: 65535No
dead_intervalIntegermin: 1, max: 65535No
hello_intervalIntegermin: 1, max: 65535No
mtu_ignoreBooleantrue, falseNo
network_typeChoicebroadcast, non-broadcast, point-to-multipoint, point-to-pointNo
priorityIntegermin: 0, max: 255No
ttl_security_hopsIntegermin: 1, max: 254No
process_idsList[process_ids]No
message_digest_keysList[message_digest_keys]No

ospfv3 (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
network_typeChoicebroadcast, non-broadcast, point-to-multipoint, point-to-pointNo
costIntegermin: 1, max: 65535No

pim (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
passiveBooleantrue, falseNo
dense_modeBooleantrue, falseNo
sparse_modeBooleantrue, falseNo
sparse_dense_modeBooleantrue, falseNo
bfdBooleantrue, falseNo
borderBooleantrue, falseNo
bsr_borderBooleantrue, falseNo
dr_priorityIntegermin: 0, max: 4294967294No

switchport (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
modeChoiceaccess, dot1q-tunnel, private-vlan-trunk, private-vlan-host, private-vlan-promiscuous, trunkYes
nonegotiateBooleantrue, falseNo
access_vlanIntegermin: 1, max: 4094No
trunk_allowed_vlansStringNo
trunk_allowed_vlans_noneBooleantrue, falseNo
trunk_native_vlan_tagBooleantrue, falseNo
trunk_native_vlan_idIntegermin: 1, max: 4094No
hostBooleantrue, falseNo

network_access_control (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
authentication_periodicBooleantrue, falseNo
authentication_timer_reauthenticateIntegermin: 1, max: 1073741823No
authentication_timer_reauthenticate_serverBooleantrue, falseNo
mabBooleantrue, falseNo
mab_eapBooleantrue, falseNo
dot1x_paeChoiceauthenticator, supplicant, bothNo
dot1x_timeout_auth_periodIntegermin: 1, max: 65535No
dot1x_timeout_held_periodIntegermin: 1, max: 65535No
dot1x_timeout_quiet_periodIntegermin: 1, max: 65535No
dot1x_timeout_ratelimit_periodIntegermin: 1, max: 65535No
dot1x_timeout_server_timeoutIntegermin: 1, max: 65535No
dot1x_timeout_start_periodIntegermin: 1, max: 65535No
dot1x_timeout_supp_timeoutIntegermin: 1, max: 65535No
dot1x_timeout_tx_periodIntegermin: 1, max: 65535No
dot1x_max_reqIntegermin: 1, max: 10No
dot1x_max_reauth_reqIntegermin: 1, max: 10No

auto_qos (iosxe.interface_groups.configuration)

NameTypeConstraintMandatoryDefault Value
classifyBooleantrue, falseNo
classify_policeBooleantrue, falseNo
trustBooleantrue, falseNo
trust_cosBooleantrue, falseNo
trust_dscpBooleantrue, falseNo
video_ctsBooleantrue, falseNo
video_ip_cameraBooleantrue, falseNo
video_media_playerBooleantrue, falseNo
voipBooleantrue, falseNo
voip_cisco_phoneBooleantrue, falseNo
voip_cisco_softphoneBooleantrue, falseNo
voip_trustBooleantrue, falseNo
trust_deviceChoicecisco-phone, cts, ip-camera, media-playerNo

helper_addresses (iosxe.interface_groups.configuration.ipv4)

NameTypeConstraintMandatoryDefault Value
addressIPYes
globalBooleantrue, falseNo
vrfStringNo

flow_monitors (iosxe.interface_groups.configuration.ipv4)

NameTypeConstraintMandatoryDefault Value
nameStringYes
directionChoiceinput, outputYes

addresses (iosxe.interface_groups.configuration.ipv6)

NameTypeConstraintMandatoryDefault Value
prefixIPYes
eui_64Booleantrue, falseNo

process_ids (iosxe.interface_groups.configuration.ospf)

NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 65535No
areasListStringNo

message_digest_keys (iosxe.interface_groups.configuration.ospf)

NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 255Yes
md5_auth_keyStringNo
md5_auth_typeChoice0, 7No

Examples

iosxe:
interface_groups:
# Server access port configuration
- name: SERVER_ACCESS_PORT
configuration:
description: "Server Access Port"
switchport:
mode: access
access_vlan: 100
port_security: true
port_security_maximum_ranges:
- range: 2
spanning_tree:
portfast: true
bpduguard: true
auto_qos:
trust_dscp: true
# Trunk uplink configuration
- name: TRUNK_UPLINK
configuration:
description: "Trunk Uplink to ${uplink_device}"
switchport:
mode: trunk
nonegotiate: true
trunk_allowed_vlans: "1-200,300-400"
spanning_tree:
link_type: point-to-point
# Access port with dynamic VLAN
- name: DYNAMIC_ACCESS_PORT
variables:
port_vlan: 10
configuration:
switchport:
mode: access
access_vlan: ${port_vlan}
network_access_control:
dot1x_pae: authenticator
mab: true
access_session_port_control: auto
# Management interface configuration
- name: MGMT_INTERFACE
configuration:
description: "Management Interface"
ipv4:
address: ${mgmt_ip}
address_mask: "255.255.255.0"
snmp_trap_link_status: true
# Apply interface groups to devices
devices:
- name: Access-SW-01
variables:
uplink_device: "Core-SW-01"
mgmt_ip: "192.168.1.10"
configuration:
interfaces:
ethernets:
# Server ports using SERVER_ACCESS_PORT group
- type: GigabitEthernet
id: "1/0/1"
interface_groups: [SERVER_ACCESS_PORT]
- type: GigabitEthernet
id: "1/0/2"
interface_groups: [SERVER_ACCESS_PORT]
# Uplink using TRUNK_UPLINK group
- type: GigabitEthernet
id: "1/0/48"
interface_groups: [TRUNK_UPLINK]
# User ports with dynamic access and multiple groups
- type: GigabitEthernet
id: "1/0/10"
interface_groups: [DYNAMIC_ACCESS_PORT]
variables:
port_vlan: 20
vlans:
# Management VLAN using MGMT_INTERFACE group
- id: 100
interface_groups: [MGMT_INTERFACE]