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 ping command.
  • 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

DeviceQuantity
PC    2
Copper Cross-Over Cable    1

5. IP Addressing Scheme

Use the following IP addresses:

DeviceInterface    IP Address    Subnet Mask
PC0FastEthernet0    192.168.1.1    255.255.255.0
PC1FastEthernet0    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

  1. Open Cisco Packet Tracer.
  2. Create a new blank workspace.

Task 2: Add Two PCs

  1. Select End Devices from the device selection area.
  2. Select PC.
  3. 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

  1. Click the Connections icon (lightning-bolt symbol).
  2. Select:

Copper Cross-Over

  1. Click PC0.
  2. Select:
FastEthernet0
  1. Click PC1.
  2. Select:
FastEthernet0

The final physical connection should be:

PC0 FastEthernet0 ================= FastEthernet0 PC1
                    Cross-Over



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

  1. Click PC0.
  2. Select the Desktop tab.
  3. 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:

ParameterValue
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

  1. Click PC1.
  2. Select Desktop.
  3. 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:

ParameterValue
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 PCCommandResult
PC0    PC1ping 192.168.1.2    __________
PC1    PC0ping 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.

  1. Change Packet Tracer from Realtime to Simulation mode.
  2. From PC0, open Command Prompt.
  3. Execute:
ping 192.168.1.2
  1. Observe the packets generated in the simulation window.
  2. Use Capture/Forward to step through the communication.
  3. 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

DeviceInterface    IP Address    Subnet Mask
PC0FastEthernet0    __________    __________
PC1FastEthernet0__________    __________

Connectivity Test

Test    Expected Result    Actual Result
PC0 → PC1    Successful    __________
PC1 → PC0    Successful    __________

Error Test

PC0 AddressPC1 AddressExpected Result
192.168.1.1192.168.2.2Unsuccessful

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

Popular posts from this blog

Networks Lab PCCSL507 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Study of whois Command

Study and Use of ifconfig Command