interface [type] [number]
Enters interface configuration mode for a specific interface (e.g., GigabitEthernet0/1) to configure Layer 2 or Layer 3 parameters.
interface [type] [number]When to Use This Command
- Assigning an IP address to a router interface for routing between VLANs.
- Configuring switchport mode access or trunk on a switch interface.
- Setting duplex and speed on a router or switch interface.
- Enabling or disabling an interface with the 'no shutdown' or 'shutdown' command.
Command Examples
Configuring an IP address on a router interface
interface GigabitEthernet0/1Router(config-if)#
The prompt changes to config-if mode, indicating you are now configuring interface GigabitEthernet0/1. From here, you can issue commands like 'ip address 192.168.1.1 255.255.255.0' and 'no shutdown'.
Configuring a switch interface as a trunk
interface GigabitEthernet0/1Switch(config-if)#
After entering interface configuration mode, you can set the switchport mode to trunk with 'switchport mode trunk' and specify allowed VLANs.
Understanding the Output
The command itself does not produce output; it changes the CLI prompt to indicate you are in interface configuration mode. The prompt changes from 'Router(config)#' to 'Router(config-if)#' (or 'Switch(config-if)#' for switches). This confirms you are now configuring the specified interface. Any subsequent commands will apply to that interface until you exit with 'exit' or 'end'.
CCNA Exam Tips
CCNA exam tip: Remember that 'interface' is a global config command; you must be in global config mode first.
CCNA exam tip: The interface type and number must match exactly (e.g., GigabitEthernet0/1, not G0/1 unless shorthand is supported).
CCNA exam tip: On switches, 'interface range' can configure multiple interfaces at once, but 'interface' alone targets a single interface.
CCNA exam tip: After entering interface config, you must use 'no shutdown' to enable the interface (default is shutdown on routers, but not on switches).
Common Mistakes
Mistake 1: Forgetting to use 'no shutdown' after configuring an interface, leaving it administratively down.
Mistake 2: Typing the wrong interface number (e.g., GigabitEthernet0/0 instead of 0/1), causing configuration on the wrong interface.
Mistake 3: Trying to enter interface configuration mode from user exec mode instead of global config mode.
Related Commands
interface range [type] [range]
Configures multiple interfaces of the same type simultaneously using a range or comma-separated list, enabling bulk configuration changes like VLAN assignment or port security.
show interfaces
Displays detailed status and statistics for all interfaces or a specific interface, used to verify interface operational state, errors, and performance.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions