Thanks to visit codestin.com
Credit goes to www.scribd.com

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

CN Lab 4

Uploaded by

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

CN Lab 4

Uploaded by

harshilkamde01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

NAME: SHREYA GOSAVI

ROLLNO: A059

Experiment 4

AIM - To analyze MAC behavior in networks using packet tracer.

Tool: Cisco packet tracer

Part A

In this lab, you shall be studying a shared medium -- Ethernet, how collision occurs and how
collisions can be avoided. The simulations will be done using Cisco packet tracer. Ethernet protocol
enables computers connected together to share information.

Ethernet:

Ethernet provides services on the Physical (Layers 1) and Data Link Layer (Layers 2) of OSI reference
model. The Data Link Layer is further divided into two sublayers that are Logical Link Control (LLC)
and Media Access Control (MAC), these sublayers can be used to establish the transmission paths
and format data before transmitting on the same network segment.

Ethernet nodes also listen to the medium while they transmit to ensure that they are the only
station transmitting at that time. If the stations hear their own transmission returning in a garbled
form, as would happen if some other station had begun to transmit its own message at the same
time, then they know that a collision occurred. A single Ethernet segment is sometimes called a
collision domain
because no two stations on the segment can transmit at the same time without causing a collision.
When stations detect a collision, they cease transmission, wait a random amount of time, and
attempt
to transmit when they again detect silence on the medium.

The random pause and retry is an important part of the protocol. If two stations collide when
transmitting once, then both will need to transmit again. At the next appropriate chance to transmit,
both stations involved with the previous collision will have data ready to transmit. If they
transmitted again at the first opportunity, they would most likely collide again and again indefinitely.
Instead, the random delay makes it unlikely that any two stations will collide more than a few times
in a row.

Steps:
1. Watch CSMA/CD protocol working: https://www.youtube.com/watch?v=iKn0GzF5-IU

2. Connect the hub and PCs as shown in the diagram below. Assign the IP address to PCs as
192.168.1.<roll_no>, 192.168.1.<roll_no+1>, 192.168.1.<roll_no+2>, 192.168.1.<roll_no+3>,
192.168.1.<roll_no+4>, 192.168.1.<roll_no+5>. Label the Pcs with the respective IP addresses.
3. Go to command prompt of PC0 and type arp –a. Note the results.

4. Go to simulation mode, in the Event List Filters section, click the Edit Filters button. Select only
ICMP and ARP packets. Select simple PDU from PC0 to PC5, click on capture/forward button.
Observe the ARP packet details – Take screen shots.
5. Repeat the step 3 again and note the results. Also check if PC5 knows the MAC address of PC0.
Take screen shots.
6. Clear the simulation (delete the scenario; press Delete button in the bottom pane). Then send a
simple PDU from PC0 to PC5, and from PC4 to PC0 in simulation mode at the same time. Run the
simulation and note the results. Take screen shots.
7. Switch OFF the hub and Add more port in hubs by adding interface PT-REPEATER-NM-1CE. Extend
the network as shown in the figure.
8. Send the simple PDU from PC0 to PC4, PC5 to PC4 and PC11 to PC5, in simulation mode all at the
same time. Note the results. Take screen shots
9. Replace the hub with switch in the single network figure. On the switch, go to CLI and type show
mac address-table. Run this command before sending the packets and after sending the packets.
Repeat steps 3 to 6. Note the results (take screen shots)
10.Similarly replace hub with switch for two networks figure. Repeat step 8 and Note the results
(take screen shots)

Part B: Report to be submitted:


Observations:
1) Legible screen shot of all the steps showing the working of shared medium cable with hub and
switch.
2) Note the output of step 3. Why you didn’t find any entries initially?
3) Show the ARP packet details observed in step 4. What does FFFF.FFFF.FFFF MAC address means?
4) Explain in your own words how does PC0 discover the MAC address of PC5. Include screen shot
of step 5 simulation.
5) Observe the simulation of step 6 and write in your own words what has happened. Include
screen shot of step 6 simulation.
6) Observe the simulation of step 8 and include screen shot of the output, describe the reason of
the output.
7) Include screenshots of output of step 9, describe in your own words how does switch form the
switching table.
8) What does carrier sense mean in CSMA/CD?
Carrier Sense in CSMA/CD (Carrier Sense Multiple Access with Collision Detection) refers to the
mechanism where a device listens to the communication medium (usually a cable) before
transmitting data. If the channel is idle, the device proceeds to send data. If the channel is busy, it
waits until it becomes free. This helps to reduce the chances of data collisions.

Conclusion:

Answer the following question

1) Why do collisions occur in case of hub but not in case of switches?

 Hubs operate at Layer 1 (Physical Layer) and broadcast data to all connected
devices, creating a shared medium. When two or more devices transmit data at the same
time, collisions occur because they are using the same bandwidth.

 Switches, on the other hand, operate at Layer 2 (Data Link Layer) and create a separate
collision domain for each connected device. They forward data only to the intended
recipient, which prevents collisions.

2) If multiple devices are to be connected which device is preferable? Why? What feature of
the selected device makes it a better choice?

 A switch is preferable.

 Why?

 Switches provide full-duplex communication (sending and receiving at the same


time).
 They reduce or eliminate collisions.
 They offer better performance, scalability, and security.

 Key Feature: The switch's ability to create separate collision domains for each port
makes it the better choice. This means each device has a dedicated communication path,
avoiding interference from others.

https://www.youtube.com/watch?v=ihKtFQEikFA

You might also like