Basic Interface Configuration (IP Addressing)
Introduction
In any network, devices must have IP addresses to communicate with each other. On Cisco routers and Layer 3 switches, IP addresses are assigned to interfaces. This tutorial explains how to configure a basic IP address on an interface using Cisco IOS, verify the configuration, and understand common mistakes.
This lesson is written for beginners and uses simple explanations with practical examples, making it ideal for CCNA-level learners.
What Is an Interface?
An interface is a physical or logical connection point on a network device.
Examples
- FastEthernet0/0
- GigabitEthernet0/1
- Serial0/0/0
- Vlan1 (logical interface)
Each interface can be assigned:
- An IP address
- A subnet mask
- An operational state (up or down)
IP Addressing Basics (Quick Review)
- IPv4 uses 32 bits
- Written in dotted-decimal format (e.g., 192.168.1.1)
A subnet mask defines:
- Network portion
- Host portion
Example:
- IP address: 192.168.1.1
- Subnet mask: 255.255.255.0
Scenario Example
- Device: Cisco Router
- Interface: GigabitEthernet0/0
- IP address: 192.168.1.1
- Subnet mask: 255.255.255.0
Step 1: Enter Privileged EXEC Mode
NetsTuts_R1> enable
NetsTuts_R1#
Step 2: Enter Global Configuration Mode
NetsTuts_R1# configure terminal
NetsTuts_R1(config)#
Step 3: Enter Interface Configuration Mode
NetsTuts_R1(config)# interface gigabitEthernet0/0
NetsTuts_R1(config-if)#
Step 4: Assign IP Address and Subnet Mask
NetsTuts_R1(config-if)# ip address 192.168.1.1 255.255.255.0
Explanation:
- ip address Assigns an IP address
- 192.168.1.1 Interface IP
- 255.255.255.0 Subnet mask
Step 5: Enable the Interface
By default, router interfaces are administratively down.
NetsTuts_R1(config-if)# no shutdown
Expected system messages:
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Step 6: Exit Configuration Mode
NetsTuts_R1(config-if)# exit
NetsTuts_R1(config)# exit
NetsTuts_R1#
Verifying the Configuration
1. Check Interface IP Information
NetsTuts_R1# show ip interface brief
Sample Output:
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES manual up up
- Status up Interface is enabled
- Protocol up Layer 2 is operational
2. Check Detailed Interface Configuration
NetsTuts_R1# show running-config interface gigabitEthernet0/0
Common Mistakes and Troubleshooting
1. Interface Is Down
Cause: no shutdown commmand not issued
Solution:
NetsTuts_R1(config-if)# no shutdown
2. Wrong Subnet Mask
Incorrect subnet masks can break communication.
ip address 192.168.1.1 255.255.0.0
Always confirm subnet requirements before configuration.
3. IP Address Conflict
Occurs when two devices share the same IP address.
Solution: Ensure each device has a unique IP.
Configuring IP Address on a Layer 3 Switch (SVI Example)
On Layer 3 switches, IP addresses are assigned to SVIs (Switch Virtual Interfaces).
Example: Assign IP to VLAN 1
NetsTuts_SW1> enable
NetsTuts_SW1# configure terminal
NetsTuts_SW1(config)# interface vlan 1
NetsTuts_SW1(config-if)# ip address 192.168.10.1 255.255.255.0
NetsTuts_SW1(config-if)# no shutdown
Saving the Configuration
To avoid losing changes after reboot:
NetsTuts_R1# copy running-config startup-config
or
NetsTuts_R1# write memory
Key Points to Remember
- Interfaces must be enabled to work
- Always verify IP settings
- Use the correct subnet mask
- Save your configuration
Conclusion
Basic interface IP configuration is a fundamental networking skill. It is essential before moving to advanced topics such as routing, VLANs, and WAN technologies.
Practice these commands in Packet Tracer, GNS3, or on real Cisco devices to build confidence.