Pcornel
H3 · Practical network exams · Cisco IOS / IOS XE

L3 Switch Golden Script · Finals

Configuration first, verification second, theory third. Reference templates require task-specific adaptation.

Content version 1.1-draft

Keyboard shortcuts

/ Finals search · Ctrl K global command palette · Alt E Exam Mode · Alt G Golden Scripts · Alt T Exam Topics · Alt V Verify · Esc close dialog.

Skills Exam · L3 Switch

Reference only. Replace placeholders, select the correct sections and verify before saving. Copy All includes the basic block and commented alternatives, never removal commands.

Filters affect the sections shown below. Copy All, TXT downloads and print always include the complete script for this device.

Download TXT Verify All
Full reference script
! Pcornel Finals - Skills Exam / L3 Switch
! Content version: 1.1-draft
! REFERENCE ONLY: replace every placeholder and choose the correct device/task-specific variants.
! Basic configuration is active text; all alternative sections below are commented references.
! Use Copy Section for a single relevant variant. Do not paste this entire file blindly.

! Basic configuration
enable
configure terminal
hostname [HOSTNAME]
ip domain-name [DOMAIN-NAME]
enable secret [ENABLE-SECRET]
username [USERNAME] privilege 15 secret [PASSWORD]
line console 0
 login local
 logging synchronous
 exit
line vty 0 [VTY-LAST]
 login local
 exit
ip routing
ipv6 unicast-routing
end

! VLAN / Create a VLAN
! enable
! configure terminal
! vlan [VLAN-ID]
!  name [VLAN-NAME]
!  exit
! end

! VLAN / Assign an access interface
! enable
! configure terminal
! vlan [VLAN-ID]
!  name [VLAN-NAME]
!  exit
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! VLAN / Layer 3 SVI
! enable
! configure terminal
! ip routing
! vlan [VLAN-ID]
!  name [VLAN-NAME]
!  exit
! interface vlan [VLAN-ID]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! VLAN / IPv6 routed SVI
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! vlan [VLAN-ID]
!  exit
! interface vlan [VLAN-ID]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! VLAN / Voice VLAN (only if requested)
! enable
! configure terminal
! vlan [VLAN-ID]
!  exit
! vlan [VOICE-VLAN]
!  exit
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport voice vlan [VOICE-VLAN]
!  no shutdown
!  exit
! end

! 802.1Q Trunking / Static 802.1Q trunk
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! DTP / Dynamic desirable / auto
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode dynamic desirable
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! DTP / Dynamic desirable / desirable
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode dynamic desirable
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! DTP / Static trunk without DTP
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  switchport nonegotiate
!  exit
! end

! EtherChannel / TRUNK – LACP active / active
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – LACP active / passive
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – PAgP desirable / desirable
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – PAgP desirable / auto
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – Static on / on
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – LACP active / active
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – LACP active / passive
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – PAgP desirable / desirable
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – PAgP desirable / auto
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – Static on / on
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / active
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / passive
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / desirable
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / auto
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – Static on / on
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / active (IPv6)
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / passive (IPv6)
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / desirable (IPv6)
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / auto (IPv6)
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – Static on / on (IPv6)
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! STP / Rapid PVST+
! enable
! configure terminal
! spanning-tree mode rapid-pvst
! end

! STP / PVST+
! enable
! configure terminal
! spanning-tree mode pvst
! end

! STP / Root primary
! enable
! configure terminal
! spanning-tree vlan [VLAN-ID] root primary
! end

! STP / Root secondary
! enable
! configure terminal
! spanning-tree vlan [VLAN-ID] root secondary
! end

! STP / Explicit bridge priority
! Use an allowed multiple of 4096; a lower bridge ID is preferred.
! enable
! configure terminal
! spanning-tree vlan [VLAN-ID] priority [BRIDGE-PRIORITY]
! end

! STP / Explicit port cost
! enable
! configure terminal
! interface [INTERFACE]
!  spanning-tree vlan [VLAN-ID] cost [STP-COST]
!  exit
! end

! STP / Explicit port priority
! Port priority is an additional tie-breaker; select a supported increment.
! enable
! configure terminal
! interface [INTERFACE]
!  spanning-tree vlan [VLAN-ID] port-priority [PORT-PRIORITY]
!  exit
! end

! PortFast / Access edge port
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  spanning-tree portfast
!  no shutdown
!  exit
! end

! PortFast / Default on access edge ports
! Review all affected non-trunk interfaces first.
! enable
! configure terminal
! spanning-tree portfast default
! end

! PortFast / Trunk to an edge endpoint
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! Use only for an explicitly intended edge trunk, never a normal switch-to-switch trunk.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  spanning-tree portfast trunk
!  exit
! end

! BPDU Guard / Interface BPDU Guard
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  spanning-tree portfast
!  spanning-tree bpduguard enable
!  no shutdown
!  exit
! end

! BPDU Guard / Global PortFast BPDU Guard
! enable
! configure terminal
! spanning-tree portfast default
! spanning-tree portfast bpduguard default
! end

! BPDU Guard / Optional timed recovery
! Only enable automatic recovery if requested. A persistent BPDU source can repeatedly disable the port.
! enable
! configure terminal
! errdisable recovery cause bpduguard
! errdisable recovery interval [RECOVERY-SECONDS]
! end

! VRF-Lite (IPv4/IPv6) / Define a dual-stack VRF
! enable
! configure terminal
! vrf definition [VRF-NAME]
!  address-family ipv4
!  exit-address-family
!  address-family ipv6
!  exit-address-family
!  exit
! end

! VRF-Lite (IPv4/IPv6) / Assign L3 switch routed port
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface [INTERFACE]
!  no switchport
!  vrf forwarding [VRF-NAME]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! VRF-Lite (IPv4/IPv6) / IPv4 VRF static route
! enable
! configure terminal
! ip route vrf [VRF-NAME] [NETWORK] [SUBNET-MASK] [NEXT-HOP]
! end

! VRF-Lite (IPv4/IPv6) / IPv6 VRF static route
! enable
! configure terminal
! ipv6 route vrf [VRF-NAME] [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
! end

! VRF-Lite (IPv4/IPv6) / Define IPV4 VRF
! enable
! configure terminal
! vrf definition [VRF-NAME]
!  address-family ipv4
!  exit-address-family
!  exit
! end

! VRF-Lite (IPv4/IPv6) / Define IPV6 VRF
! enable
! configure terminal
! vrf definition [VRF-NAME]
!  address-family ipv6
!  exit-address-family
!  exit
! end

! VRF-Lite (IPv4/IPv6) / L3 switch IPV4 routed VRF interface
! Define the required VRF address family first. Moving an interface to a VRF can remove existing addresses; restore all required addresses and apply no switchport only on physical routed switchports.
! enable
! configure terminal
! ip routing
! interface [INTERFACE]
!  no switchport
!  vrf forwarding [VRF-NAME]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! VRF-Lite (IPv4/IPv6) / L3 switch IPV6 routed VRF interface
! Define the required VRF address family first. Moving an interface to a VRF can remove existing addresses; restore all required addresses and apply no switchport only on physical routed switchports.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface [INTERFACE]
!  no switchport
!  vrf forwarding [VRF-NAME]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! IPv4 and IPv6 Addressing / L3 switch routed IPv4
! enable
! configure terminal
! ip routing
! interface [INTERFACE]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! IPv4 and IPv6 Addressing / L3 switch routed IPv6
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface [INTERFACE]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! IPv4 and IPv6 Addressing / IPv4 loopback
! enable
! configure terminal
! interface loopback [LOOPBACK-ID]
!  ip address [LOOPBACK-IP] 255.255.255.255
!  exit
! end

! IPv4 and IPv6 Addressing / IPv6 loopback
! enable
! configure terminal
! ipv6 unicast-routing
! interface loopback [LOOPBACK-ID]
!  ipv6 address [LOOPBACK-IPV6]/128
!  exit
! end

! IPv4 and IPv6 Addressing / Manual link-local address
! enable
! configure terminal
! interface [INTERFACE]
!  ipv6 address [LINK-LOCAL-ADDRESS] link-local
!  exit
! end

! Static Routing (IPv4/IPv6) / Next-hop route
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP]
! end

! Static Routing (IPv4/IPv6) / Exit-interface route
! Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [INTERFACE]
! end

! Static Routing (IPv4/IPv6) / Fully specified route
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [INTERFACE] [NEXT-HOP]
! end

! Static Routing (IPv4/IPv6) / Default route
! enable
! configure terminal
! ip route 0.0.0.0 0.0.0.0 [NEXT-HOP]
! end

! Static Routing (IPv4/IPv6) / Floating backup route
! Choose a distance greater than the preferred route.
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP] [BACKUP-DISTANCE]
! end

! Static Routing (IPv4/IPv6) / Next-hop route
! Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
! end

! Static Routing (IPv4/IPv6) / Exit-interface route
! Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE]
! end

! Static Routing (IPv4/IPv6) / Fully specified route
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE] [NEXT-HOP-IPV6]
! end

! Static Routing (IPv4/IPv6) / Default route
! Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
! enable
! configure terminal
! ipv6 route ::/0 [NEXT-HOP-IPV6]
! end

! Static Routing (IPv4/IPv6) / Floating backup route
! Choose a distance greater than the preferred route.
! Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6] [BACKUP-DISTANCE]
! end

! OSPFv3 (Address Family) / IPV4 unicast address family
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv4 unicast
!  exit-address-family
!  exit
! interface [INTERFACE]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
!  exit
! end

! OSPFv3 (Address Family) / IPV6 unicast address family
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv6 unicast
!  exit-address-family
!  exit
! interface [INTERFACE]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
!  exit
! end

! OSPFv3 (Address Family) / Both address families
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv4 unicast
!  exit-address-family
!  address-family ipv6 unicast
!  exit-address-family
!  exit
! interface [INTERFACE]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
!  ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
!  exit
! end

! OSPFv3 (Address Family) / IPV4 VRF address family
! Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
! On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
! For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
! Use capability vrf-lite when required for the lab.
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv4 unicast vrf [VRF-NAME]
!   capability vrf-lite
!  exit-address-family
!  exit
! interface [INTERFACE]
!  vrf forwarding [VRF-NAME]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
!  no shutdown
!  exit
! end

! OSPFv3 (Address Family) / IPV6 VRF address family
! Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
! On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
! For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
! Use capability vrf-lite when required for the lab.
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv6 unicast vrf [VRF-NAME]
!   capability vrf-lite
!  exit-address-family
!  exit
! interface [INTERFACE]
!  vrf forwarding [VRF-NAME]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
!  no shutdown
!  exit
! end

! Port Security / Sticky MAC – protect
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address sticky
!  switchport port-security violation protect
!  no shutdown
!  exit
! end

! Port Security / Sticky MAC – restrict
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address sticky
!  switchport port-security violation restrict
!  no shutdown
!  exit
! end

! Port Security / Sticky MAC – shutdown
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address sticky
!  switchport port-security violation shutdown
!  no shutdown
!  exit
! end

! Port Security / Statically allowed MAC
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address [MAC-ADDRESS]
!  no shutdown
!  exit
! end

! Port Security / Dynamic secure MAC learning
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  no shutdown
!  exit
! end

! Password Hashing Algorithms / Generate type 9 (scrypt) local secret
! enable
! configure terminal
! username [USERNAME] algorithm-type scrypt secret [PASSWORD]
! enable algorithm-type scrypt secret [ENABLE-SECRET]
! end

! Password Hashing Algorithms / Generate type 8 (PBKDF2-SHA256) secret
! enable
! configure terminal
! username [USERNAME] algorithm-type sha256 secret [PASSWORD]
! enable algorithm-type sha256 secret [ENABLE-SECRET]
! end

! Password Hashing Algorithms / Generate legacy type 5 (MD5) secret
! Legacy exam compatibility only; modern platforms may reject or convert type 5.
! enable
! configure terminal
! username [USERNAME] algorithm-type md5 secret [PASSWORD]
! enable algorithm-type md5 secret [ENABLE-SECRET]
! end

! Password Hashing Algorithms / Explicit type 0 line password
! Plaintext input and storage unless password encryption is enabled.
! enable
! configure terminal
! line console 0
!  password 0 [PASSWORD]
!  login
!  exit
! end

! Password Hashing Algorithms / Legacy service password encryption
! Obfuscates applicable plaintext line passwords as type 7. It does not create a strong hash.
! enable
! configure terminal
! service password-encryption
! end

! Password Hashing Algorithms / Import an already encoded type 9 secret
! The value must already be a valid encoded type 9 secret, not a plaintext password.
! enable
! configure terminal
! username [USERNAME] secret 9 [ENCODED-TYPE9-SECRET]
! end

! Local User Authentication / Local user with secret
! enable
! configure terminal
! username [USERNAME] privilege [PRIVILEGE] secret [PASSWORD]
! end

! Local User Authentication / Console local authentication
! enable
! configure terminal
! username [USERNAME] privilege 15 secret [PASSWORD]
! line console 0
!  login local
!  exit
! end

! Local User Authentication / VTY local authentication
! enable
! configure terminal
! username [USERNAME] privilege 15 secret [PASSWORD]
! line vty 0 [VTY-LAST]
!  login local
!  exit
! end

! SSH / SSH version 2 with local authentication
! Key generation may prompt or reject replacement if a key already exists. Do not overwrite an existing working key unnecessarily.
! enable
! configure terminal
! hostname [HOSTNAME]
! ip domain-name [DOMAIN-NAME]
! username [USERNAME] privilege 15 secret [PASSWORD]
! crypto key generate rsa modulus 2048
! ip ssh version 2
! line vty 0 [VTY-LAST]
!  login local
!  transport input ssh
!  exit
! end

! SSH / Optional SSH and VTY timeouts
! enable
! configure terminal
! ip ssh time-out [SSH-TIMEOUT-SECONDS]
! ip ssh authentication-retries [RETRY-COUNT]
! line vty 0 [VTY-LAST]
!  exec-timeout [IDLE-MINUTES] [IDLE-SECONDS]
!  exit
! end

! Telnet / Telnet with local user
! enable
! configure terminal
! username [USERNAME] privilege 15 secret [PASSWORD]
! line vty 0 [VTY-LAST]
!  login local
!  transport input telnet
!  exit
! end

! Telnet / Telnet with line password
! enable
! configure terminal
! line vty 0 [VTY-LAST]
!  password [PASSWORD]
!  login
!  transport input telnet
!  exit
! end

! Telnet / Allow both SSH and Telnet
! SSH prerequisites must already be configured.
! enable
! configure terminal
! line vty 0 [VTY-LAST]
!  login local
!  transport input ssh telnet
!  exit
! end

! Save only after reviewing and verifying the configuration:
! copy running-config startup-config
! Confirm the destination filename if prompted.

Basic configuration

enable
configure terminal
hostname [HOSTNAME]
ip domain-name [DOMAIN-NAME]
enable secret [ENABLE-SECRET]
username [USERNAME] privilege 15 secret [PASSWORD]
line console 0
 login local
 logging synchronous
 exit
line vty 0 [VTY-LAST]
 login local
 exit
ip routing
ipv6 unicast-routing
end
VLAN

VLANs divide a switched network into separate Layer 2 broadcast domains. A switch virtual interface (SVI) provides IP management or inter-VLAN routing when supported and configured.

Create a VLAN Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
vlan [VLAN-ID]
 name [VLAN-NAME]
 exit
end
Command parameters
[VLAN-ID]
VLAN identifier.
[VLAN-NAME]
Descriptive VLAN name.
Assign an access interface Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
vlan [VLAN-ID]
 name [VLAN-NAME]
 exit
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
Command parameters
[VLAN-ID]
VLAN identifier.
[VLAN-NAME]
Descriptive VLAN name.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
Layer 3 SVI Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip routing
vlan [VLAN-ID]
 name [VLAN-NAME]
 exit
interface vlan [VLAN-ID]
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[VLAN-ID]
VLAN identifier.
[VLAN-NAME]
Descriptive VLAN name.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
IPv6 routed SVI Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip routing
ipv6 unicast-routing
vlan [VLAN-ID]
 exit
interface vlan [VLAN-ID]
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[VLAN-ID]
VLAN identifier.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Voice VLAN (only if requested) Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
vlan [VLAN-ID]
 exit
vlan [VOICE-VLAN]
 exit
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 switchport voice vlan [VOICE-VLAN]
 no shutdown
 exit
end
Command parameters
[VLAN-ID]
VLAN identifier.
[VOICE-VLAN]
Voice VLAN identifier distinct from the access VLAN.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
802.1Q Trunking

An 802.1Q trunk transports multiple VLANs across one link. Frames are tagged except for native VLAN traffic under the usual native VLAN behavior.

Static 802.1Q trunk Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
DTP

Dynamic Trunking Protocol negotiates switchport trunking. Dynamic desirable actively attempts negotiation; dynamic auto waits for a compatible peer. Static trunking can operate without DTP.

Dynamic desirable / auto Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: dtp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic desirable
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic auto
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Dynamic desirable / desirable Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: dtp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic desirable
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic desirable
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Static trunk without DTP Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: dtp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 switchport nonegotiate
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 switchport nonegotiate
 exit
end
EtherChannel

EtherChannel bundles compatible physical links into a single logical port-channel. LACP and PAgP negotiate membership; static mode does not negotiate.

TRUNK – LACP active / active Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
TRUNK – LACP active / passive Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode passive
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
TRUNK – PAgP desirable / desirable Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
  • PAgP support is platform-dependent.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
TRUNK – PAgP desirable / auto Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
  • PAgP support is platform-dependent.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode auto
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
TRUNK – Static on / on Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
  • Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
ACCESS – LACP active / active Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[VLAN-ID]
VLAN identifier.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: VLAN-ID

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
ACCESS – LACP active / passive Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[VLAN-ID]
VLAN identifier.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: VLAN-ID

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode passive
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
ACCESS – PAgP desirable / desirable Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • PAgP support is platform-dependent.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[VLAN-ID]
VLAN identifier.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: VLAN-ID

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
ACCESS – PAgP desirable / auto Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • PAgP support is platform-dependent.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[VLAN-ID]
VLAN identifier.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: VLAN-ID

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode auto
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
ACCESS – Static on / on Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[VLAN-ID]
VLAN identifier.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: VLAN-ID

enable
configure terminal
interface range [INTERFACE-RANGE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 no shutdown
 exit
end
ROUTED – LACP active / active Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: SUBNET-MASK

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [REMOTE-IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
ROUTED – LACP active / passive Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: SUBNET-MASK

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode passive
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [REMOTE-IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
ROUTED – PAgP desirable / desirable Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • PAgP support is platform-dependent.
enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: SUBNET-MASK

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [REMOTE-IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
ROUTED – PAgP desirable / auto Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • PAgP support is platform-dependent.
enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: SUBNET-MASK

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode auto
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [REMOTE-IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
ROUTED – Static on / on Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: SUBNET-MASK

enable
configure terminal
ip routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ip address [REMOTE-IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
ROUTED – LACP active / active (IPv6) Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: PREFIX-LENGTH

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [PEER-IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
ROUTED – LACP active / passive (IPv6) Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode active
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: PREFIX-LENGTH

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode passive
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [PEER-IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
ROUTED – PAgP desirable / desirable (IPv6) Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • PAgP support is platform-dependent.
enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: PREFIX-LENGTH

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [PEER-IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
ROUTED – PAgP desirable / auto (IPv6) Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • PAgP support is platform-dependent.
enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode desirable
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: PREFIX-LENGTH

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode auto
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [PEER-IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
ROUTED – Static on / on (IPv6) Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: etherchannel-link. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE-RANGE]
Local Cisco interface range expression.
[CHANNEL-GROUP]
Local EtherChannel and corresponding Port-channel number.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: PREFIX-LENGTH

enable
configure terminal
ip routing
ipv6 unicast-routing
interface range [INTERFACE-RANGE]
 no switchport
 channel-group [CHANNEL-GROUP] mode on
 no shutdown
 exit
interface port-channel [CHANNEL-GROUP]
 no switchport
 ipv6 address [PEER-IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
STP

Spanning Tree prevents Layer 2 loops by electing a root bridge and selecting forwarding and non-forwarding ports. PVST+ and Rapid PVST+ maintain per-VLAN spanning-tree instances.

Rapid PVST+ Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
spanning-tree mode rapid-pvst
end
PVST+ Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
spanning-tree mode pvst
end
Root primary Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
spanning-tree vlan [VLAN-ID] root primary
end
Command parameters
[VLAN-ID]
VLAN identifier.
Root secondary Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
spanning-tree vlan [VLAN-ID] root secondary
end
Command parameters
[VLAN-ID]
VLAN identifier.
Explicit bridge priority Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Use an allowed multiple of 4096; a lower bridge ID is preferred.
enable
configure terminal
spanning-tree vlan [VLAN-ID] priority [BRIDGE-PRIORITY]
end
Command parameters
[VLAN-ID]
VLAN identifier.
[BRIDGE-PRIORITY]
STP bridge priority, normally a multiple of 4096.
Explicit port cost Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 spanning-tree vlan [VLAN-ID] cost [STP-COST]
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[STP-COST]
Spanning-tree port path cost.
Explicit port priority Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: stp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Port priority is an additional tie-breaker; select a supported increment.
enable
configure terminal
interface [INTERFACE]
 spanning-tree vlan [VLAN-ID] port-priority [PORT-PRIORITY]
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[PORT-PRIORITY]
STP port priority using a supported increment.
PortFast

PortFast allows an edge interface to enter forwarding rapidly instead of waiting for normal spanning-tree convergence. It does not disable spanning tree.

Access edge port Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 spanning-tree portfast
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
Default on access edge ports Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • Review all affected non-trunk interfaces first.
enable
configure terminal
spanning-tree portfast default
end
Trunk to an edge endpoint Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
  • Use only for an explicitly intended edge trunk, never a normal switch-to-switch trunk.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 spanning-tree portfast trunk
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
BPDU Guard

BPDU Guard protects an edge port by placing it into err-disabled state when a BPDU is received under the configured guard policy.

Interface BPDU Guard Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 spanning-tree portfast
 spanning-tree bpduguard enable
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
Global PortFast BPDU Guard Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
spanning-tree portfast default
spanning-tree portfast bpduguard default
end
Optional timed recovery Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • Only enable automatic recovery if requested. A persistent BPDU source can repeatedly disable the port.
enable
configure terminal
errdisable recovery cause bpduguard
errdisable recovery interval [RECOVERY-SECONDS]
end
Command parameters
[RECOVERY-SECONDS]
Errdisable recovery interval in seconds.
VRF-Lite (IPv4/IPv6)

VRF-Lite separates routing tables on a device without requiring MPLS. Interfaces and routes are assigned to a named VRF.

Define a dual-stack VRF Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
vrf definition [VRF-NAME]
 address-family ipv4
 exit-address-family
 address-family ipv6
 exit-address-family
 exit
end
Command parameters
[VRF-NAME]
Local VRF name; align it with the task.
Assign L3 switch routed port Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip routing
ipv6 unicast-routing
interface [INTERFACE]
 no switchport
 vrf forwarding [VRF-NAME]
 ip address [IP-ADDRESS] [SUBNET-MASK]
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VRF-NAME]
Local VRF name; align it with the task.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
IPv4 VRF static route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip route vrf [VRF-NAME] [NETWORK] [SUBNET-MASK] [NEXT-HOP]
end
Command parameters
[VRF-NAME]
Local VRF name; align it with the task.
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[NEXT-HOP]
IPv4 next-hop address.
IPv6 VRF static route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ipv6 route vrf [VRF-NAME] [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
end
Command parameters
[VRF-NAME]
Local VRF name; align it with the task.
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Define IPV4 VRF Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
vrf definition [VRF-NAME]
 address-family ipv4
 exit-address-family
 exit
end
Command parameters
[VRF-NAME]
Local VRF name; align it with the task.
Define IPV6 VRF Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
vrf definition [VRF-NAME]
 address-family ipv6
 exit-address-family
 exit
end
Command parameters
[VRF-NAME]
Local VRF name; align it with the task.
L3 switch IPV4 routed VRF interface Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • Define the required VRF address family first. Moving an interface to a VRF can remove existing addresses; restore all required addresses and apply no switchport only on physical routed switchports.
enable
configure terminal
ip routing
interface [INTERFACE]
 no switchport
 vrf forwarding [VRF-NAME]
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VRF-NAME]
Local VRF name; align it with the task.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
L3 switch IPV6 routed VRF interface Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • Define the required VRF address family first. Moving an interface to a VRF can remove existing addresses; restore all required addresses and apply no switchport only on physical routed switchports.
enable
configure terminal
ip routing
ipv6 unicast-routing
interface [INTERFACE]
 no switchport
 vrf forwarding [VRF-NAME]
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VRF-NAME]
Local VRF name; align it with the task.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
IPv4 and IPv6 Addressing

IPv4 and IPv6 addresses identify interfaces at Layer 3. A routed switchport must be converted to Layer 3 before assigning an address.

L3 switch routed IPv4 Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip routing
interface [INTERFACE]
 no switchport
 ip address [IP-ADDRESS] [SUBNET-MASK]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
L3 switch routed IPv6 Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip routing
ipv6 unicast-routing
interface [INTERFACE]
 no switchport
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
IPv4 loopback Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
interface loopback [LOOPBACK-ID]
 ip address [LOOPBACK-IP] 255.255.255.255
 exit
end
Command parameters
[LOOPBACK-ID]
Local loopback interface number.
[LOOPBACK-IP]
Local IPv4 loopback address.
IPv6 loopback Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ipv6 unicast-routing
interface loopback [LOOPBACK-ID]
 ipv6 address [LOOPBACK-IPV6]/128
 exit
end
Command parameters
[LOOPBACK-ID]
Local loopback interface number.
[LOOPBACK-IPV6]
Local IPv6 loopback address.
Static Routing (IPv4/IPv6)

Static routes manually select a next hop or outgoing interface for a destination prefix. A floating route uses a higher administrative distance to serve as a backup.

Next-hop route Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[NEXT-HOP]
IPv4 next-hop address.
Exit-interface route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [INTERFACE]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
Fully specified route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [INTERFACE] [NEXT-HOP]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NEXT-HOP]
IPv4 next-hop address.
Default route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip route 0.0.0.0 0.0.0.0 [NEXT-HOP]
end
Command parameters
[NEXT-HOP]
IPv4 next-hop address.
Floating backup route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Choose a distance greater than the preferred route.
enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP] [BACKUP-DISTANCE]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[NEXT-HOP]
IPv4 next-hop address.
[BACKUP-DISTANCE]
Administrative distance of the floating route; greater than the primary.
Next-hop route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Exit-interface route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
Fully specified route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE] [NEXT-HOP-IPV6]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Default route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
enable
configure terminal
ipv6 route ::/0 [NEXT-HOP-IPV6]
end
Command parameters
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Floating backup route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Choose a distance greater than the preferred route.
  • Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6] [BACKUP-DISTANCE]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
[BACKUP-DISTANCE]
Administrative distance of the floating route; greater than the primary.
OSPFv3 (Address Family)

OSPFv3 Address Family carries IPv4 and IPv6 routes in separate address families using IPv6 link-local transport. This is the AF syntax, not the traditional IPv6-only configuration.

IPV4 unicast address family Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: ospfv3-af-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [ROUTER-ID]
 address-family ipv4 unicast
 exit-address-family
 exit
interface [INTERFACE]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
 exit
end
Command parameters
[PROCESS-ID]
Local routing process identifier.
[ROUTER-ID]
Unique 32-bit routing protocol router ID in dotted decimal notation.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[AREA-ID]
OSPF area number or dotted area ID.
Peer configuration — Adjacent router or L3 switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: AREA-ID

  • Use the peer's own addresses and interfaces. Process IDs are locally significant. Match area and compatible link parameters.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [PEER-ROUTER-ID]
 address-family ipv4 unicast
 exit-address-family
 exit
interface [INTERFACE]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
 exit
end
IPV6 unicast address family Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: ospfv3-af-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [ROUTER-ID]
 address-family ipv6 unicast
 exit-address-family
 exit
interface [INTERFACE]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
 exit
end
Command parameters
[PROCESS-ID]
Local routing process identifier.
[ROUTER-ID]
Unique 32-bit routing protocol router ID in dotted decimal notation.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[AREA-ID]
OSPF area number or dotted area ID.
Peer configuration — Adjacent router or L3 switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: AREA-ID

  • Use the peer's own addresses and interfaces. Process IDs are locally significant. Match area and compatible link parameters.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [PEER-ROUTER-ID]
 address-family ipv6 unicast
 exit-address-family
 exit
interface [INTERFACE]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
 exit
end
Both address families Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: ospfv3-af-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [ROUTER-ID]
 address-family ipv4 unicast
 exit-address-family
 address-family ipv6 unicast
 exit-address-family
 exit
interface [INTERFACE]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
 ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
 exit
end
Command parameters
[PROCESS-ID]
Local routing process identifier.
[ROUTER-ID]
Unique 32-bit routing protocol router ID in dotted decimal notation.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[AREA-ID]
OSPF area number or dotted area ID.
Peer configuration — Adjacent router or L3 switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: AREA-ID

  • Use the peer's own addresses and interfaces. Process IDs are locally significant. Match area and compatible link parameters.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [PEER-ROUTER-ID]
 address-family ipv4 unicast
 exit-address-family
 address-family ipv6 unicast
 exit-address-family
 exit
interface [INTERFACE]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
 ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
 exit
end
IPV4 VRF address family Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: ospfv3-af-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
  • On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
  • For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
  • Use capability vrf-lite when required for the lab.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [ROUTER-ID]
 address-family ipv4 unicast vrf [VRF-NAME]
  capability vrf-lite
 exit-address-family
 exit
interface [INTERFACE]
 vrf forwarding [VRF-NAME]
 ip address [IP-ADDRESS] [SUBNET-MASK]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
 no shutdown
 exit
end
Command parameters
[PROCESS-ID]
Local routing process identifier.
[ROUTER-ID]
Unique 32-bit routing protocol router ID in dotted decimal notation.
[VRF-NAME]
Local VRF name; align it with the task.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[AREA-ID]
OSPF area number or dotted area ID.
Peer configuration — Adjacent router or L3 switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: AREA-ID, SUBNET-MASK

  • Use the peer's own addresses and interfaces. Process IDs are locally significant. Match area and compatible link parameters.
  • Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
  • On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
  • For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
  • Use capability vrf-lite when required for the lab.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [PEER-ROUTER-ID]
 address-family ipv4 unicast vrf [VRF-NAME]
  capability vrf-lite
 exit-address-family
 exit
interface [INTERFACE]
 vrf forwarding [VRF-NAME]
 ip address [REMOTE-IP-ADDRESS] [SUBNET-MASK]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
 no shutdown
 exit
end
IPV6 VRF address family Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: ospfv3-af-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
  • On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
  • For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
  • Use capability vrf-lite when required for the lab.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [ROUTER-ID]
 address-family ipv6 unicast vrf [VRF-NAME]
  capability vrf-lite
 exit-address-family
 exit
interface [INTERFACE]
 vrf forwarding [VRF-NAME]
 ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
 no shutdown
 exit
end
Command parameters
[PROCESS-ID]
Local routing process identifier.
[ROUTER-ID]
Unique 32-bit routing protocol router ID in dotted decimal notation.
[VRF-NAME]
Local VRF name; align it with the task.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[AREA-ID]
OSPF area number or dotted area ID.
Peer configuration — Adjacent router or L3 switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: AREA-ID, PREFIX-LENGTH

  • Use the peer's own addresses and interfaces. Process IDs are locally significant. Match area and compatible link parameters.
  • Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
  • On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
  • For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
  • Use capability vrf-lite when required for the lab.
enable
configure terminal
ipv6 unicast-routing
router ospfv3 [PROCESS-ID]
 router-id [PEER-ROUTER-ID]
 address-family ipv6 unicast vrf [VRF-NAME]
  capability vrf-lite
 exit-address-family
 exit
interface [INTERFACE]
 vrf forwarding [VRF-NAME]
 ipv6 address [PEER-IPV6-ADDRESS]/[PREFIX-LENGTH]
 ipv6 enable
 ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
 no shutdown
 exit
end
Port Security

Port Security restricts source MAC addresses on an access port. Dynamic, static and sticky learning can be combined with a maximum address count and a violation action.

Sticky MAC – protect Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: port-security-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 switchport port-security
 switchport port-security maximum [MAX-MAC]
 switchport port-security mac-address sticky
 switchport port-security violation protect
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[MAX-MAC]
Maximum secure MAC addresses.
Sticky MAC – restrict Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: port-security-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 switchport port-security
 switchport port-security maximum [MAX-MAC]
 switchport port-security mac-address sticky
 switchport port-security violation restrict
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[MAX-MAC]
Maximum secure MAC addresses.
Sticky MAC – shutdown Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: port-security-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 switchport port-security
 switchport port-security maximum [MAX-MAC]
 switchport port-security mac-address sticky
 switchport port-security violation shutdown
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[MAX-MAC]
Maximum secure MAC addresses.
Statically allowed MAC Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: port-security-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 switchport port-security
 switchport port-security maximum [MAX-MAC]
 switchport port-security mac-address [MAC-ADDRESS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[MAX-MAC]
Maximum secure MAC addresses.
[MAC-ADDRESS]
MAC address in Cisco dotted hexadecimal notation.
Dynamic secure MAC learning Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: port-security-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 switchport port-security
 switchport port-security maximum [MAX-MAC]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
[MAX-MAC]
Maximum secure MAC addresses.
Password Hashing Algorithms

Cisco credential types describe how a password or key is stored. Type 0 is plaintext, type 7 is reversible obfuscation, type 5 is legacy MD5 hashing, and types 8 and 9 use stronger password hashing. Type 6 is reversible AES encryption for credentials that must be recovered by the device; it is not a password hash.

Generate type 9 (scrypt) local secret Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: password-hashing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
username [USERNAME] algorithm-type scrypt secret [PASSWORD]
enable algorithm-type scrypt secret [ENABLE-SECRET]
end
Command parameters
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
[ENABLE-SECRET]
New enable password, not a pre-encoded hash.
Generate type 8 (PBKDF2-SHA256) secret Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: password-hashing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
username [USERNAME] algorithm-type sha256 secret [PASSWORD]
enable algorithm-type sha256 secret [ENABLE-SECRET]
end
Command parameters
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
[ENABLE-SECRET]
New enable password, not a pre-encoded hash.
Generate legacy type 5 (MD5) secret Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: password-hashing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Legacy exam compatibility only; modern platforms may reject or convert type 5.
enable
configure terminal
username [USERNAME] algorithm-type md5 secret [PASSWORD]
enable algorithm-type md5 secret [ENABLE-SECRET]
end
Command parameters
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
[ENABLE-SECRET]
New enable password, not a pre-encoded hash.
Explicit type 0 line password Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: password-hashing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Plaintext input and storage unless password encryption is enabled.
enable
configure terminal
line console 0
 password 0 [PASSWORD]
 login
 exit
end
Command parameters
[PASSWORD]
New local or line password; never include a real password in shared material.
Legacy service password encryption Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: password-hashing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Obfuscates applicable plaintext line passwords as type 7. It does not create a strong hash.
enable
configure terminal
service password-encryption
end
Import an already encoded type 9 secret Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: password-hashing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • The value must already be a valid encoded type 9 secret, not a plaintext password.
enable
configure terminal
username [USERNAME] secret 9 [ENCODED-TYPE9-SECRET]
end
Command parameters
[USERNAME]
Local user account name.
[ENCODED-TYPE9-SECRET]
Existing valid type 9 encoded hash, not plaintext.
Local User Authentication

Local authentication verifies logins using accounts stored on the device. A username secret is preferable to a shared line password.

Local user with secret Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
username [USERNAME] privilege [PRIVILEGE] secret [PASSWORD]
end
Command parameters
[USERNAME]
Local user account name.
[PRIVILEGE]
Cisco privilege level, normally 0 to 15.
[PASSWORD]
New local or line password; never include a real password in shared material.
Console local authentication Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
username [USERNAME] privilege 15 secret [PASSWORD]
line console 0
 login local
 exit
end
Command parameters
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
VTY local authentication Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
username [USERNAME] privilege 15 secret [PASSWORD]
line vty 0 [VTY-LAST]
 login local
 exit
end
Command parameters
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
[VTY-LAST]
Last VTY line number supported by the device; configure remaining lines as needed.
SSH

SSH provides encrypted remote CLI access. Cisco SSH requires a device identity, RSA keys and an authentication method.

SSH version 2 with local authentication Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • Key generation may prompt or reject replacement if a key already exists. Do not overwrite an existing working key unnecessarily.
enable
configure terminal
hostname [HOSTNAME]
ip domain-name [DOMAIN-NAME]
username [USERNAME] privilege 15 secret [PASSWORD]
crypto key generate rsa modulus 2048
ip ssh version 2
line vty 0 [VTY-LAST]
 login local
 transport input ssh
 exit
end
Command parameters
[HOSTNAME]
Local Cisco device hostname.
[DOMAIN-NAME]
Device domain name.
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
[VTY-LAST]
Last VTY line number supported by the device; configure remaining lines as needed.
Optional SSH and VTY timeouts Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link
enable
configure terminal
ip ssh time-out [SSH-TIMEOUT-SECONDS]
ip ssh authentication-retries [RETRY-COUNT]
line vty 0 [VTY-LAST]
 exec-timeout [IDLE-MINUTES] [IDLE-SECONDS]
 exit
end
Command parameters
[SSH-TIMEOUT-SECONDS]
SSH negotiation/authentication timeout in seconds.
[RETRY-COUNT]
SSH authentication retry count.
[VTY-LAST]
Last VTY line number supported by the device; configure remaining lines as needed.
[IDLE-MINUTES]
VTY idle timeout minutes.
[IDLE-SECONDS]
Additional VTY idle timeout seconds.
Telnet

Telnet provides unencrypted CLI access. It is included for the practical exam, but credentials and traffic are sent without SSH encryption.

Telnet with local user Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: telnet-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
username [USERNAME] privilege 15 secret [PASSWORD]
line vty 0 [VTY-LAST]
 login local
 transport input telnet
 exit
end
Command parameters
[USERNAME]
Local user account name.
[PASSWORD]
New local or line password; never include a real password in shared material.
[VTY-LAST]
Last VTY line number supported by the device; configure remaining lines as needed.
Telnet with line password Optional when requested
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: telnet-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
line vty 0 [VTY-LAST]
 password [PASSWORD]
 login
 transport input telnet
 exit
end
Command parameters
[VTY-LAST]
Last VTY line number supported by the device; configure remaining lines as needed.
[PASSWORD]
New local or line password; never include a real password in shared material.
Allow both SSH and Telnet Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: telnet-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • SSH prerequisites must already be configured.
enable
configure terminal
line vty 0 [VTY-LAST]
 login local
 transport input ssh telnet
 exit
end
Command parameters
[VTY-LAST]
Last VTY line number supported by the device; configure remaining lines as needed.

Save configuration

Run after successful verification. Confirm the destination filename if prompted.

copy running-config startup-config

Verify All

Read-only checks. Lines containing placeholders are commented; choose and adapt before running. Do not share unredacted configuration output.

Download Verify TXT
! Pcornel Finals - Skills Exam / L3 Switch Verify All
! Content version: 1.1-draft
! Privileged EXEC. Run the relevant checks; commands with placeholders require replacement.
! The show running-config/startup-config output may contain sensitive credentials.
! Disruptive tests and credential-bearing tests are excluded.

! VLAN
show vlan brief
! show interfaces [INTERFACE] switchport
show ip interface brief
show ipv6 interface brief

! 802.1Q Trunking
show interfaces trunk

! DTP
! show dtp interface [INTERFACE]

! EtherChannel
show etherchannel summary
show etherchannel port-channel
show lacp neighbor
show pagp neighbor

! STP
! show spanning-tree vlan [VLAN-ID]
show spanning-tree
show spanning-tree summary

! PortFast
! show spanning-tree interface [INTERFACE] detail

! BPDU Guard
show interfaces status err-disabled
show errdisable recovery

! VRF-Lite (IPv4/IPv6)
show vrf
! show ip route vrf [VRF-NAME]
! show ipv6 route vrf [VRF-NAME]

! IPv4 and IPv6 Addressing
! show interfaces [INTERFACE]

! Static Routing (IPv4/IPv6)
show ip route static
show ipv6 route static
! show ip route [DESTINATION-IP]
! show ipv6 route [DESTINATION-IPV6]

! OSPFv3 (Address Family)
show ospfv3 neighbor
show ospfv3 interface
show ip route ospfv3
show ipv6 route ospf

! Port Security
! show port-security interface [INTERFACE]
show port-security address

! Password Hashing Algorithms
show running-config | include ^username
show running-config | include ^enable secret
show running-config | include ^service password-encryption

! Local User Authentication
show running-config | section ^line
show privilege

! SSH
show ip ssh
show ssh
show running-config | section ^line vty

! Telnet
show users

! Final device verification
show ip route
show ipv6 route
show running-config
show startup-config

Skills Exam · L3 Switch — Golden Script

! Pcornel Finals - Skills Exam / L3 Switch
! Content version: 1.1-draft
! REFERENCE ONLY: replace every placeholder and choose the correct device/task-specific variants.
! Basic configuration is active text; all alternative sections below are commented references.
! Use Copy Section for a single relevant variant. Do not paste this entire file blindly.

! Basic configuration
enable
configure terminal
hostname [HOSTNAME]
ip domain-name [DOMAIN-NAME]
enable secret [ENABLE-SECRET]
username [USERNAME] privilege 15 secret [PASSWORD]
line console 0
 login local
 logging synchronous
 exit
line vty 0 [VTY-LAST]
 login local
 exit
ip routing
ipv6 unicast-routing
end

! VLAN / Create a VLAN
! enable
! configure terminal
! vlan [VLAN-ID]
!  name [VLAN-NAME]
!  exit
! end

! VLAN / Assign an access interface
! enable
! configure terminal
! vlan [VLAN-ID]
!  name [VLAN-NAME]
!  exit
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! VLAN / Layer 3 SVI
! enable
! configure terminal
! ip routing
! vlan [VLAN-ID]
!  name [VLAN-NAME]
!  exit
! interface vlan [VLAN-ID]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! VLAN / IPv6 routed SVI
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! vlan [VLAN-ID]
!  exit
! interface vlan [VLAN-ID]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! VLAN / Voice VLAN (only if requested)
! enable
! configure terminal
! vlan [VLAN-ID]
!  exit
! vlan [VOICE-VLAN]
!  exit
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport voice vlan [VOICE-VLAN]
!  no shutdown
!  exit
! end

! 802.1Q Trunking / Static 802.1Q trunk
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! DTP / Dynamic desirable / auto
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode dynamic desirable
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! DTP / Dynamic desirable / desirable
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode dynamic desirable
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! DTP / Static trunk without DTP
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  switchport nonegotiate
!  exit
! end

! EtherChannel / TRUNK – LACP active / active
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – LACP active / passive
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – PAgP desirable / desirable
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – PAgP desirable / auto
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / TRUNK – Static on / on
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – LACP active / active
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – LACP active / passive
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – PAgP desirable / desirable
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – PAgP desirable / auto
! PAgP support is platform-dependent.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ACCESS – Static on / on
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! interface range [INTERFACE-RANGE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / active
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / passive
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / desirable
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / auto
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – Static on / on
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! ip routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / active (IPv6)
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – LACP active / passive (IPv6)
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode active
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / desirable (IPv6)
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – PAgP desirable / auto (IPv6)
! PAgP support is platform-dependent.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode desirable
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! EtherChannel / ROUTED – Static on / on (IPv6)
! Both endpoints must be explicitly configured on; incorrect static bundling can cause loops or loss of traffic.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface range [INTERFACE-RANGE]
!  no switchport
!  channel-group [CHANNEL-GROUP] mode on
!  no shutdown
!  exit
! interface port-channel [CHANNEL-GROUP]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! STP / Rapid PVST+
! enable
! configure terminal
! spanning-tree mode rapid-pvst
! end

! STP / PVST+
! enable
! configure terminal
! spanning-tree mode pvst
! end

! STP / Root primary
! enable
! configure terminal
! spanning-tree vlan [VLAN-ID] root primary
! end

! STP / Root secondary
! enable
! configure terminal
! spanning-tree vlan [VLAN-ID] root secondary
! end

! STP / Explicit bridge priority
! Use an allowed multiple of 4096; a lower bridge ID is preferred.
! enable
! configure terminal
! spanning-tree vlan [VLAN-ID] priority [BRIDGE-PRIORITY]
! end

! STP / Explicit port cost
! enable
! configure terminal
! interface [INTERFACE]
!  spanning-tree vlan [VLAN-ID] cost [STP-COST]
!  exit
! end

! STP / Explicit port priority
! Port priority is an additional tie-breaker; select a supported increment.
! enable
! configure terminal
! interface [INTERFACE]
!  spanning-tree vlan [VLAN-ID] port-priority [PORT-PRIORITY]
!  exit
! end

! PortFast / Access edge port
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  spanning-tree portfast
!  no shutdown
!  exit
! end

! PortFast / Default on access edge ports
! Review all affected non-trunk interfaces first.
! enable
! configure terminal
! spanning-tree portfast default
! end

! PortFast / Trunk to an edge endpoint
! On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
! Use only for an explicitly intended edge trunk, never a normal switch-to-switch trunk.
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport trunk encapsulation dot1q
!  switchport mode trunk
!  switchport trunk native vlan [NATIVE-VLAN]
!  switchport trunk allowed vlan [ALLOWED-VLANS]
!  no shutdown
!  spanning-tree portfast trunk
!  exit
! end

! BPDU Guard / Interface BPDU Guard
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  spanning-tree portfast
!  spanning-tree bpduguard enable
!  no shutdown
!  exit
! end

! BPDU Guard / Global PortFast BPDU Guard
! enable
! configure terminal
! spanning-tree portfast default
! spanning-tree portfast bpduguard default
! end

! BPDU Guard / Optional timed recovery
! Only enable automatic recovery if requested. A persistent BPDU source can repeatedly disable the port.
! enable
! configure terminal
! errdisable recovery cause bpduguard
! errdisable recovery interval [RECOVERY-SECONDS]
! end

! VRF-Lite (IPv4/IPv6) / Define a dual-stack VRF
! enable
! configure terminal
! vrf definition [VRF-NAME]
!  address-family ipv4
!  exit-address-family
!  address-family ipv6
!  exit-address-family
!  exit
! end

! VRF-Lite (IPv4/IPv6) / Assign L3 switch routed port
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface [INTERFACE]
!  no switchport
!  vrf forwarding [VRF-NAME]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! VRF-Lite (IPv4/IPv6) / IPv4 VRF static route
! enable
! configure terminal
! ip route vrf [VRF-NAME] [NETWORK] [SUBNET-MASK] [NEXT-HOP]
! end

! VRF-Lite (IPv4/IPv6) / IPv6 VRF static route
! enable
! configure terminal
! ipv6 route vrf [VRF-NAME] [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
! end

! VRF-Lite (IPv4/IPv6) / Define IPV4 VRF
! enable
! configure terminal
! vrf definition [VRF-NAME]
!  address-family ipv4
!  exit-address-family
!  exit
! end

! VRF-Lite (IPv4/IPv6) / Define IPV6 VRF
! enable
! configure terminal
! vrf definition [VRF-NAME]
!  address-family ipv6
!  exit-address-family
!  exit
! end

! VRF-Lite (IPv4/IPv6) / L3 switch IPV4 routed VRF interface
! Define the required VRF address family first. Moving an interface to a VRF can remove existing addresses; restore all required addresses and apply no switchport only on physical routed switchports.
! enable
! configure terminal
! ip routing
! interface [INTERFACE]
!  no switchport
!  vrf forwarding [VRF-NAME]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! VRF-Lite (IPv4/IPv6) / L3 switch IPV6 routed VRF interface
! Define the required VRF address family first. Moving an interface to a VRF can remove existing addresses; restore all required addresses and apply no switchport only on physical routed switchports.
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface [INTERFACE]
!  no switchport
!  vrf forwarding [VRF-NAME]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! IPv4 and IPv6 Addressing / L3 switch routed IPv4
! enable
! configure terminal
! ip routing
! interface [INTERFACE]
!  no switchport
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  no shutdown
!  exit
! end

! IPv4 and IPv6 Addressing / L3 switch routed IPv6
! enable
! configure terminal
! ip routing
! ipv6 unicast-routing
! interface [INTERFACE]
!  no switchport
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  no shutdown
!  exit
! end

! IPv4 and IPv6 Addressing / IPv4 loopback
! enable
! configure terminal
! interface loopback [LOOPBACK-ID]
!  ip address [LOOPBACK-IP] 255.255.255.255
!  exit
! end

! IPv4 and IPv6 Addressing / IPv6 loopback
! enable
! configure terminal
! ipv6 unicast-routing
! interface loopback [LOOPBACK-ID]
!  ipv6 address [LOOPBACK-IPV6]/128
!  exit
! end

! IPv4 and IPv6 Addressing / Manual link-local address
! enable
! configure terminal
! interface [INTERFACE]
!  ipv6 address [LINK-LOCAL-ADDRESS] link-local
!  exit
! end

! Static Routing (IPv4/IPv6) / Next-hop route
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP]
! end

! Static Routing (IPv4/IPv6) / Exit-interface route
! Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [INTERFACE]
! end

! Static Routing (IPv4/IPv6) / Fully specified route
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [INTERFACE] [NEXT-HOP]
! end

! Static Routing (IPv4/IPv6) / Default route
! enable
! configure terminal
! ip route 0.0.0.0 0.0.0.0 [NEXT-HOP]
! end

! Static Routing (IPv4/IPv6) / Floating backup route
! Choose a distance greater than the preferred route.
! enable
! configure terminal
! ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP] [BACKUP-DISTANCE]
! end

! Static Routing (IPv4/IPv6) / Next-hop route
! Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
! end

! Static Routing (IPv4/IPv6) / Exit-interface route
! Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE]
! end

! Static Routing (IPv4/IPv6) / Fully specified route
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE] [NEXT-HOP-IPV6]
! end

! Static Routing (IPv4/IPv6) / Default route
! Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
! enable
! configure terminal
! ipv6 route ::/0 [NEXT-HOP-IPV6]
! end

! Static Routing (IPv4/IPv6) / Floating backup route
! Choose a distance greater than the preferred route.
! Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
! enable
! configure terminal
! ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6] [BACKUP-DISTANCE]
! end

! OSPFv3 (Address Family) / IPV4 unicast address family
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv4 unicast
!  exit-address-family
!  exit
! interface [INTERFACE]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
!  exit
! end

! OSPFv3 (Address Family) / IPV6 unicast address family
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv6 unicast
!  exit-address-family
!  exit
! interface [INTERFACE]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
!  exit
! end

! OSPFv3 (Address Family) / Both address families
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv4 unicast
!  exit-address-family
!  address-family ipv6 unicast
!  exit-address-family
!  exit
! interface [INTERFACE]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
!  ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
!  exit
! end

! OSPFv3 (Address Family) / IPV4 VRF address family
! Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
! On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
! For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
! Use capability vrf-lite when required for the lab.
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv4 unicast vrf [VRF-NAME]
!   capability vrf-lite
!  exit-address-family
!  exit
! interface [INTERFACE]
!  vrf forwarding [VRF-NAME]
!  ip address [IP-ADDRESS] [SUBNET-MASK]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv4 area [AREA-ID]
!  no shutdown
!  exit
! end

! OSPFv3 (Address Family) / IPV6 VRF address family
! Define the VRF with the required address families first. For IPv4 OSPFv3, IPv6 processing must also be available on the link.
! On an L3 switch, enable ip routing and convert physical routed ports with no switchport before this block; do not use no switchport on router interfaces or SVIs.
! For initial configuration or an intentional VRF move only: changing VRF membership can remove existing IP addresses. Record and restore all required IPv4/IPv6 addresses, including the other family on a dual-stack link. If the interface is already in the correct VRF, omit the VRF reassignment and retain existing addressing.
! Use capability vrf-lite when required for the lab.
! enable
! configure terminal
! ipv6 unicast-routing
! router ospfv3 [PROCESS-ID]
!  router-id [ROUTER-ID]
!  address-family ipv6 unicast vrf [VRF-NAME]
!   capability vrf-lite
!  exit-address-family
!  exit
! interface [INTERFACE]
!  vrf forwarding [VRF-NAME]
!  ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
!  ipv6 enable
!  ospfv3 [PROCESS-ID] ipv6 area [AREA-ID]
!  no shutdown
!  exit
! end

! Port Security / Sticky MAC – protect
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address sticky
!  switchport port-security violation protect
!  no shutdown
!  exit
! end

! Port Security / Sticky MAC – restrict
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address sticky
!  switchport port-security violation restrict
!  no shutdown
!  exit
! end

! Port Security / Sticky MAC – shutdown
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address sticky
!  switchport port-security violation shutdown
!  no shutdown
!  exit
! end

! Port Security / Statically allowed MAC
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  switchport port-security mac-address [MAC-ADDRESS]
!  no shutdown
!  exit
! end

! Port Security / Dynamic secure MAC learning
! enable
! configure terminal
! interface [INTERFACE]
!  switchport
!  switchport mode access
!  switchport access vlan [VLAN-ID]
!  switchport port-security
!  switchport port-security maximum [MAX-MAC]
!  no shutdown
!  exit
! end

! Password Hashing Algorithms / Generate type 9 (scrypt) local secret
! enable
! configure terminal
! username [USERNAME] algorithm-type scrypt secret [PASSWORD]
! enable algorithm-type scrypt secret [ENABLE-SECRET]
! end

! Password Hashing Algorithms / Generate type 8 (PBKDF2-SHA256) secret
! enable
! configure terminal
! username [USERNAME] algorithm-type sha256 secret [PASSWORD]
! enable algorithm-type sha256 secret [ENABLE-SECRET]
! end

! Password Hashing Algorithms / Generate legacy type 5 (MD5) secret
! Legacy exam compatibility only; modern platforms may reject or convert type 5.
! enable
! configure terminal
! username [USERNAME] algorithm-type md5 secret [PASSWORD]
! enable algorithm-type md5 secret [ENABLE-SECRET]
! end

! Password Hashing Algorithms / Explicit type 0 line password
! Plaintext input and storage unless password encryption is enabled.
! enable
! configure terminal
! line console 0
!  password 0 [PASSWORD]
!  login
!  exit
! end

! Password Hashing Algorithms / Legacy service password encryption
! Obfuscates applicable plaintext line passwords as type 7. It does not create a strong hash.
! enable
! configure terminal
! service password-encryption
! end

! Password Hashing Algorithms / Import an already encoded type 9 secret
! The value must already be a valid encoded type 9 secret, not a plaintext password.
! enable
! configure terminal
! username [USERNAME] secret 9 [ENCODED-TYPE9-SECRET]
! end

! Local User Authentication / Local user with secret
! enable
! configure terminal
! username [USERNAME] privilege [PRIVILEGE] secret [PASSWORD]
! end

! Local User Authentication / Console local authentication
! enable
! configure terminal
! username [USERNAME] privilege 15 secret [PASSWORD]
! line console 0
!  login local
!  exit
! end

! Local User Authentication / VTY local authentication
! enable
! configure terminal
! username [USERNAME] privilege 15 secret [PASSWORD]
! line vty 0 [VTY-LAST]
!  login local
!  exit
! end

! SSH / SSH version 2 with local authentication
! Key generation may prompt or reject replacement if a key already exists. Do not overwrite an existing working key unnecessarily.
! enable
! configure terminal
! hostname [HOSTNAME]
! ip domain-name [DOMAIN-NAME]
! username [USERNAME] privilege 15 secret [PASSWORD]
! crypto key generate rsa modulus 2048
! ip ssh version 2
! line vty 0 [VTY-LAST]
!  login local
!  transport input ssh
!  exit
! end

! SSH / Optional SSH and VTY timeouts
! enable
! configure terminal
! ip ssh time-out [SSH-TIMEOUT-SECONDS]
! ip ssh authentication-retries [RETRY-COUNT]
! line vty 0 [VTY-LAST]
!  exec-timeout [IDLE-MINUTES] [IDLE-SECONDS]
!  exit
! end

! Telnet / Telnet with local user
! enable
! configure terminal
! username [USERNAME] privilege 15 secret [PASSWORD]
! line vty 0 [VTY-LAST]
!  login local
!  transport input telnet
!  exit
! end

! Telnet / Telnet with line password
! enable
! configure terminal
! line vty 0 [VTY-LAST]
!  password [PASSWORD]
!  login
!  transport input telnet
!  exit
! end

! Telnet / Allow both SSH and Telnet
! SSH prerequisites must already be configured.
! enable
! configure terminal
! line vty 0 [VTY-LAST]
!  login local
!  transport input ssh telnet
!  exit
! end

! Save only after reviewing and verifying the configuration:
! copy running-config startup-config
! Confirm the destination filename if prompted.

Verify All

! Pcornel Finals - Skills Exam / L3 Switch Verify All
! Content version: 1.1-draft
! Privileged EXEC. Run the relevant checks; commands with placeholders require replacement.
! The show running-config/startup-config output may contain sensitive credentials.
! Disruptive tests and credential-bearing tests are excluded.

! VLAN
show vlan brief
! show interfaces [INTERFACE] switchport
show ip interface brief
show ipv6 interface brief

! 802.1Q Trunking
show interfaces trunk

! DTP
! show dtp interface [INTERFACE]

! EtherChannel
show etherchannel summary
show etherchannel port-channel
show lacp neighbor
show pagp neighbor

! STP
! show spanning-tree vlan [VLAN-ID]
show spanning-tree
show spanning-tree summary

! PortFast
! show spanning-tree interface [INTERFACE] detail

! BPDU Guard
show interfaces status err-disabled
show errdisable recovery

! VRF-Lite (IPv4/IPv6)
show vrf
! show ip route vrf [VRF-NAME]
! show ipv6 route vrf [VRF-NAME]

! IPv4 and IPv6 Addressing
! show interfaces [INTERFACE]

! Static Routing (IPv4/IPv6)
show ip route static
show ipv6 route static
! show ip route [DESTINATION-IP]
! show ipv6 route [DESTINATION-IPV6]

! OSPFv3 (Address Family)
show ospfv3 neighbor
show ospfv3 interface
show ip route ospfv3
show ipv6 route ospf

! Port Security
! show port-security interface [INTERFACE]
show port-security address

! Password Hashing Algorithms
show running-config | include ^username
show running-config | include ^enable secret
show running-config | include ^service password-encryption

! Local User Authentication
show running-config | section ^line
show privilege

! SSH
show ip ssh
show ssh
show running-config | section ^line vty

! Telnet
show users

! Final device verification
show ip route
show ipv6 route
show running-config
show startup-config

Reset checklist?

Command block

Back to Top

Confirmation

Confirm action

Continue?