Establishing a Peer-to-Peer Network Using Two PCs
Experiment: Establishing a Peer-to-Peer Network Using Two PCs
1. Aim
To establish a simple peer-to-peer network between two PCs using a Copper Cross-Over cable in Cisco Packet Tracer, configure IPv4 addresses, and verify connectivity using the ping command.
2. Learning Objectives
After completing this experiment, students should be able to:
- Create a simple two-computer peer-to-peer network.
- Identify the Ethernet interface of a PC.
- Select and use a Copper Cross-Over cable.
- Configure IPv4 addresses and subnet masks.
- Understand the concept of an IP network and subnet.
-
Test connectivity using the
pingcommand. - Interpret successful and unsuccessful ping results.
- Perform basic network troubleshooting.
3. Network Topology
The network consists of two PCs connected directly without a switch or router.
Copper Cross-Over Cable +-------+ +-------+ | PC0 |=======================| PC1 | +-------+ +-------+ FastEthernet0 FastEthernet0
This is a simple peer-to-peer connection.
There is no:
- Switch
- Router
- Server
in this experiment.
4. Devices and Software Required
Software
- Cisco Packet Tracer
Devices
| Device | Quantity |
|---|---|
| PC | 2 |
| Copper Cross-Over Cable | 1 |
5. IP Addressing Scheme
Use the following IP addresses:
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| PC0 | FastEthernet0 | 192.168.1.1 | 255.255.255.0 |
| PC1 | FastEthernet0 | 192.168.1.2 | 255.255.255.0 |
Default Gateway
Leave the default gateway blank.
Why?
Because the two PCs are directly connected and belong to the same IP network. A router is not required for communication between them.
6. Procedure
Students should perform the following tasks in the exact order given below.
Task 1: Start Cisco Packet Tracer
- Open Cisco Packet Tracer.
- Create a new blank workspace.
Task 2: Add Two PCs
- Select End Devices from the device selection area.
- Select PC.
- Drag two PCs into the workspace.
The PCs will normally appear as:
PC0 PC1
Arrange them with some space between them.
Task 3: Connect the Two PCs
- Click the Connections icon (lightning-bolt symbol).
- Select:
Copper Cross-Over
- Click PC0.
- Select:
FastEthernet0
- Click PC1.
- Select:
FastEthernet0
The final physical connection should be:
Checkpoint 1
Before proceeding, verify:
- Two PCs are present.
- One crossover cable is used.
-
PC0 is connected through
FastEthernet0. -
PC1 is connected through
FastEthernet0. - No switch is used.
- No router is used.
7. Configure PC0
Task 4: Open PC0 IP Configuration
- Click PC0.
- Select the Desktop tab.
- Click IP Configuration.
You will see fields such as:
IP Address Subnet Mask Default Gateway DNS Server
Task 5: Assign the IP Address to PC0
Enter:
IP Address: 192.168.1.1 Subnet Mask: 255.255.255.0
Leave:
Default Gateway: blank
Do not enter a DNS server.
The configuration should be:
| Parameter | Value |
|---|---|
| IP Address | 192.168.1.1 |
| Subnet Mask | 255.255.255.0 |
| Default Gateway | Blank |
Close the configuration window.
8. Configure PC1
Task 6: Open PC1 IP Configuration
- Click PC1.
- Select Desktop.
- Select IP Configuration.
Task 7: Assign the IP Address to PC1
Enter:
IP Address: 192.168.1.2 Subnet Mask: 255.255.255.0
Leave:
Default Gateway: blank
The configuration should be:
| Parameter | Value |
|---|---|
| IP Address | 192.168.1.2 |
| Subnet Mask | 255.255.255.0 |
| Default Gateway | Blank |
9. Verify the IP Configuration
Task 8: Verify PC0
Go to:
PC0 → Desktop → Command Prompt
Enter:
ipconfig
You should see information similar to:
FastEthernet0 IP Address................: 192.168.1.1 Subnet Mask...............: 255.255.255.0 Default Gateway...........: 0.0.0.0
Task 9: Verify PC1
Go to:
PC1 → Desktop → Command Prompt
Enter:
ipconfig
You should see:
IP Address................: 192.168.1.2 Subnet Mask...............: 255.255.255.0
10. Test Connectivity
Now we will verify whether the two PCs can communicate.
Task 10: Ping PC1 from PC0
Go to:
PC0 → Desktop → Command Prompt
Enter:
ping 192.168.1.2
Press Enter.
A successful result should contain messages similar to:
Reply from 192.168.1.2: bytes=32 time<1ms TTL=128 Reply from 192.168.1.2: bytes=32 time<1ms TTL=128 Reply from 192.168.1.2: bytes=32 time<1ms TTL=128 Reply from 192.168.1.2: bytes=32 time<1ms TTL=128
This indicates that PC0 can communicate with PC1.
11. Test Connectivity in the Reverse Direction
Task 11: Ping PC0 from PC1
Go to:
PC1 → Desktop → Command Prompt
Enter:
ping 192.168.1.1
The ping should also be successful.
This verifies communication in the reverse direction.
12. Record the Ping Results
Students should complete the following table.
| Source PC | Destination PC | Command | Result |
|---|---|---|---|
| PC0 | PC1 | ping 192.168.1.2 | __________ |
| PC1 | PC0 | ping 192.168.1.1 | __________ |
13. Understand What Happens During Ping
When PC0 executes:
ping 192.168.1.2
PC0 sends an ICMP Echo Request to PC1.
PC1 responds with an ICMP Echo Reply.
Conceptually:
PC0 PC1 | | | ICMP Echo Request | |-------------------------->| | | | ICMP Echo Reply | |<--------------------------| | |
A successful ping indicates that the two computers are able to communicate at the IP level.
14. Task 12: Observe the Network in Simulation Mode
Additional activity for students.
- Change Packet Tracer from Realtime to Simulation mode.
- From PC0, open Command Prompt.
- Execute:
ping 192.168.1.2
- Observe the packets generated in the simulation window.
- Use Capture/Forward to step through the communication.
- Observe the protocol information associated with the packets.
Ask students to identify:
- ARP
- ICMP Echo Request
- ICMP Echo Reply
This helps students understand that ping is not simply a command—it causes actual network communication.
15. Task 13: Examine ARP Information
From PC0, enter:
arp -a
Students may see an entry corresponding to PC1.
Conceptually:
IP Address MAC Address 192.168.1.2 xx-xx-xx-xx-xx-xx
This demonstrates an important concept:
IP addresses are used for logical addressing, while MAC addresses are used for communication at the local Ethernet level.
16. Task 14: Create a Deliberate Error
Now introduce a configuration error to understand troubleshooting.
Change PC1's IP address from:
192.168.1.2
to:
192.168.2.2
Keep the subnet mask:
255.255.255.0
The configuration is now:
PC0 → 192.168.1.1/24 PC1 → 192.168.2.2/24
Task 15: Test the Connection Again
From PC0:
ping 192.168.2.2
Observe the result.
The communication will not work as before because the two PCs are now configured in different IP networks:
PC0 → 192.168.1.0/24 PC1 → 192.168.2.0/24
There is no router in this experiment to provide communication between these networks.
17. Task 16: Correct the Error
Change PC1's IP address back to:
192.168.1.2
with:
255.255.255.0
Now execute from PC0:
ping 192.168.1.2
The ping should succeed again.
18. Task 17: Troubleshooting Exercise
If the ping does not work, students should check the following in this order.
Check 1 — Cable
Verify that the connection is:
PC0 FastEthernet0 | Copper Cross-Over | PC1 FastEthernet0
Check 2 — IP address of PC0
192.168.1.1
Check 3 — IP address of PC1
192.168.1.2
Check 4 — Subnet masks
Both should be:
255.255.255.0
Check 5 — Duplicate addresses
Make sure the two PCs do not have the same IP address.
Check 6 — Ping again
From PC0:
ping 192.168.1.2
19. Observation Table
Students should record the following.
IP Configuration
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| PC0 | FastEthernet0 | __________ | __________ |
| PC1 | FastEthernet0 | __________ | __________ |
Connectivity Test
| Test | Expected Result | Actual Result |
|---|---|---|
| PC0 → PC1 | Successful | __________ |
| PC1 → PC0 | Successful | __________ |
Error Test
| PC0 Address | PC1 Address | Expected Result |
|---|---|---|
| 192.168.1.1 | 192.168.2.2 | Unsuccessful |
20. Important Concepts Learned
Concept 1 — Direct connection
The two PCs communicate directly:
PC0 ───────── PC1
No intermediate switch or router is present.
Concept 2 — Same network
Both PCs belong to:
192.168.1.0/24
Concept 3 — Unique IP addresses
Each device must have a unique IP address.
PC0 → 192.168.1.1 PC1 → 192.168.1.2
Concept 4 — Same subnet
Both PCs use:
255.255.255.0
Concept 5 — Default gateway
A default gateway is not required for communication between these two directly connected PCs when they are in the same subnet.
21. Result
A peer-to-peer network was successfully established between two PCs in Cisco Packet Tracer using a Copper Cross-Over cable. Appropriate IPv4 addresses and subnet masks were assigned to both PCs, and connectivity between the PCs was verified successfully using the ping command. The effect of an incorrect IP network configuration was also observed and corrected.
Comments
Post a Comment