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.

TEST WHAT YOU LEARNED

1. What is the primary purpose of assigning an IP address to a network interface?

Correct answer is B. An IP address enables network communication by providing logical addressing for devices on a network.

2. In the provided configuration steps, what command is used to activate an interface that is administratively down?

Correct answer is C. The "no shutdown" command brings an administratively down interface to an active state.

3. Which of the following is an example of a logical interface on a Cisco Layer 3 switch?

Correct answer is D. VLAN interfaces are logical interfaces, while FastEthernet, GigabitEthernet, and Serial are physical interfaces.

4. When using the show ip interface brief command, what does a status of "up" and a protocol of "up" indicate?

Correct answer is B. Status "up" means administratively enabled, protocol "up" means Layer 2 is operational.

5. According to the notes, what is the default administrative state of a router interface?

Correct answer is B. By default, router interfaces are administratively down and require the "no shutdown" command to activate.

6. What command saves the running configuration to the startup configuration to prevent loss after a reboot?

Correct answer is C. The "copy running-config startup-config" command saves the current configuration permanently.

7. In the example ip address 192.168.1.1 255.255.255.0, what does "255.255.255.0" represent?

Correct answer is C. "255.255.255.0" is the subnet mask that defines the network portion of the IP address.

8. Which mode must you be in to issue the command interface gigabitEthernet0/0?

Correct answer is D. The "interface" command is entered in Global Configuration Mode to access interface configuration.

9. What is a potential consequence of configuring an incorrect subnet mask on an interface?

Correct answer is B. An incorrect subnet mask can cause routing and communication issues as devices may not recognize each other as being on the same network.

10. What command would you use to view the detailed configuration applied specifically to the GigabitEthernet0/0 interface?

Correct answer is C. "show running-config interface gigabitEthernet0/0" displays the configuration specific to that interface.