interface [type] [number]
Transitions the CLI from Global Configuration Mode into Interface Configuration Mode. This is required to modify the physical or logical parameters of a specific port, such as assigning IP addresses, opening the port, or applying access control lists.
Quick Reference
Router(config)#Router(config-if)#default interface [type] [number]Syntax & Parameters
| Parameter | Description & Examples |
|---|---|
| [type] | The physical media or logical architecture of the connection.
|
| [number] | The modular hardware designation, formatted depending on the chassis size:
|
CLI Deployment Scenarios
Scenario 1: Accessing a Physical Router Port
You need to apply an IP address to the router's connection pointing toward the local LAN switch using common shorthand notation.
Scenario 2: Creating a Switch Virtual Interface (SVI)
You are configuring Inter-VLAN routing on a Multilayer Switch. You need to create a logical gateway interface for VLAN 20.
CCNA Exam Gotchas
Dynamic Creation of Logical Interfaces
If you try to enter a physical port that doesn't exist (e.g., interface g0/99), Cisco IOS will reject the command. However, if you type a logical interface that doesn't exist yet (like interface loopback 1 or interface vlan 50), the router will assume you want to build it and will instantly create it and bring the line protocol up.
The "Default Interface" Nuke
One of the most useful tricks for simulator labs: If a port is completely messed up with old IP addresses, weird NAT statements, or bad ACLs, do not go into the interface and try to negate them one by one. In Global Config mode, execute default interface g0/1. It will wipe the interface totally clean back to its factory default state.