Scenario
R1 joins two networks: PC1's (192.168.1.0/24) on G0/0 and PC2's (192.168.2.0/24) on G0/1. The PCs already have their IP and default gateway, but the router is unconfigured and its interfaces ship shut down.
Assign the addresses from the table, add a description to each interface, bring them up and create Loopback0 with 10.0.0.1/32. Finally, check that the PCs can reach each other (from PC1's console: ping 192.168.2.10) and review the status with show ip interface brief.
Topology
Devices and cabling
- R1 · 2911
- PC1, PC2 · PC-PT
| From | To | Cable |
|---|
| PC1 Fa0 | R1 Gi0/0 | Crossover |
| R1 Gi0/1 | PC2 Fa0 | Crossover |
If in doubt, the automatic connection cable (the lightning bolt) picks the right one. Rule: straight-through between different devices (PC or router to switch) and crossover between alike ones.
Addressing
| Device | Interface | Address | Mask | Default gateway |
|---|
| R1 | G0/0 | 192.168.1.1 | 255.255.255.0 | — |
| R1 | G0/1 | 192.168.2.1 | 255.255.255.0 | — |
| R1 | Lo0 | 10.0.0.1 | 255.255.255.255 | — |
| PC1 | NIC | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |
| PC2 | NIC | 192.168.2.10 | 255.255.255.0 | 192.168.2.1 |
Starting configuration
In the app this is already done. In Packet Tracer, before you start, enter each device with enable and configure terminal and type (or paste) these lines.
R1hostname R1
no ip domain-lookup
PCs and servers (Desktop › IP Configuration)
- PC1: IP 192.168.1.10, mask 255.255.255.0, gateway 192.168.1.1
- PC2: IP 192.168.2.10, mask 255.255.255.0, gateway 192.168.2.1
Tasks
What must end up working. In the app, each one ticks itself off as soon as you get it.
- G0/0 with 192.168.1.1/24 and a description
- G0/1 with 192.168.2.1/24 and a description
- Both interfaces up (up/up)
- Loopback0 with 10.0.0.1/32
- PC1 reaches PC2
- PC1 reaches Loopback0
- Checked with show ip interface brief
In Packet Tracer- Connect each PC straight to the router with a crossover cable (or the automatic one, the lightning bolt). The cable lights stay red until you issue no shutdown.
- Each PC's IP is set in Desktop › IP Configuration.
Hints
- G0/0 with 192.168.1.1/24 and a description: interface g0/0 → description LAN-PC1 → ip address 192.168.1.1 255.255.255.0
- G0/1 with 192.168.2.1/24 and a description: interface g0/1 → description … → ip address 192.168.2.1 255.255.255.0
- Both interfaces up (up/up): Router interfaces ship shut down: enter each one and type no shutdown
- Loopback0 with 10.0.0.1/32: interface loopback 0 → ip address 10.0.0.1 255.255.255.255 (it's created when you enter it)
- PC1 reaches PC2: If it fails, check the IP and state of both interfaces with show ip interface brief
- PC1 reaches Loopback0: From PC1: ping 10.0.0.1
- Checked with show ip interface brief: In privileged mode (or with do from config mode): show ip interface brief
Step-by-step solution
Try it on your own first: you learn much more by typing the commands yourself.
Show the solution
1Configure G0/0, PC1's LAN R1
Router interfaces ship shut down (administratively down): without no shutdown nothing happens, even if the IP is right.
R1enable
configure terminal
interface g0/0
description LAN-PC1
ip address 192.168.1.1 255.255.255.0
no shutdown
2Configure G0/1, PC2's LAN R1
Typing interface g0/1 inside another interface switches straight to the new one: no need to exit first.
R1interface g0/1
description LAN-PC2
ip address 192.168.2.1 255.255.255.0
no shutdown
3Create Loopback0 R1
A loopback is a logical interface that is always up. It's created when you enter it and usually takes a /32.
R1interface loopback 0
ip address 10.0.0.1 255.255.255.255
end
Verification
The three configured interfaces must show Status and Protocol up. "administratively down" means no shutdown is missing; "down/down" means there's no cable or the other end is off.
R1R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES manual up up
GigabitEthernet0/1 192.168.2.1 YES manual up up
GigabitEthernet0/2 unassigned YES unset administratively down down
Loopback0 10.0.0.1 YES manual up up
The first echo may be lost while the router resolves the MAC through ARP; the rest reply with TTL=127 (128 minus the router hop).
PC1C:\>ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Reply from 192.168.2.10: bytes=32 time<1ms TTL=127
Reply from 192.168.2.10: bytes=32 time<1ms TTL=127
Reply from 192.168.2.10: bytes=32 time<1ms TTL=127
Reply from 192.168.2.10: bytes=32 time<1ms TTL=127
Ping statistics for 192.168.2.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Common mistakes
- Typing the IP with a /24 mask: IOS only accepts the full mask (255.255.255.0).
- Putting the same network on two interfaces: IOS rejects it with "% … overlaps with …".
Practice this lab on your phone
RoutingLab has this lab with a simulated IOS terminal: abbreviations, ? help, the same error messages and objectives that check themselves. The first two labs are free.
Get RoutingLab