Basic Interface Configuration (IP Addressing)
In any network, devices must have IP addresses to communicate with each other. On Cisco routers and Layer 3 switches, IP addresses are assigned directly to interfaces. This tutorial explains how to configure a basic IP address on an interface using Cisco IOS, verify the configuration, and avoid common mistakes — all using real IOS output.
This lab is written for beginners and is ideal for CCNA 200-301 exam preparation. Before starting, make sure you have completed Hostname, Password, and Banner Configuration so your device is already named and secured. If you are new to Cisco IOS modes, review that page first.
What Is an Interface?
An interface is a physical or logical connection point on a network device. Think of it as a port where network cables plug in — or in the case of logical interfaces, a virtual connection created in software. Each interface needs its own IP address and subnet mask to participate in Layer 3 communication.
Physical Interfaces
These correspond to actual physical ports on the device:
| Interface Name | Abbreviation | Speed | Common Use |
|---|---|---|---|
| FastEthernet0/0 | fa0/0 |
100 Mbps | Older routers, legacy LAN connections |
| GigabitEthernet0/0 | gi0/0 |
1 Gbps | Modern routers, LAN uplinks |
| GigabitEthernet0/1 | gi0/1 |
1 Gbps | Second LAN segment or WAN link |
| Serial0/0/0 | s0/0/0 |
Varies | WAN connections (leased lines, Frame Relay) |
Logical Interfaces
Logical interfaces do not have a physical port — they are created in software. The most common example on a Cisco switch is an SVI (Switch Virtual Interface), which is used to assign management IP addresses to a switch or to route between VLANs on a Layer 3 switch. For a full inter-VLAN routing walkthrough, see Inter-VLAN Routing on a Layer 3 Switch.
| Interface | Type | Purpose |
|---|---|---|
Vlan1 |
SVI (logical) | Default management interface on Cisco switches |
Vlan10 |
SVI (logical) | Routed interface for VLAN 10 on a Layer 3 switch |
Loopback0 |
Virtual (logical) | Always-up virtual interface used for router IDs and management |
IP Addressing Basics (Quick Review)
Before configuring an interface, you need to understand the two values you will assign: an IP address and a subnet mask. If you need a deeper refresher, see IP Address Classes and Subnetting Guide.
| Component | Example | Purpose |
|---|---|---|
| IP Address | 192.168.1.1 |
Uniquely identifies this interface on the network (Layer 3 address) |
| Subnet Mask | 255.255.255.0 |
Defines which portion of the IP is the network and which is the host |
| CIDR Notation | /24 |
Shorthand for the subnet mask — /24 = 255.255.255.0 |
| Network Address | 192.168.1.0 |
Identifies the subnet — not assignable to any device |
| Broadcast Address | 192.168.1.255 |
Sends to all hosts in the subnet — not assignable to any device |
192.168.1.1/24 and
192.168.1.2/24 can communicate directly.
192.168.1.1/24 and 192.168.2.1/24 cannot — they are in different
subnets and require a router to communicate.
For background on address ranges, see Private vs Public IP Addresses.
Lab Scenario
In this lab, you will configure IP addressing on the following topology:
| Device | Interface | IP Address | Subnet Mask | Role |
|---|---|---|---|---|
| NetsTuts_R1 (Router) | GigabitEthernet0/0 | 192.168.1.1 | 255.255.255.0 | Default gateway for LAN |
| NetsTuts_R1 (Router) | GigabitEthernet0/1 | 10.0.0.1 | 255.255.255.252 | WAN/uplink interface |
| NetsTuts_SW1 (Switch) | Vlan1 (SVI) | 192.168.10.1 | 255.255.255.0 | Switch management interface |
[PC1]──────────────────────────[NetsTuts_R1]──────── WAN
192.168.1.10/24 Gi0/0: 192.168.1.1/24
Gi0/1: 10.0.0.1/30
[NetsTuts_SW1]
Vlan1: 192.168.10.1/24
(management access)
Step-by-Step: Configure IP on a Router Interface
Step 1: Enter Privileged EXEC Mode
From User EXEC mode (the > prompt), type enable to
enter Privileged EXEC mode (the # prompt). If an
enable secret is set,
you will be prompted for a password.
NetsTuts_R1>enable NetsTuts_R1#
Step 2: Enter Global Configuration Mode
Global Configuration mode is required before entering any specific interface or feature configuration.
NetsTuts_R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. NetsTuts_R1(config)#
Step 3: Enter Interface Configuration Mode
Specify the exact interface you want to configure. Use the full name or the accepted abbreviation. You can press Tab to auto-complete.
NetsTuts_R1(config)#interface gigabitEthernet0/0 NetsTuts_R1(config-if)#
(config-if)# confirming you are now in Interface Configuration mode.
Step 4: Assign IP Address and Subnet Mask
Assign the IP address and
subnet mask using the ip address command.
Both values must be entered — IOS will reject the command if either is missing.
NetsTuts_R1(config-if)#ip address 192.168.1.1 255.255.255.0
ip address [IP-ADDRESS] [SUBNET-MASK]To remove the IP address:
no ip address
Step 5: Enable the Interface (no shutdown)
Router interfaces are administratively down by default — unlike switch ports
which are up by default. You must explicitly enable each router interface with no shutdown.
NetsTuts_R1(config-if)#no shutdown
IOS immediately responds with system messages confirming the interface came up:
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
show interfaces to diagnose further.
Step 6: Add a Description (Best Practice)
Adding a description to each interface is a professional best practice. It makes the configuration self-documenting and helps during troubleshooting.
NetsTuts_R1(config-if)#description LAN - Connected to NetsTuts_SW1
Step 7: Exit and Save
NetsTuts_R1(config-if)#exit NetsTuts_R1(config)#exit NetsTuts_R1# %SYS-5-CONFIG_I: Configured from console by console NetsTuts_R1#wr Building configuration... [OK] NetsTuts_R1#
wr or copy running-config startup-config.
Unsaved changes are lost on reload. See Saving & Managing Cisco Configurations.
Configuring a Second Interface (GigabitEthernet0/1)
Most routers have multiple interfaces. Here is how to configure the second interface
(Gi0/1) for a WAN or uplink connection in the same session:
NetsTuts_R1#conf t Enter configuration commands, one per line. End with CNTL/Z. NetsTuts_R1(config)#interface gigabitEthernet0/1 NetsTuts_R1(config-if)#description WAN - Uplink NetsTuts_R1(config-if)#ip address 10.0.0.1 255.255.255.252 NetsTuts_R1(config-if)#no shutdown NetsTuts_R1(config-if)#exit NetsTuts_R1(config)#exit NetsTuts_R1#wr Building configuration... [OK] NetsTuts_R1#
255.255.255.252 is a /30 subnet — it provides exactly 2 usable host addresses,
which is the standard for point-to-point WAN links between two routers.
See Subnetting Guide for details.
Configuring IP on a Layer 3 Switch (SVI)
On a Cisco switch, you cannot assign an IP address to a physical port
directly (unless it is a Layer 3 switch in routed mode). Instead, IP addresses are assigned to
SVIs (Switch Virtual Interfaces) — logical interfaces associated with a
VLAN. The most common use is assigning a management IP
to Vlan1 so you can SSH or
Telnet into the switch remotely.
See SSH Configuration Lab for the full setup.
Example: Assign Management IP to VLAN 1
NetsTuts_SW1>enable NetsTuts_SW1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. NetsTuts_SW1(config)#interface vlan 1 NetsTuts_SW1(config-if)#description Management Interface NetsTuts_SW1(config-if)#ip address 192.168.10.1 255.255.255.0 NetsTuts_SW1(config-if)#no shutdown NetsTuts_SW1(config-if)#exit NetsTuts_SW1(config)#ip default-gateway 192.168.10.254 NetsTuts_SW1(config)#exit NetsTuts_SW1#wr Building configuration... [OK] NetsTuts_SW1#
ip default-gateway is required on a Layer 2 switch so it knows where to
send traffic destined for other subnets (e.g., to reach your management workstation
on a different network). On a Layer 3 switch with routing enabled, use
ip routing instead. See also
Console & VTY Line Configuration
for securing management access.
no shutdown needed on physical ports). However, VLAN SVIs are
down by default — you must issue no shutdown on the SVI,
and at least one physical port assigned to that VLAN must also be active.
Verifying the Configuration
After configuring interfaces, always verify using show commands before testing connectivity. These are the same commands used in real enterprise environments.
1. show ip interface brief
The fastest way to get an overview of all interfaces, their IP addresses, and their status. See Show IP Interface Brief for a full explanation.
NetsTuts_R1#show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 192.168.1.1 YES manual up up GigabitEthernet0/1 10.0.0.1 YES manual up up
| Column | Meaning | What to Check |
|---|---|---|
| IP-Address | The configured IP address | Confirm the correct IP is assigned |
| OK? | Whether the IP address is valid | Should be YES |
| Method | How the IP was assigned | manual = configured by admin, DHCP = auto-assigned |
| Status | Administrative state (Layer 1) | up = enabled; administratively down = shutdown |
| Protocol | Line protocol state (Layer 2) | up = cable connected and signal detected |
2. show interfaces gigabitEthernet0/0
Shows detailed Layer 1 and Layer 2 statistics including errors, bandwidth, and duplex. See Show Interfaces for full output explanation.
NetsTuts_R1#show interfaces gigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
Hardware is CN Gigabit Ethernet, address is 0060.2f3a.1b01 (bia 0060.2f3a.1b01)
Description: LAN - Connected to NetsTuts_SW1
Internet address is 192.168.1.1/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Full-duplex, 1000Mb/s, media type is RJ45
input errors 0, CRC 0, frame 0, overrun 0, ignored 0
output errors 0, collisions 0, interface resets 0
3. show running-config interface gigabitEthernet0/0
Displays only the configuration lines that apply to this specific interface. See Show Running Config.
NetsTuts_R1#show running-config interface gigabitEthernet0/0 Building configuration... Current configuration : 98 bytes ! interface GigabitEthernet0/0 description LAN - Connected to NetsTuts_SW1 ip address 192.168.1.1 255.255.255.0 duplex auto speed auto ! end
4. Test Connectivity with ping
Use ping to test whether the interface can reach other devices. A successful ping confirms IP addressing and basic connectivity are correct. For hop-by-hop path verification, also see traceroute.
NetsTuts_R1#ping 192.168.1.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
!!!!!) = 100% success.
Dots (.....) = all packets timed out — check IP addressing, subnet mask, and no shutdown.
Common Mistakes and Troubleshooting
For a structured approach to diagnosing network issues, see Troubleshooting Methodology and Troubleshooting Connectivity.
| Problem | show ip interface brief Output | Cause | Fix |
|---|---|---|---|
| Interface is down | administratively down / down |
no shutdown not issued |
Enter interface config and run no shutdown |
| Status up, Protocol down | up / down |
No cable connected, wrong cable type, or far-end shutdown | Check physical cable; verify far-end interface is also up |
| Wrong subnet mask | Interface shows up but ping fails | Subnet mask mismatch between devices | Re-enter ip address with correct mask. Use subnet calculator to confirm. |
| IP address conflict | IOS shows a warning: % x.x.x.x overlaps with... |
Two interfaces assigned overlapping IP ranges | Ensure each interface is on a unique, non-overlapping subnet |
| No IP address shown | unassigned |
ip address command not entered, or entered with typo |
Re-enter the ip address command; verify with show running-config interface |
| SVI stays down | VLAN interface down / down |
VLAN does not exist in the VLAN database, or no active port in the VLAN | Create the VLAN (vlan 1) and ensure at least one access port is assigned and up. See VLAN Creation Lab and verify with show vlan brief. |
Interface Status Combinations — What They Mean
These status codes appear in show ip interface brief and show interfaces. Interface state change messages also appear in syslog / show logging output.
| Status | Protocol | Meaning |
|---|---|---|
up |
up |
✅ Fully operational — interface is working correctly |
up |
down |
⚠️ Physical link detected but Layer 2 issue — check cable, encapsulation, or far-end config |
administratively down |
down |
❌ Interface has been shut down — run no shutdown |
down |
down |
❌ No physical signal — check cable and connected device |
Key Points & Exam Tips
- Router interfaces are administratively down by default — always run
no shutdownafter assigning an IP. Switch physical ports are up by default, but SVIs are down by default. - The
ip addresscommand requires both the IP address and the subnet mask —ip address 192.168.1.1 255.255.255.0. - To remove an IP address, use
no ip addressin interface configuration mode. show ip interface briefis the fastest verification command — memorize its output columns (Status / Protocol). Useshow ip routeto verify routing table entries after configuring interfaces.Status up / Protocol down= Layer 2 problem (cable, encapsulation).Administratively down= shutdown not reversed.- On a Layer 2 switch, the SVI (
interface vlan 1) is used for management access. Always addip default-gatewayso the switch can be managed from other subnets via SSH or Telnet. - Always add a
descriptionto every interface — it is a professional best practice and helps during troubleshooting. - Two interfaces that need to communicate directly must be in the same subnet. Mismatched subnets require a router.
- Save with
wrafter every change — the running-config lives in RAM and is cleared on reload. See Saving & Managing Cisco Configurations. - Always verify with ping after configuration to confirm end-to-end connectivity.
TEST WHAT YOU LEARNED
A router interface has an IP address assigned but the engineer forgot to run no shutdown. What will show ip interface brief display for that interface?
no shutdown, the status shows "administratively down / down" regardless of whether an IP address is assigned.An engineer runs show ip interface brief and sees up / down for GigabitEthernet0/0. What is the most likely cause?
up / down means the interface is administratively enabled (no shutdown was run) but the line protocol is down — usually because there is no physical cable, the connected device is off, or the far-end interface is shut down.Which interface type should be used to assign a management IP address to a Cisco Layer 2 switch?
interface vlan 1 — is used as the management interface to allow SSH/Telnet access to the switch.After configuring ip address 192.168.1.1 255.255.255.0 and no shutdown, a ping to 192.168.1.10 fails. What should the engineer check first?
up / up but ping fails, the issue is likely on the remote end — wrong IP, wrong subnet mask, or the remote interface is shut down. Always check both sides of a connection.A switch SVI (interface vlan 1) shows down / down even after no shutdown is entered. What is the most likely cause?
show vlan brief.What is the purpose of the ip default-gateway command on a Layer 2 switch?
ip default-gateway, the switch cannot communicate with devices on other subnets — meaning you cannot SSH into it from a different network segment.An engineer assigns 192.168.1.1 255.255.0.0 to a router interface that should be on a /24 network. What problem will this cause?
Which sequence of IOS modes is correct when assigning an IP address to an interface?
>) → enable → Privileged EXEC (#) → configure terminal → Global Configuration (config) → interface gi0/0 → Interface Configuration (config-if).A /30 subnet mask (255.255.255.252) is used on a WAN link between two routers. Why is this the standard choice?
Which command shows the IP address, description, duplex, speed, and error counters for a specific interface?
show interfaces [name] provides the most detailed per-interface output — including IP address, MAC address, duplex, speed, MTU, encapsulation, and error counters. show ip interface brief gives a quick summary but not error statistics.