Back to Command Reference
Global ConfigDomain 3.0

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

Execution ModeRouter(config)#
Submode PromptRouter(config-if)#
Hardware Shorthandint g0/0 (GigabitEthernet)
Factory Reset Commanddefault interface [type] [number]

Syntax & Parameters

interface [type] [number]
ParameterDescription & Examples
[type]The physical media or logical architecture of the connection.
  • FastEthernet (fa): 100 Mbps Copper/Fiber
  • GigabitEthernet (g/gi): 1 Gbps Copper/Fiber
  • TenGigabitEthernet (te): 10 Gbps Fiber
  • Vlan: A logical Layer 3 Switch Virtual Interface (SVI)
  • Loopback (lo): A logical virtual router interface
[number]The modular hardware designation, formatted depending on the chassis size:
  • 0/1 (Module/Port) — Common on fixed-configuration routers.
  • 1/0/24 (Switch/Module/Port) — Common on stackable switches (e.g., Catalyst 3750/9300).

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.

Router(config)# int g0/0
Router(config-if)# ! You can now type 'ip address...'

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.

Switch(config)# interface vlan 20
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)# ! The logical routing interface was dynamically generated.

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.