Learning paths › CCNA › 1. Network Fundamentals
IPv4 Configuration
Written reference: Calculate usable host counts (2^n - 2), configure Cisco router and switch interfaces with IPv4 addresses, and verify interface Layer 1/2 status.
About 11 minutes
Why it matters
Setting an address is easy. Knowing the interface is really up is the skill, because status and protocol are two different things.
Calculating Hosts & Configuring Interfaces
Usable host formula is 2^h - 2 (where h is the number of host bits; minus 2 removes network and broadcast addresses).
A /24 network has 8 host bits: 2^8 - 2 = 254 usable hosts.
'Status' reflects Layer 1 physical connectivity; 'Protocol' reflects Layer 2 framing and encapsulation match.
Cisco router interfaces are shut down by default and require 'no shutdown' to activate.
Host Calculation Math
Why subtract 2 in 2^n - 2? • The all-zeros host address is reserved as the Network ID. • The all-ones host address is reserved as the Broadcast Address.
Example: 172.16.0.0/16 • Host bits = 16 • Total addresses = 2^16 = 65,536 • Network address = 172.16.0.0 • First usable address = 172.16.0.1 • Last usable address = 172.16.255.254 • Broadcast address = 172.16.255.255 • Total usable hosts = 65,534
Interface Status States
In 'show ip interface brief': • Status (Layer 1): Shows physical hardware health. 'up' means the cable is plugged in and receiving carrier signal. 'down' means cable unplugged. 'administratively down' means shutdown command is active. • Protocol (Layer 2): Shows software protocol signaling. 'up' means framing, keepalives, and encapsulation match. 'down' indicates clocking failure or encapsulation mismatch.
The words you need
Usable Host Range — The assignable IP addresses between the Network Address + 1 (first usable) and Broadcast Address - 1 (last usable).
Status (Layer 1) — Indicates whether the physical hardware layer is functioning (e.g. cable is plugged in, electricity/light detected).
Protocol (Layer 2) — Indicates whether Layer 2 framing/encapsulation (clocking, keepalives, matching duplex) is functioning.
Administratively Down — The interface has been disabled in software by an administrator using the 'shutdown' command.
The commands from this module
Each of these appeared above. Run them here so they are in your fingers, not just your notes.
These commands are reference examples. Use the separate hands-on lessons to configure and verify the feature; reading this example does not execute or validate a device change.
show ip interface brief
interface <interface-name>
ip address <ip> <subnet-mask>
no shutdown
shutdown
description <text>
show interfaces <id>
show interface descriptionTakeaways
- Calculate usable hosts with 2^n − 2.
- Assign an IPv4 address to a router or switch interface.
- Verify the interface’s Layer 1 and Layer 2 state.
Next: Subnetting Basics
More free lessons in 1. Network Fundamentals
- Network Fundamentals
- Network Devices
- Cables & Interfaces
- TCP/IP & OSI Models
- Switch Interfaces
- IPv4 Header
- Wireless RF & Frequencies
- IEEE 802.11 Standards & Wi-Fi Generations
- Cisco IOS CLI
- Ethernet Switching 1
- Ethernet Switching 2
- IPv4 Addressing
- Subnetting Basics
- Finding Subnets Fast
- VLSM Subnetting
- IPv6 Addressing & Representation
- Network Diagnostics
- IPv6 Address Scopes & Types
- IPv6 Configuration & EUI-64