CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

Assigning an IP address to a Cisco router interface is one of the most fundamental tasks in network engineering. Whether provisioning a local area network (LAN) default gateway, establishing a point-to-point connection between routers, or configuring an upstream wide area network (WAN) link to an Internet Service Provider (ISP), an interface cannot route traffic until it possesses a valid Layer 3 address and an active operational state.

In Cisco IOS and IOS XE environments, router physical interfaces are disabled (“administratively down”) by default. Successfully bringing an interface online requires navigating the command-line interface (CLI) hierarchy, applying the appropriate addressing parameters, and enabling the physical port. This guide walks through configuring static IPv4 addresses, evaluating static versus DHCP configurations on WAN links, verifying interface status, deploying secondary and IPv6 subnets, and leveraging rapid CLI templates based on official Cisco command standards.


Step-by-Step Guide: Configuring a Static IPv4 Address on a Router Interface

Configuring a static IPv4 address requires moving from user executive mode into interface configuration mode through Cisco IOS’s hierarchical CLI. Follow these sequential steps to assign an IP address to a physical Ethernet interface (such as GigabitEthernet0/0/0) and bring it online.

Step 1: Access Privileged EXEC Mode

Connect to the router via console cable, SSH, or Telnet. From the standard user prompt (Router>), elevate your privilege level:

Router> enable
Router#

Step 2: Enter Global Configuration Mode

To modify system parameters and access specific interfaces, enter global configuration mode:

Router# configure terminal
Router(config)#

Step 3: Select the Target Interface

Specify the interface type and slot/port identifier you want to configure. Common naming conventions include GigabitEthernet, FastEthernet, or TenGigabitEthernet:

Router(config)# interface GigabitEthernet 0/0/0
Router(config-if)#

Step 4: Configure an Interface Description (Recommended)

Before applying the IP address, document the interface’s purpose. This aids troubleshooting and change audits:

Router(config-if)# description LAN Gateway for Engineering Subnet

Step 5: Assign the IPv4 Address and Subnet Mask

Execute the ip address command followed by the desired IPv4 address and the corresponding 32-bit subnet mask in dotted-decimal notation:

Router(config-if)# ip address 192.168.10.1 255.255.255.0

Step 6: Enable the Interface

Cisco router interfaces remain shut down until explicitly enabled. Issue the no shutdown command to bring the interface’s administrative status up:

Router(config-if)# no shutdown

The console will display link state notifications indicating that the interface and line protocol have transitioned to the up state:

%LINK-3-UPDOWN: Interface GigabitEthernet0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0, changed state to up

Step 7: Return to Privileged EXEC and Save Configuration

Exit interface configuration mode and write the active configuration from RAM to NVRAM to ensure changes persist across reboots:

Router(config-if)# end
Router# copy running-config startup-config

Takeaway: A statically assigned IP address on Cisco IOS is not functional until the interface is explicitly activated using the no shutdown command and committed to NVRAM.


Static IP vs. DHCP Client on WAN Interfaces

While LAN interfaces almost universally require predictable, static default gateways, WAN and edge interfaces connected to upstream providers offer a choice between manual static assignments and automated dynamic addressing via a DHCP client (ip address dhcp). Choosing the appropriate method depends on address persistence requirements, routing complexity, and provider agreements.

Evaluation CriteriaStatic IP Configuration (ip address <ip> <mask>)DHCP Client Configuration (ip address dhcp)
Command Syntaxip address 198.51.100.2 255.255.255.248ip address dhcp
Address PersistencePermanent; remains unchanged until manually modified by an administrator.Ephemeral; subject to lease expiration, ISP renewals, and subnet reassignment.
Default Route HandlingRequires manual configuration of a static default route (ip route 0.0.0.0 0.0.0.0 <next-hop>).Automatically installs default gateway learned from the DHCP server into the routing table.
DNS AcquisitionDNS server addresses must be statically configured via ip name-server.Can dynamically import DNS server addresses and domain names directly from the ISP.
Hosting & Inbound ServicesIdeal for hosting public servers, site-to-site IPsec VPN endpoints, and port forwarding.Poorly suited for inbound tunnels and services unless paired with Dynamic DNS (DDNS).
Administrative OverheadHigher initial planning; requires tracking IP registries and subnet allocations.Minimal; zero-touch provisioning ideal for branch and teleworker routers.
Primary Use CasesEnterprise DIA (Dedicated Internet Access), Metro Ethernet links, core inter-router links, LAN gateways.Broadband cable/fiber internet, consumer/small-office backup WAN circuits, 4G/5G cellular modems.

Takeaway: Use static IP assignment whenever hosting inbound services, fixed site-to-site VPNs, or internal gateways; use ip address dhcp on edge WAN links where the ISP manages dynamic address leasing and gateway injection.


Verifying and Troubleshooting Interface IP Settings

After assigning an IP address, validate that the interface has negotiated physical connectivity and data-link framing. Systematic verification isolates whether faults stem from configuration oversights or physical transmission media.

Step 1: Inspect Interface Status at a Glance

The most efficient command for verifying address assignment and port state is show ip interface brief. Run this from privileged EXEC mode:

Router# show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0/0       192.168.10.1    YES manual up                    up      
GigabitEthernet0/0/1       unassigned      YES unset  administratively down down    
GigabitEthernet0/0/2       10.0.0.2        YES manual up                    down    

Evaluate the Status (Layer 1 Physical) and Protocol (Layer 2 Data Link) columns against these operational states:
1. Status: up / Protocol: up — Operational. Physical carrier detect is present, and Layer 2 keepalives/framing are healthy.
2. Status: administratively down / Protocol: down — The interface is disabled by software. Resolve this by entering the interface configuration context and executing no shutdown.
3. Status: down / Protocol: down — Physical layer fault. Verify cable integrity, ensure the patch cord is seated, verify transceiver compatibility, and confirm that the remote device is powered on.
4. Status: up / Protocol: down — Physical link is detected, but data-link communication has failed. Common causes include clocking issues on serial lines, encapsulation mismatches (e.g., HDLC vs. PPP), speed/duplex mismatches, or port-security shutdowns on connected switches.

Step 2: Review Detailed Interface Metrics

To view Layer 1 and Layer 2 error counters, MTU settings, duplex, and packet statistics, inspect the full interface output:

Router# show interfaces GigabitEthernet 0/0/0

Check for duplex mismatches (indicated by runts, collisions, and input errors) and verify that the bandwidth and MTU match adjacent network devices.

Step 3: Verify the Connected Routing Table

Ensure Cisco IOS has inserted the interface’s directly connected network into the routing table:

Router# show ip route connected
C    192.168.10.0/24 is directly connected, GigabitEthernet0/0/0
L    192.168.10.1/32 is directly connected, GigabitEthernet0/0/0

If the route is missing, check whether the interface protocol is in the up state; routes are purged if line protocol drops.

Step 4: Perform Layer 3 Reachability Tests

Test the interface by pinging adjacent devices, such as the upstream gateway or local host:

Router# ping 192.168.10.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

A success rate of . (timeouts) rather than ! (replies) suggests access control list (ACL) filtering, incorrect subnet masks, or missing ARP resolution.

Takeaway: Interface operational health requires both Status and Protocol to read up/up; diagnose failures systematically by inspecting Layer 1 physical connections before troubleshooting Layer 2 protocols and Layer 3 routing entries.


Advanced Addressing: Secondary IPv4 and Dual-Stack IPv6

Modern network infrastructures frequently require a single physical interface to service multiple logical subnets or support both IPv4 and IPv6 traffic concurrently. Cisco IOS supports these architectures through secondary IP addresses and dual-stack addressing.

Configuring Secondary IPv4 Addresses

A secondary IPv4 address allows an interface to bind to more than one IP subnet. This is commonly employed during IP subnet migration or when resolving address exhaustion on a broadcast domain without re-cabling or deploying new VLANs.

To configure a secondary address, append the secondary keyword to the standard ip address command:

Router(config)# interface GigabitEthernet 0/0/0
Router(config-if)# ip address 172.16.1.1 255.255.255.0 secondary

Warning: A primary IP address must already be assigned before adding a secondary address. If you enter ip address <ip> <mask> without the secondary keyword, Cisco IOS will overwrite your existing primary IP address rather than adding a second one.

Enabling Dual-Stack IPv6 on the Interface

To run IPv4 and IPv6 simultaneously on the same physical link, enable IPv6 unicast routing globally, then configure the interface with an IPv6 address.

Step 1: Enable IPv6 Unicast Routing Globally

IPv6 routing must be explicitly activated on the router before forwarding IPv6 packets:

Router(config)# ipv6 unicast-routing

Step 2: Configure IPv6 Addressing on the Interface

Enter the interface mode and configure both a Link-Local Address (LLA) and a Global Unicast Address (GUA):

Router(config)# interface GigabitEthernet 0/0/0
Router(config-if)# ipv6 enable
Router(config-if)# ipv6 address fe80::1 link-local
Router(config-if)# ipv6 address 2001:db8:acad:10::1/64
  • ipv6 enable: Generates an automatic link-local address based on the interface’s MAC address (EUI-64).
  • ipv6 address <address> link-local: Manually overrides the link-local address with a human-readable identifier (standard practice for default gateways).
  • ipv6 address <prefix>/<length>: Assigns the globally routable IPv6 subnet.

Step 3: Verify Dual-Stack Configuration

Inspect the active IPv6 interface assignments:

Router# show ipv6 interface brief
GigabitEthernet0/0/0   [up/up]
    FE80::1
    2001:DB8:ACAD:10::1

Takeaway: Use the secondary parameter to support multiple IPv4 subnets on one port without overwriting the primary gateway, and enable ipv6 unicast-routing to establish robust dual-stack network communication.


Quick-Deploy CLI Configuration Templates

Use these copy-and-paste templates for rapid configuration via console or configuration management tools. Replace bracketed placeholders (<...>) with your specific site parameters.

Template 1: Static IPv4 Interface Setup

enable
configure terminal
interface <interface-type/number>
 description <connection-description>
 ip address <ipv4-address> <subnet-mask>
 no shutdown
 exit
exit
write memory

Template 2: DHCP WAN Interface Setup

enable
configure terminal
interface <interface-type/number>
 description <isp-connection-description>
 ip address dhcp
 no shutdown
 exit
exit
write memory

Template 3: Dual-Stack IPv4 / IPv6 Interface Setup

enable
configure terminal
ipv6 unicast-routing
interface <interface-type/number>
 description <dual-stack-interface-description>
 ip address <ipv4-address> <subnet-mask>
 ipv6 address <link-local-address> link-local
 ipv6 address <ipv6-global-address>/<prefix-length>
 no shutdown
 exit
exit
write memory

Command Syntax Quick Reference

CommandConfiguration ModePurpose
interface <id>Global ConfigEnters interface configuration context.
ip address <ip> <mask>Interface ConfigDefines the primary IPv4 address and subnet mask.
ip address <ip> <mask> secondaryInterface ConfigBinds an additional IPv4 subnet to the interface.
ip address dhcpInterface ConfigDirects the interface to acquire an IPv4 lease via DHCP.
ipv6 address <addr>/<prefix>Interface ConfigAssigns an IPv6 global unicast address.
no shutdownInterface ConfigTransitions the administrative state from disabled to enabled.
show ip interface briefPrivileged EXECDisplays summarized IP assignment and port status for all ports.
write memoryPrivileged EXECSaves running configuration to NVRAM.

Takeaway: Utilizing consistent configuration scripts prevents omissions such as missing descriptions or forgotten administrative activations across large fleet deployments.


Cisco IOS Command Specifications and Official References

According to the Cisco IOS IP Addressing Services Command Reference and the Cisco IOS Master Command List, the syntax and operational characteristics of the ip address interface configuration command follow strict architectural standards across Cisco IOS and Cisco IOS XE releases (including the 12.2, 15.x M/T, and IOS XE 16.x/17.x trains on ISR, ASR, and Catalyst platforms).

Command Syntax Notation

ip address ip-address mask [secondary [vrf vrf-name]]
no ip address [ip-address mask [secondary]]
ip address dhcp [client-id interface-type number] [hostname hostname]

Parameter Definitions

  • ip-address: A 32-bit IPv4 address expressed in four-octet dotted-decimal format (e.g., 10.1.1.1).
  • mask: A 32-bit network mask expressed in four-octet dotted-decimal format denoting the network and host portions of the address (e.g., 255.255.255.0). Classless Inter-Domain Routing (CIDR) slash notation (e.g., /24) is not accepted by the base IPv4 ip address command in standard Cisco IOS; dotted-decimal format is mandatory.
  • secondary: Specifies that the configured IP address is an alternate network identifier. Up to 32 secondary IP addresses can be configured per interface on most IOS platforms.
  • dhcp: Enables the Dynamic Host Configuration Protocol client process on the target interface.
  • no ip address: Removes the assigned IP address. Executing no ip address without arguments strips all primary and secondary addresses from the interface.

Software Compatibility and Operational Notes

  • Default State: Physical interfaces default to an unassigned IP state and an administrative shutdown state (shutdown). Loopback interfaces and null interfaces default to an active state (no shutdown) once created.
  • VRF Isolation: If an interface is mapped to a Virtual Routing and Forwarding instance using ip vrf forwarding <vrf-name> or ip forwarding vrf <vrf-name>, any previously configured IP address is automatically removed by Cisco IOS. The ip address command must be re-entered after binding the interface to the VRF.
  • Subnet Overlap Rules: Cisco IOS enforces strict route overlap prevention. An interface cannot be assigned an IP address residing within the same subnet as another active interface on the same router unless separated by VRF instances.

Authoritative documentation and full platform-specific command indexes can be reviewed through the following Cisco Systems technical publications:
– Cisco IOS IP Addressing Services Configuration Guide
– Cisco IOS Master Command List, All Releases
– Cisco IOS XE Catalyst / ASR / ISR Interface and Hardware Component Configuration Guides

Takeaway: Cisco IOS enforces exact dotted-decimal formatting for IPv4, requires re-entering addresses when applying VRF associations, and restricts overlapping subnets across active interfaces.


Configuring an IP address on a Cisco router is a straightforward task that underpins all Layer 3 connectivity. By mastering the step-by-step CLI hierarchy—from selecting the physical port and applying static or dynamic addressing to executing no shutdown—network administrators can reliably establish routed links. Verifying operational states with commands like show ip interface brief, planning for multi-subnet and IPv6 environments, and adhering to official Cisco command standards ensures that your routing infrastructure remains resilient, manageable, and error-free.

Please follow and like us:
Last modified: November 6, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.