In question 5 we're told to assume that switch 1s MAC address is empty.
We can verify that by looking at the output of the show MAC address table command on the switch, as we
can see here the MAC address table is empty.
We're asked when PC 5 pings PC 8 what type of packet is sent to the switch initially
and can we prove it?
So
IP config on PC 5 shows us the IP address of PC 5, 10 115
PC 8
has IP address 10 118.
So what kind of frame or what kind of packet is sent to the switch when using terms such as frames and
packets once again, are we referring to layer 2 or layer 3 or layer 4 of the OSI model.
So what I'll do on PC 5 is ping 10 118 before I do that,
notice the ARP cache is empty.
On PC 5 if it had just a rebooted the ARP cache would be empty.
So I'm gonna send two pings into the network we can see that the first packet that was generated is
an ARP packet looking at the actual packet or frame we can see that at layer 2 the frame has a destination
address of a broadcast.
The type of packet at layer 3 is ARP, so in the layer 3 headers we can see that this is an ARP packet
requesting the MAC address of host with IP address 10 118 so the Ethernet type is 06 08 06.
In other words it's an ARP packet, capture forward
and before I continue the answer to Question 5, is this is an ARP packet it's a broadcast packet we can
see that again by looking at the inbound PDU on the switch notice destination address is a broadcast
who receives the packet because it's a broadcast it's gonna be flooded to the other devices in the
network and then PC 6 and PC 7 are gonna drop it because the packet is not destined to them.
So the answer for question 6 is
PC 6, PC 7 and PC 8 will receive the packet.
Now here's where things change,
who receives the return packet?
So here we've got our ARP reply on the inbound PDU to the switch.
We can see that the target mac address is this,
that's the MAC address of PC 5.
So the MAC address is actually written into the frame.
This is a uni cost packet sent from PC 8 to PC 5.
It's not a broadcast unlike the ARP request so notice what happens now.
The packet is only sent to PC 5
it's not flooded out of all ports so the only PC that receives it is PC 5 that is different to
our previous example where PC 1, PC 2 and PC 3 received the return traffic and notice the difference
in question 8 when ping traffic is sent from PC 5 to PC 8 who receives it.
So here's our
ICMP request or echo request message we can see that its ICMP destination MAC address is PC 8,
source MAC address is PC 5 source IP address is
PC 5 destination IP address is PC 8.
So notice now that the packet is only sent to PC 8, so that's very different to what we saw when we
were using a hub, a switch is different to a hub in that it has a separate collision domain on every
port so when packets are sent from PC 5 to PC 8 they are sent directly between the devices they don't
get flooded to the other PCs in the network.
That is very different to a hub so to prove that what I'll do is populate the ARP cache of PC 6.
So I'll get it to ping
PC 8 and I'll run this in real-time so if we look at to the ARP cache of PC 6 ARP cache is populated
the same is true on PC 5.
So both
PC 5 and PC 6 know the MAC address of PC 8. I'll change this to simulation mode
and I'll get both of these PCs to ping PC 8
both of them are sending ICMP packets
they both get sent to the switch.
And notice the first one is sent to PC 8 and then the second one is sent to PC 8.
We don't end up with a collision so the switch caches the packet and allows the communication and
to show you this in a different way.
What I'll do is get PC 5 to ping PC 8
but get PC 6 to ping PC 7. So PC 5 is pinging PC8, PC 6 is pinging PC
7, in this case, PC 6 needs to ARP for the MAC address of PC 7.
Notice however that there is no collision taking place.
So now notice the ARP cache of PC 6 is populated with the MAC address of both PC 7 and PC 8. So I'll
run that again
and I need to be in simulation mode to do that.
So they're both are sending ICMP packets
these are unicast
they are not broadcasts, notice the destination of this frame is PC 7 destination of this frame
is PC 8 both packets can be sent and received by the switch without interference from the other conversation
so the PCs can communicate now without collisions and they are essentially separated from the other
conversation. The conversation between PC 5 and PC 8 happens independently of the conversation between
PC 7 and PC 6.
We have 4 collision domains here
a hub is a single collision domain, a switch has a collision domain per interface, but again if PC 5
sent a broadcast
the broadcast
would be forwarded to all devices in the network.
This is a layer 2 switch
it's gonna flood that broadcast out of all ports so everyone is gonna receive the broadcast and
everyone is gonna have to reply back to that broadcast.
Packet tracer is not perfect software but it allows you to visually see how traffic flows in the network
and to learn how to answer questions such as these.
So when studying for the CCNA exam you can use packet tracer to learn how traffic flows to learn what
frames look like, what packets look like, what segments look like and it helps you essentially become
a better network engineer.
So were you able to answer these questions?
Do you understand how data flows in a network when you have a switch or when you have a hub?
Make sure that you understand how data flows through networks.