Lesson 4 of 6

Assigning Addresses to Devices

Lab Objectives

  • Assign IPv4 addresses to all router interfaces in the base topology using the provided addressing plan.

  • Configure management IP addresses and default gateways on each switch so they are reachable from the network.

  • Produce a static addressing plan for the five PCs (PC1–PC5) that matches the VLAN subnets.

                  [Internet]
                 203.0.113.1
                      |
                 R1 (Gateway)
                Gi0/0: 10.10.10.1
                Gi0/1: 10.10.20.1
                Gi0/2: 10.10.30.1
                /     |     \
             R2      R3      R4
    

    Gi0/0: 10.10.10.2 | Gi0/0: 10.10.30.2 Gi0/1: 10.10.40.1 | / \ | S1 S2 S3 / \ | /
    PC1 PC2 PC3 PC4 PC5

Tip: The ASCII diagram above shows every router and switch interface IP exactly as required by the lab. Use those addresses—do not change them.

Lab Tasks (Try It Yourself First!)

Complete these tasks WITHOUT looking at the solution below. Use ? and show commands to figure it out.

Task 1: Configure Router Interfaces

Assign the IPv4 addresses to R1, R2, R3 and R4 interfaces exactly as shown in the base topology. Ensure interfaces are administratively up.

Parameters (do not paste commands here): set R1 Gi0/0, Gi0/1, Gi0/2; set R2 Gi0/0 and Gi0/1; set R3 Gi0/0; set R4 Gi0/0 with the exact IP/masks from the topology.

Task 2: Configure Switch Management IPs

Assign a management SVI (VLAN 1) IP address to each switch so the switches are reachable from their connected router:

  • S1 management IP in 10.10.40.0/24 (use .2)
  • S2 management IP in 10.10.20.0/24 (use .3)
  • S3 management IP in 10.10.30.0/24 (use .3)

Also configure the switch default-gateway to point to the local router interface.

Task 3: Design PC Addressing Plan

Provide static IPv4 addresses for PC1–PC5 that map them into the three VLAN subnets:

  • VLAN 10: 192.168.1.0/24 (Sales)
  • VLAN 20: 192.168.2.0/24 (Engineering)
  • VLAN 30: 192.168.3.0/24 (Management)

For each PC, choose an IP, mask, and gateway (router interface that would route for that VLAN).

Think About It: Why do switches need a management IP in the same subnet as the directly connected router interface? What happens if the switch management address is in a different subnet than the router neighbor?


Lab Solution

Task 1 Solution: Configure Router Interfaces

What we are doing: Bringing router physical interfaces online and assigning their IPv4 addresses so each point-to-point LAN exists and adjacent devices share the same subnet. This matters because routers provide the gateways between subnets; if an interface is down or misaddressed, routing and host reachability fail.

! R1
configure terminal
interface GigabitEthernet0/0
 ip address 10.10.10.1 255.255.255.0
 no shutdown
exit
interface GigabitEthernet0/1
 ip address 10.10.20.1 255.255.255.0
 no shutdown
exit
interface GigabitEthernet0/2
 ip address 10.10.30.1 255.255.255.0
 no shutdown
exit
end

! R2
configure terminal
interface GigabitEthernet0/0
 ip address 10.10.10.2 255.255.255.0
 no shutdown
exit
interface GigabitEthernet0/1
 ip address 10.10.40.1 255.255.255.0
 no shutdown
exit
end

! R3
configure terminal
interface GigabitEthernet0/0
 ip address 10.10.20.2 255.255.255.0
 no shutdown
exit
end

! R4
configure terminal
interface GigabitEthernet0/0
 ip address 10.10.30.2 255.255.255.0
 no shutdown
exit
end

What just happened:

  • interface GigabitEthernet0/X — enters interface configuration mode for that physical port.
  • ip address A.B.C.D 255.255.255.0 — assigns the IPv4 address and mask. This places the interface in the named subnet.
  • no shutdown — administratively enables the interface. Interfaces are often shutdown by default in lab images; forgetting no shutdown is a common cause of "down" interfaces.

Why it matters: Interfaces that are down or misaddressed break Layer 3 adjacency. Routers must be in the same subnet on both ends of a link to exchange traffic directly.

Verify:

show ip interface brief

Expected output (excerpt showing relevant interfaces; full device output will include other interfaces):

Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     10.10.10.1      YES manual up                    up
GigabitEthernet0/1     10.10.20.1      YES manual up                    up
GigabitEthernet0/2     10.10.30.1      YES manual up                    up

Run the same command on R2, R3, and R4 to confirm their configured IPs show up up (or at least up for protocol).


Task 2 Solution: Configure Switch Management IPs

What we are doing: Assign an SVI (VLAN 1) management IP on each switch and set the default gateway pointing at the local router interface so management traffic (SSH/Telnet/ICMP) can reach network operators. In production networks, switches often have a management IP so you can manage them remotely without touching console cables.

! S1 (connected to R2 on 10.10.40.0/24)
configure terminal
interface Vlan1
 ip address 10.10.40.2 255.255.255.0
 no shutdown
exit
ip default-gateway 10.10.40.1
end

! S2 (connected to R3 on 10.10.20.0/24)
configure terminal
interface Vlan1
 ip address 10.10.20.3 255.255.255.0
 no shutdown
exit
ip default-gateway 10.10.20.1
end

! S3 (connected to R4 on 10.10.30.0/24)
configure terminal
interface Vlan1
 ip address 10.10.30.3 255.255.255.0
 no shutdown
exit
ip default-gateway 10.10.30.1
end

What just happened:

  • interface Vlan1 — creates/configures the SVI used for switch management.
  • ip address — sets the management IP that the switch uses for management-plane traffic.
  • ip default-gateway — on layer-2 switches without routing enabled, this points management traffic to the router that can reach other subnets.

Why it matters: If the switch management IP is missing or has the wrong gateway, you cannot reach the switch remotely (out-of-band or in-band management fails). In production, switches are placed in a management VLAN with strict access control.

Verify:

show ip interface brief

Expected output (example for S1):

Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  10.10.40.2      YES manual up                    up

And confirm the default-gateway:

show running-config | include ip default-gateway

Expected:

ip default-gateway 10.10.40.1

Also verify reachability from the switch to its router:

ping 10.10.40.1

Expected:

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

Task 3 Solution: Design PC Addressing Plan

What we are doing: Assign static IPs for each PC so they sit in the correct VLAN subnets and have an appropriate gateway. This is documentation you would implement on host OSs or via DHCP.

PC addressing (examples):

  • PC1 (Sales, VLAN 10): IP 192.168.1.10 255.255.255.0, Gateway 192.168.1.1
  • PC2 (Sales, VLAN 10): IP 192.168.1.11 255.255.255.0, Gateway 192.168.1.1
  • PC3 (Engineering, VLAN 20): IP 192.168.2.10 255.255.255.0, Gateway 192.168.2.1
  • PC4 (Management, VLAN 30): IP 192.168.3.10 255.255.255.0, Gateway 192.168.3.1
  • PC5 (Management, VLAN 30): IP 192.168.3.11 255.255.255.0, Gateway 192.168.3.1

Why this matters: Hosts must be in the correct subnet with a reachable gateway to send traffic to other subnets. In a real network you would configure the router (or Layer 3 device) with the VLAN interface addresses (the gateways above) or use a routed SVI design.

Verify: From a host, test:

  • ping <gateway> — should respond.
  • From the gateway router, ping <pc-ip> (if routing and switching are correctly configured).

Troubleshooting Scenario

Scenario: R2–S1 reachability fails

Symptom: From S1 you cannot ping 10.10.40.1 (R2).
Your task: Find and fix the issue.
Hint: Check masks and interface administrative state on both devices.

Solution:

  • On S1 run show ip interface brief — if Vlan1 is down, run interface Vlan1 then no shutdown.
  • On R2 run show ip interface brief — confirm Gi0/1 is up up and address is 10.10.40.1/24. If the mask is incorrectly set (for example 255.255.0.0), correct with:
configure terminal
interface GigabitEthernet0/1
 ip address 10.10.40.1 255.255.255.0
 no shutdown
end
  • Then from S1 ping 10.10.40.1 — you should see replies.

Warning: A mismatched subnet mask can make devices appear "on the same network" syntactically while actually being in different logical subnets—this causes confusing connectivity problems.


Verification Checklist

  • Each router interface shows the correct IP and status up up (show ip interface brief).
  • Each switch SVI is configured and pingable to its local router.
  • PC addressing plan is documented and gateways are assigned.

Common Mistakes

SymptomCauseFix
Interfaces show administratively downForgot no shutdownEnter interface and issue no shutdown
Ping fails between switch and routerWrong default-gateway or incorrect SVI IPVerify show running-config for ip default-gateway and SVI IP; correct if needed
Devices appear in different subnetsWrong subnet mask configuredReconfigure the IP mask to 255.255.255.0 as per plan

Challenge Task

Configure a small DHCP server (or DHCP pool on a router) to hand out addresses for VLAN 10 and VLAN 20 following the static plan above. (Do this without step‑by‑step guidance — create scopes and test by booting a host to DHCP.)