Cisco certified network associate day 4.
Welcome back everybody, I’m Imran Rafai, your trainer for this entire series. Today we’re
going to learn about inter networking devices. Now when I say inter networking devices, we
would be looking at all the devices that is required for your CCNA syllabus. Of course
we have many more devices within Cisco, but for your examination perspective, we need
to discuss only these 3 devices that we’re going to discuss today. We will end today’s
video with the data transmission. We will see how data is transmitted through these
devices, right. And of course the videos are going to be very very interesting from now
onwards because we would be dealing with real time scenarios and we will be getting on to
doing hands-on Cisco devices, right. So, get excited guys, we are going to have fantastic
days ahead. Right, without wasting much time, let’s get straight into today’s video. The
first device I want to discuss today is the hub. Let me take a pen, right. Now, hub is
a device that all of you would have seen in your networking environment. Now, most of
the people call it a switch, I just don’t understand why people call it a switch. It
does look like a switch, it has many ports, that’s where the similarities end. A hub is
a non-intelligent device. Now I say non-intelligent because it does not have any intelligent features
in it. It doesn’t have a hardware CAM table or MAC table like a switch has. What basically
a hub does is it takes input from one of those ports and it copies that information and sends
out into all the ports. So it just acts like a repeater. It has only one collision domain.
A collision domain means if two devices connected to these of these ports and they are talking
to each other, if a third device tries to communicate, all the information, even the
communication happening between 1 and 2 is corrupt and all the devices will have to re-transmit.
Now, there is no way a hub can segregate these 2 communications. So, it has only 1 collision
domain. It also has only one broadcast domain. Now what is a broadcast domain. Broadcast
domain means when a broadcast message is received from one port, it will broadcast in all the
ports. Now broadcast literally means sending to all the devices, right. Now the problem
is if it’s like this, broadcast will not be much but if let’s say for instance broadcast
is non-stop somewhere, think about these billions and billions of devices that’s on the internet.
Now, if a broadcast happening on my computer is sent to all the computers in this world
and that happens to all the computers in this world whenever they do any broadcast, it comes
to me, think about what is going to happen to the network. It is going to be congested,
inefficient network. So as the network becomes big, the broadcast traffic will need to be
stopped. A hub cannot do that, a hub will take a broadcast traffic and it will just
copy it in all the ports. So, 3 things that you need to remember about a hub – it is
not an intelligent device, it has got only 1 collision domain and it has only 1 broadcast
domain. Next we will deal with a switch. Now before
we deal with a switch, in between a switch and a hub there is one more device called
a bridge. So, a bridge is slightly more intelligent than a hub but not as intelligent as a switch.
But if you’re just starting in your CCNA, there’s 99.99% chance that you will not even
see a bridge in your entire life. So don’t worry about bridge and I don’t see bridge
in your latest CCNA curriculum, so you should not really worry about this bridge. Now, switch
is an intelligent device, now I call it intelligent because it has something called ASIC which
is application specific integration circuitry. Now what it really means is it has the feature
of storing the MAC address information. Now each of these ports are connected to a device.
Now a switch within maybe 10 seconds of going up, it will learn all the MAC addresses connected
to it. Now how does that help? Now, if a device is trying to communicate with another device
on a specific MAC address, the switch can send that information only to that particular
destination without having to send out broadcasts in all the different, 24 ports of the switch.
Now that effectively breaks the collision domain. So unlike a hub in this case, every
port can have a communication with another port without colliding with the traffic going
from other ports. So literally a switch if it’s a 24-port switch, it has 24 collision
domains. That’s what a switch is. Now, typically assuming that VLAN is not configured, a switch
has 1 broadcast domain. That means any broadcast coming in from one interface, that broadcast
traffic will be sent to all the 23 ports. But that’s assuming VLAN is not configured.
Now, you might ask me what is a VLAN. But you don’t need to worry about VLAN for now,
we will be dealing with VLAN when we deal with switch in later part of this series.
But for now just assume that switch has only 1 broadcast domain. So what do you need to
remember about a switch is that it is intelligent, it has got something called the CAM table
and it has as many collision domains as the number of ports and it has 1 broadcast domain.
Right. Next we would be dealing with a router. Now,
router is an intelligent device. Now, router has many collision domains, again the number
of ports it has, it has so many collision domains, and it has many broadcast domains.
Now what does that mean? Let’s assume that a router receives a broadcast traffic from
one of it’s ports, what it does? It just drops it, it does not forward that to the other
ports. A router is the border device, now in one of our early video, when we spoke about
subnetting, we told that when a client gets a destination IP address, it compares with
itself. Now if the destination IP address is in a different network, it sends that packet
or information to the gateway, right? That’s what we learnt. Now your router is the gateway
in most of the cases. So, each interface of the router will be connected to a different
network. Compare this with a switch, each interface of the switch should be connected
to the same network. But in case of a router, each of these ports in the router will be
connected to different networks. Now what does that mean? We will see when we go in
the next slides, when we discuss the data flow, right. So a router is an intelligent
device, it has many collision domain and it has many broadcast domains. Right, let’s look
at data transmission. Lets assume this guy, OK let me just get a highlighter. Let’s assume
10.1.1.10 IP address, let’s assume this computer wants to communicate with this computer, 10.1.1.11,
right. Now if you know the OSI model, we know there are 2 address concepts, we have the
IP address, layer 3 addresses and then we have the layer 2 addresses called as the MAC
address. Now data transmission in the local subnet or rather data transmission on Ethernet
happens only using MAC addresses, right. So, when 10.1.1.10 IP address wants to communicate
with this computer with 10.1.1.11, the critical information they need is the MAC address.
But, this guy has only these 3 information. So it has the source IP address, which is
itself, it knows it has to go to 10.1.1.11, so it knows the destination IP address. It
knows itself, so it knows it’s MAC address, but it does not know the MAC address of the
destination device. What does it do? It uses a protocol called ARP, now what is an ARP.
ARP is address resolution protocol. What it does is, it sends the IP address with the
ARP request to the switch. Now switch, its a broadcast, ARP is a broadcast traffic. So
the switch takes that broadcast request and sends it out to all the ports. So switch gets
it here, it sends down that information to all the ports. Now ARP is like calling out
your friend’s name in a crowd, right. Let’s assume you’re in a party and you’re just calling
out your friends name, now everybody hears that but only your friend responds to that,
right. So similarly, when this information is received by everybody, everybody except
for this computer, 10.1.1.11 computer, everybody else just drops that packet. But this guy,
what it does is it says “Ah this is an ARP for me. Whoever sent this to me needs my MAC
address”. So it puts it’s MAC address in that and sends a reply. Now the switch gets
it’s MAC addresses reply and it knows that this ARP came from 10.1.1.10, so it sends
that reply back to 10.1.1.10. He gets that information, he says “Fantastic!”. He
now has all the information he needs to send the packet. So he’s got the destination IP
address, source IP addresses, source MAC addresses, destination MAC addresses. Now it creates
a packet with this information and gives it to the switch. Now, switch look at the layer
2 information because switch works at layer 2. Switch can only look at layer 2 information,
so it looks at the layer 2 information and says “OK it has to go the destination MAC
address of 2222. Now like I said, a switch has intelligence. Now, what is the intelligence
mean? Intelligent meant that in the 20 seconds after the switch has come up, the switch would’ve
learnt all the MAC addresses, so it would’ve learnt which port which MAC address is in.
So now the switch knows that the MAC address 2.2.2 is connected to this port so the switch
forwards that packet only in this port and this computer receives that packet. So the
minute it receives that packet, it strips the layer 2 information and looks at layer
3 information and it realizes that the packet was designed to him and he accepts that packet
and the transmission is complete. Now this is a local transmission. Let’s look at what
happens if it has to go out of the network. If the destination IP address is not in the
same network. All right, in this case, will look at a scenario where the 10.1.1.10 IP
addresses wants to communicate with 22.214.171.124. Now in both these cases, we’re assuming 1
thing which I forgot to tell the in last slide, that the subnet mask is /24. So it’s a 255.255.255.0
right. So, now this guy wants to communicate with 126.96.36.199. In this slide we will not be
looking at ARP. ARP works exactly how it worked the previous time. So when this computer looks
at the destination IP addresses, it realizes that 188.8.131.52 is not part of 10.1.1.10 network
so it’s not in this network. So if the destination IP addresses is not in the same network, it
has to forward that packet to the gateway, right? So if it’s a windows computer, when
we configure the IP addresses, we also configure the default gateway, right? So it knows that
the default gateway is 10.1.1.255. Now, if it knows the MAC addresses, it creates the
packet but if it doesn’t know the MAC addresses, the same ARP request is sent again and it’s
sent to everybody. This router will respond with it’s MAC address which is AAAA and
the nit will create the packet. So we will not go through that because I’m assuming
that since we did it in the last slide, I’m assuming that you know the working of an ARP,
right. So let’s assume all that is done so it knows the MAC addresses, destination MAC
addresses. So it sends that packet to the switch. Now switch knows where AAA is so it
sends out that packet to the router. Now the router gets that information, now router as
you know works on layer 3, right. So the minute it gets that packet, it strips down layer
2, it looks at layer 3. Now it sees that layer 3 destination IP addresses is 184.108.40.206. But
it looks at both it’s interfaces and sees that OK 220.127.116.11 is not connected to himself,
then it looks at the routing table. Now we have not done routing so far so we don’t know
how routing works, but just to understand how routing works. Routing is where devices
communicate with each other, now in this case, this router, since he’s connected to the 18.104.22.168
network, he would’ve told him that if you get any packet for 22.214.171.124, please forward
it to me. Using that information, this router would’ve updated it’s routing table, right?
Don’t worry too much if you don’t understand the routing concepts because we will be dealing
in-depth in routing and routing protocols and all those things in the next video or
in the next subsequent videos. But for now just know that this router knows that 126.96.36.199
route is through this router. So, it needs to send that packet to this router. So what
it does, it updates the source information, the source MAC addresses is himself and the
destination MAC addresses is this router. Now that packet comes to this router and this
router takes that again, strips the layer 2 information, looks at the layer 3 information.
Destination IP addresses is 188.8.131.52 and this router looks at itself and it sees that 184.108.40.206
network is directly connected to it. So what it does, it updates the layer 2 information
that is the source MAC addresses is DDD and the destination MAC addresses is 444. Remember,
it has 2 MAC address, the source MAC addresses is the port through which it is sending the
data, it is not the receiving. So in this case normally that’s how you get confused.
Each of these ports have it’s own MAC addresses, the source MAC addresses would be of the port
through which it goes out, right. So in this case, this information is updated and this
packet reaches the file server, the file server strips out the layer 2 information, looks
at layer 3 information, it sees “Ah, that is addressed to me” and it receives the
data, it goes to layer 4,5,6,7, reconstructs the data and it gets back the original message.
Now this is how data transmission happens over a network. So, these are the 3 critical
devices that you need as a CCNA and I hope you understood whatever we discussed today.
Now you know the drill, if you do have any questions regarding today’s video, please
feel free to write to me at [email protected] or you could also leave comments below this
video section on YouTube and I will try to answer it as soon as possible. Thank you so
much, keep watching and happy learning, bye-bye.