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 IP addresses is the first critical milestone in building any network simulation in Cisco Packet Tracer. Whether you are assembling a basic two-node peer lab or provisioning an enterprise branch topology, devices cannot exchange packets without properly assigned Layer 3 addresses. Because Packet Tracer simulates diverse network components—from graphical end-user workstations to Cisco IOS routers and Layer 2 management switches—the method you use to assign IP parameters varies depending on the device role.

This guide covers everything required to establish IP connectivity across your Packet Tracer topologies. You will learn the architectural differences between static and dynamic assignments, how to configure end devices via the graphical desktop, how to use the Cisco IOS Command-Line Interface (CLI) to configure router physical interfaces and switch management virtual interfaces (SVIs), how to build a router-based DHCP pool, and how to resolve common connectivity faults when pings fail.


Static vs. DHCP IP Assignment: Design Differences and Use Cases

Before applying IP addresses to devices in your topology, it is essential to determine whether an endpoint requires a manual static entry or dynamic allocation through the Dynamic Host Configuration Protocol (DHCP). Both approaches serve distinct roles in network engineering and simulation labs.

CriterionStatic IP AssignmentDynamic IP Assignment (DHCP)
Primary MethodManual entry per device interfaceAutomated lease from a central server/router
Configuration LocationLocal device settings (GUI or CLI)Centralized pool on router, switch, or server
Best Use CasesRouters, switches (SVI), servers, network printersEnd-user workstations, laptops, mobile devices
ScalabilityLow; high manual overhead as topology growsHigh; easily provisions tens or hundreds of hosts
Risk of IP ConflictModerate; human error can cause duplicate IPsMinimal; DHCP server tracks distributed leases
Default Gateway ManagementStatically defined per hostDistributed automatically via DHCP options
Packet Tracer Simulation BehaviorImmediate state; active upon inputRequires short DORA exchange simulation

Section Takeaway: Use static addressing for fixed infrastructure devices (default gateways, server resources, and switch management interfaces) to ensure predictable reachability, and reserve DHCP for client workstations and mobile endpoints to streamline network management.


Assigning a Static IP Address to a PC or Laptop

End-user devices in Cisco Packet Tracer—such as standard desktop PCs, laptops, and generic servers—feature a simulated graphical operating system that allows you to configure network settings without touching a command-line terminal.

  1. Open the Device Window: Click once on the target PC or Laptop in your Packet Tracer workspace to open its configuration dialogue.
  2. Access the Desktop Tab: Select the Desktop tab from the top menu bar.
  3. Launch IP Configuration: Click on the IP Configuration applet icon (located in the top-left corner of the Desktop grid).
  4. Select Static Mode: Ensure the Static radio button is selected under the IP Configuration header.
  5. Enter IPv4 Parameters:
  6. IPv4 Address: Enter the desired host IP address within your target subnet (e.g., 192.168.1.10).
  7. Subnet Mask: Enter the appropriate subnet mask (e.g., 255.255.255.0). Packet Tracer often auto-completes a default classful mask when you press Tab, so verify it matches your design.
  8. Default Gateway: Enter the IP address of the local router interface that serves this subnet (e.g., 192.168.1.1).
  9. DNS Server (Optional): Enter the IP of your domain name server (e.g., 192.168.1.254 or 8.8.8.8) if your lab tests hostname resolution.
  10. Verify Configuration via Command Prompt:
  11. Close the IP Configuration window and open the Command Prompt applet from the Desktop tab.
  12. Type ipconfig and press Enter to verify your IP address, subnet mask, and default gateway.

Section Takeaway: End-device IP assignment in Packet Tracer is accomplished through the Desktop IP Configuration tool, where providing an accurate Default Gateway is just as critical as the IP address itself for cross-subnet communication.


Configuring an IP Address on a Cisco Router Interface in the CLI

Unlike desktop endpoints, Cisco routers require explicit configuration via the Cisco IOS Command-Line Interface. By default, all physical interfaces on a Cisco router are in an administratively down state and must be manually addressed and enabled.

  1. Access the Router CLI: Click on the router, select the CLI tab, and press Enter to display the user prompt (Router>).
  2. Enter Privileged EXEC and Global Configuration Modes:
    text
    Router> enable
    Router# configure terminal
  3. Select the Target Physical Interface: Identify the port connected to your local switch or link (such as GigabitEthernet 0/0/0 or 0/0/1):
    text
    Router(config)# interface GigabitEthernet0/0/0
  4. Assign the IP Address and Subnet Mask: Use the ip address command:
    text
    Router(config-if)# ip address 192.168.1.1 255.255.255.0
  5. Bring the Interface Up: Physical router ports stay inactive until you explicitly issue the no shutdown command:
    text
    Router(config-if)# no shutdown

    You will see an immediate console message confirming that the interface changed state to up, and the physical link indicator in your workspace will switch from red to green.
  6. Verify the Interface Status: Return to privileged EXEC mode and confirm your settings:
    text
    Router(config-if)# end
    Router# show ip interface brief

    Confirm that GigabitEthernet0/0/0 shows your assigned IP address and displays up under both the Status and Protocol columns.

Section Takeaway: Router ports require both the ip address [IP] [MASK] command and the no shutdown command to activate Layer 1 and Layer 3 operations.


Assigning a Management IP Address to a Cisco Switch (SVI)

Standard Layer 2 switches (such as the Cisco Catalyst 2960) operate primarily at the Data Link layer and do not route IP packets on individual physical switchports. To enable remote management tools like SSH, Telnet, or simple ping monitoring, you must assign an IP address to a Switch Virtual Interface (SVI), typically VLAN 1 by default.

  1. Access the Switch CLI: Click the switch, open the CLI tab, and enter privileged configuration mode:
    text
    Switch> enable
    Switch# configure terminal
  2. Enter the VLAN 1 SVI Configuration:
    text
    Switch(config)# interface vlan 1
  3. Assign the Management IP Address:
    text
    Switch(config-if)# ip address 192.168.1.2 255.255.255.0
  4. Enable the Interface: Like router ports, virtual interfaces must be enabled manually:
    text
    Switch(config-if)# no shutdown
    Switch(config-if)# exit
  5. Configure the Default Gateway: If you plan to manage this switch from a host located outside the local 192.168.1.0/24 subnet, the switch needs a default gateway pointing back to the router interface:
    text
    Switch(config)# ip default-gateway 192.168.1.1
  6. Verify SVI Operation:
    text
    Switch(config)# end
    Switch# show ip interface brief

    Ensure Vlan1 reflects the correct IP address and indicates an up/up operational status.

Section Takeaway: A Layer 2 switch requires an IP address configured under a logical SVI (interface vlan 1) along with a global ip default-gateway command to enable remote management access across network boundaries.


Configuring a Router-Based DHCP Server for Automatic IP Assignment

Rather than manually configuring each workstation, you can configure a Cisco router to automatically assign IP addresses, subnet masks, default gateways, and DNS servers to local clients.

  1. Exclude Static and Management Addresses: Prevent IP conflicts by reserving IPs used by routers, switches, and servers before creating the dynamic pool:
    text
    Router> enable
    Router# configure terminal
    Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
  2. Create the DHCP Pool: Define a named pool to enter DHCP configuration mode:
    text
    Router(config)# ip dhcp pool LAN_CLIENTS
  3. Specify the Subnet and Mask: Define the available pool of addresses:
    text
    Router(dhcp-config)# network 192.168.1.0 255.255.255.0
  4. Assign the Default Gateway: Use the default-router command to inform clients of their gateway:
    text
    Router(dhcp-config)# default-router 192.168.1.1
  5. Assign the DNS Server (Optional): Provide clients with a DNS server address:
    text
    Router(dhcp-config)# dns-server 8.8.8.8
    Router(dhcp-config)# exit
  6. Test on Client Devices:
  7. Open any client PC or Laptop in the subnet.
  8. Go to Desktop > IP Configuration.
  9. Switch the radio button from Static to DHCP.
  10. Within a few seconds, Packet Tracer will display DHCP request successful, populating the IP address, subnet mask, default gateway, and DNS fields automatically.

Section Takeaway: A complete router-based DHCP deployment requires defining an excluded address range first, followed by establishing a pool with the network and default-router parameters.


Troubleshooting IP Configuration and Ping Failures

Even when addresses are assigned correctly on paper, connectivity tests in Packet Tracer may fail. Use these diagnostic answers to resolve common issues.

Why is the link light on my router interface red, and why does ping fail immediately?

A red link light on a router interface indicates Layer 1 is down. On a Cisco router, all interfaces are disabled by default. Open the router CLI, enter the interface sub-mode, and execute no shutdown. Additionally, verify that the cable type is correct (e.g., straight-through cable between router and switch).

Why can a PC ping its default gateway, but cannot ping hosts on a remote subnet?

This problem almost always stems from a missing or incorrect Default Gateway entry on the client PC. When a host attempts to reach an IP address outside its local subnet, it cannot deliver the frame directly and must send it to the gateway MAC address. Open Desktop > IP Configuration and ensure the Default Gateway field exactly matches the local router interface IP.

Why does a PC display a 169.254.x.x IP address when set to DHCP?

An address starting with 169.254.x.x is an Automatic Private IP Address (APIPA). This indicates the client requested an address via DHCP but never received an acknowledgment. Verify that:
* The DHCP pool is configured on the router and the network statement matches the subnet of the connected interface.
* The physical router interface facing that LAN segment is up/up.
* No duplicate pools or exhausted address scopes exist.

Why does the switch SVI (Vlan1) stay in an “up/down” state?

An SVI requires at least one physical access port assigned to that VLAN to be cabled and in an active (up/up) operational state. If no live devices (such as a running PC or router) are connected to an active port on that switch, VLAN 1 remains down.

What is the fastest CLI command to verify all IP assignments on a Cisco device?

Execute show ip interface brief in privileged EXEC mode on any Cisco router or switch. This outputs a clean table detailing interface names, assigned IP addresses, Layer 1 status, and Layer 2 protocol states.

Section Takeaway: Structured troubleshooting begins with checking Layer 1 link status via show ip interface brief, verifying subnet mask alignment on local links, and confirming client default gateway settings for inter-subnet communication.


Baseline IP Addressing Lab Template and Starter Scripts

To practice these addressing methods, you can deploy the standardized reference topology below. It consists of one router (R1), one switch (SW1), and two PCs (PC1 and PC2), all operating within the 192.168.10.0/24 subnet.

Lab Topology Addressing Table

DeviceInterfaceIP AddressSubnet MaskDefault Gateway
R1G0/0/0192.168.10.1255.255.255.0N/A
SW1VLAN 1 (SVI)192.168.10.2255.255.255.0192.168.10.1
PC1FastEthernet0192.168.10.50255.255.255.0192.168.10.1
PC2FastEthernet0DHCP Assigned255.255.255.0192.168.10.1

R1 Configuration Script (Interface + DHCP Pool)

Copy and paste this script directly into the R1 CLI tab to set up the default gateway and DHCP pool:

enable
configure terminal
hostname R1

! Configure the physical LAN interface
interface GigabitEthernet0/0/0
 description LAN Gateway
 ip address 192.168.10.1 255.255.255.0
 no shutdown
exit

! Configure DHCP for dynamic clients
ip dhcp excluded-address 192.168.10.1 192.168.10.10
ip dhcp excluded-address 192.168.10.50
ip dhcp pool PACKET_TRACER_LAB
 network 192.168.10.0 255.255.255.0
 default-router 192.168.10.1
 dns-server 8.8.8.8
exit

end
write memory

SW1 Configuration Script (Management SVI)

Copy and paste this script into the SW1 CLI tab:

enable
configure terminal
hostname SW1

! Configure the management SVI
interface vlan 1
 description Management SVI
 ip address 192.168.10.2 255.255.255.0
 no shutdown
exit

! Set the default gateway pointing to R1
ip default-gateway 192.168.10.1

end
write memory

End-Device Configuration

  1. PC1 (Static): Open Desktop > IP Configuration. Enter IP 192.168.10.50, Mask 255.255.255.0, and Gateway 192.168.10.1.
  2. PC2 (Dynamic): Open Desktop > IP Configuration. Select DHCP and verify it receives the next available address (e.g., 192.168.10.11).
  3. Verification: Open the Command Prompt on PC1 and run ping 192.168.10.1, ping 192.168.10.2, and ping 192.168.10.11 to confirm full end-to-end connectivity.

Section Takeaway: Using a structured addressing table paired with pasteable baseline configuration scripts guarantees zero-defect IP provisioning and provides an immediate testing environment for routing and switching features.


Conclusion

Assigning IP addresses in Cisco Packet Tracer is the gateway skill for all subsequent networking labs, including VLAN segmentation, dynamic routing protocols, and access control lists. By understanding where to apply static values (such as on router physical ports and switch management SVIs) versus automating client delivery with router-based DHCP pools, you can quickly build clean, scalable network simulations. When connectivity issues arise, rely on tools like show ip interface brief and ipconfig to systematically verify Layer 1 status, subnet masks, and default gateways.

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

Author

Comments

Write a Reply or Comment

Your email address will not be published.