! Pcornel Finals - Skills Exam / Router ! 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 ipv6 unicast-routing 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 routed router interface ! enable ! configure terminal ! interface [INTERFACE] ! 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) / Router IPV4 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 ! interface [INTERFACE] ! vrf forwarding [VRF-NAME] ! ip address [IP-ADDRESS] [SUBNET-MASK] ! no shutdown ! exit ! end ! VRF-Lite (IPv4/IPv6) / Router IPV6 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 ! ipv6 unicast-routing ! interface [INTERFACE] ! vrf forwarding [VRF-NAME] ! ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH] ! no shutdown ! exit ! end ! IPv4 and IPv6 Addressing / Router IPv4 ! enable ! configure terminal ! interface [INTERFACE] ! ip address [IP-ADDRESS] [SUBNET-MASK] ! no shutdown ! exit ! end ! IPv4 and IPv6 Addressing / Router IPv6 ! enable ! configure terminal ! ipv6 unicast-routing ! interface [INTERFACE] ! 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 ! Router-on-a-Stick / IPv4 tagged subinterface ! enable ! configure terminal ! interface [INTERFACE] ! no shutdown ! exit ! interface [INTERFACE].[SUBINTERFACE-ID] ! encapsulation dot1Q [VLAN-ID] ! ip address [IP-ADDRESS] [SUBNET-MASK] ! exit ! end ! Router-on-a-Stick / IPv6 tagged subinterface ! enable ! configure terminal ! ipv6 unicast-routing ! interface [INTERFACE] ! no shutdown ! exit ! interface [INTERFACE].[SUBINTERFACE-ID] ! encapsulation dot1Q [VLAN-ID] ! ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH] ! exit ! end ! Router-on-a-Stick / Native VLAN subinterface ! Match the switch-side native VLAN. ! enable ! configure terminal ! interface [INTERFACE] ! no shutdown ! exit ! interface [INTERFACE].[SUBINTERFACE-ID] ! encapsulation dot1Q [NATIVE-VLAN] native ! ip address [IP-ADDRESS] [SUBNET-MASK] ! 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 ! 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.