0% found this document useful (0 votes)
5 views5 pages

Router Configuration for LAN Interconnection

This practical exercise focuses on configuring a router to connect two separate LANs, allowing students to learn about IP addressing, default gateways, and verifying connectivity. Students will use Cisco Packet Tracer to build the network, configure devices, and observe network behavior through simulation. Key tasks include assigning IP addresses, testing connectivity with ping and traceroute, and visualizing ARP and ICMP processes.

Uploaded by

pathan0835
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Router Configuration for LAN Interconnection

This practical exercise focuses on configuring a router to connect two separate LANs, allowing students to learn about IP addressing, default gateways, and verifying connectivity. Students will use Cisco Packet Tracer to build the network, configure devices, and observe network behavior through simulation. Key tasks include assigning IP addresses, testing connectivity with ping and traceroute, and visualizing ARP and ICMP processes.

Uploaded by

pathan0835
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Networks – Practical 4

Title: Configuring a Router as Gateway Between Two LANs


Objective
After completing this practical, students will be able to:
1. Design two separate LANs and connect them through a router acting as a gateway.
2. Configure router interfaces with proper IP addressing and enable them.
3. Configure PCs with correct IP addresses, subnet masks, and default gateways.
4. Verify end-to-end connectivity across different networks using ping and traceroute.
5. Use Packet Tracer’s Simulation Mode to observe ARP, ICMP, and routing behavior step by
step.

Tools & Software


- Cisco Packet Tracer (Version 8.x or later)
- Computer with Windows/Linux/macOS
- Concepts from Practical 1–3 (LAN, switching, IP addressing)

Theoretical Background
Routers interconnect different networks (IP subnets) and forward packets based on Layer 3
information. Each router interface belongs to a different network and typically serves as the
default gateway for hosts on that network. When a host needs to reach a device in another
network, it forwards the packet to its default gateway. The router looks up the destination in its
routing table and forwards the packet out the appropriate interface.

Key concepts:
- Default Gateway: The Layer 3 device (router IP) that forwards traffic destined for remote
networks.
- ARP (Address Resolution Protocol): Resolves IP addresses to MAC addresses within the local
network.
- ICMP Echo (ping): Used to test IP connectivity; useful for verifying network reachability.
- Routing Table: The router’s map of known networks and the interfaces/next-hops to reach them.

Practical Tasks Overview


You will:
1. Build two LANs connected to a single router.
2. Assign IP addresses to PCs and router interfaces.
3. Set default gateways on the PCs.
4. Verify connectivity (ping/traceroute) across networks.
5. Observe ARP and ICMP in Simulation Mode and trace path through the router.

Network Plan & IP Addressing


Use the following addressing scheme (adjust interface names as they appear on your router
model, e.g., GigabitEthernet0/0/0 on Cisco 1941):
Device/Interface IP Address Subnet Mask

LAN A Network [Link] [Link] (/24)

LAN B Network [Link] [Link] (/24)

Router Interface to LAN A [Link] [Link]


(e.g., G0/0/0)

Router Interface to LAN B [Link] [Link]


(e.g., G0/0/1)

PC-A1 [Link] [Link]

PC-A2 [Link] [Link]

PC-B1 [Link] [Link]

PC-B2 [Link] [Link]

Default Gateways on PCs:

PC Default Gateway

PC-A1 / PC-A2 [Link]

PC-B1 / PC-B2 [Link]

Procedure

Step 1: Create a New Project


1. Open Cisco Packet Tracer → File → New.
2. Save the project as CN_Practical4_YourName.pkt.
Screenshot Placeholder 1 – Blank workspace.

Step 2: Add Devices


1. From End Devices, drag four PCs (PC-A1, PC-A2, PC-B1, PC-B2).
2. From Switches, drag two switches (Switch-A and Switch-B, Cisco 2960).
3. From Routers, drag one router (e.g., Cisco 1941).
Arrange LAN A (left) and LAN B (right) with the router in the middle.
Screenshot Placeholder 2 – Devices placed and labeled.

Step 3: Cable the Topology


1. Use Copper Straight-Through cables for all connections.
2. Connect PCs to their respective switches:
- PC-A1 Fa0 → Switch-A Fa0/1
- PC-A2 Fa0 → Switch-A Fa0/2
- PC-B1 Fa0 → Switch-B Fa0/1
- PC-B2 Fa0 → Switch-B Fa0/2
3. Connect Switch-A to the router LAN A interface (e.g., G0/0).
4. Connect Switch-B to the router LAN B interface (e.g., G0/1).
5. Ensure link lights are green.
Screenshot Placeholder 3 – Fully cabled topology.

Step 4: Configure IP on PCs


For each PC → Desktop → IP Configuration:
- PC-A1: IP [Link], Mask [Link], Gateway [Link]
- PC-A2: IP [Link], Mask [Link], Gateway [Link]
- PC-B1: IP [Link], Mask [Link], Gateway [Link]
- PC-B2: IP [Link], Mask [Link], Gateway [Link]
Screenshot Placeholder 4 – PC IP configuration window.

Step 5: Configure the Router (CLI)


1. Click the router → CLI tab → Press Enter to get a prompt.
2. Enter the following commands (interface names may vary on your router model):
enable
configure terminal
interface gigabitethernet0/0
ip address [Link] [Link]
no shutdown
exit
interface gigabitethernet0/1
ip address [Link] [Link]
no shutdown
end
write memory
3. Verify interfaces are up:
show ip interface brief
Screenshot Placeholder 5 – Router CLI configuration and show output.

Step 6: Basic Connectivity Tests


1. From PC-A1 Command Prompt, ping local gateway:
ping [Link]
2. From PC-B1 Command Prompt, ping local gateway:
ping [Link]
3. Test inter-network connectivity:
From PC-A1 → ping [Link] (PC-B1)
From PC-B2 → ping [Link] (PC-A2)
4. Optional: from Router CLI ping hosts to verify reachability:
ping [Link]
ping [Link]
5. Trace the path (on a PC):
tracert [Link] (Windows-style)
Step 7: Save Your Project
File → Save to keep your configuration as CN_Practical4_YourName.pkt.

Simulation: Step-by-Step Observation of ARP, ICMP, and Routing


Use Packet Tracer’s Simulation Mode to visualize how packets move from one LAN to another
through the router.

S1: Switch to Simulation Mode


Click the clock icon (bottom-right) to enter Simulation mode.
Clear the Event List if needed by clicking the Reset Simulation button.
Screenshot Placeholder S1 – Simulation panel visible.

S2: Configure Event Filters (Optional but Recommended)


Click Edit Filters and ensure the following are checked:
- ARP, ICMP, and IPv4.
Uncheck other protocols to reduce noise.
Screenshot Placeholder S2 – Edit Filters with ARP/ICMP/IPv4 enabled.

S3: Generate Initial ARP and ICMP


On PC-A1, open Command Prompt and run:
ping [Link]
This triggers ARP for the default gateway ([Link]), then ICMP Echo to the remote host.
Screenshot Placeholder S3 – PDU created from PC-A1.

S4: Step Through Events


Use the Play Controls (Capture/Forward) to move packet by packet.
Observe the sequence:
1) PC-A1 sends ARP Request for [Link] → Switch-A broadcasts.
2) Router replies with ARP Reply (its MAC for [Link]).
3) PC-A1 sends ICMP Echo Request to [Link] (encapsulated to router’s MAC).
4) Router routes packet out G0/0/1 toward LAN B.
5) If needed, router/PC-B1 performs ARP on LAN B.
6) PC-B1 receives Echo Request and replies (Echo Reply) back via router.
Screenshot Placeholder S4 – Stepping through ARP and ICMP frames.

S5: Inspect PDU Details


Click any PDU in the Event List and open PDU Details.
Review the OSI layers and headers:
- Notice L2 MAC addresses change hop-by-hop, while L3 IPs remain constant.
- Confirm the router decrements TTL and forwards based on routing table.
Screenshot Placeholder S5 – PDU Details window.

S6: Repeat From the Other Side


Run ping from PC-B2 to PC-A2:
ping [Link]
Step through events to reinforce understanding.
S7: Exit Simulation
Return to Realtime mode using the clock icon.

Troubleshooting Checklist
Problem Possible Cause Solution

Cannot ping remote LAN PC default gateway Set correct gateway


missing/incorrect ([Link] or
[Link])

Router interfaces down Interface admin down Use 'no shutdown' on each
router LAN interface

Ping to local gateway fails Wrong cabling or IP/mask Verify cable types, IPs, and
masks

Intermittent timeouts ARP not resolved yet / Step through events or retry
Simulation paused after ARP resolution

Wrong interface names Model-specific interface Use 'show ip int brief' to


labels identify correct names

Expected Outcome
Students will be able to:
- Build two LANs and interconnect them using a router.
- Configure router interfaces and host default gateways correctly.
- Verify cross-network connectivity with ping and traceroute.
- Visualize ARP and ICMP exchanges and understand hop-by-hop forwarding in Simulation
Mode.

Lab Deliverables
Each student must submit:
1. CN_Practical4_YourName.pkt file.
2. Screenshots: topology, router CLI (show ip int brief), successful cross-LAN ping, and one
PDU Details view.
3. A 2–3 line reflection on how the router enables inter-network communication.

Discussion Questions
1. Why does a host need a default gateway to reach remote networks?
2. In Simulation Mode, which headers change at each hop and which remain the same? Why?
3. What would happen if PC-A1’s gateway were set to [Link]?
4. How does the router decide the egress interface for a packet?
5. Why is ARP necessary even when IP addresses are configured?

You might also like