Cisco Certified Network Associate - Day 2.
This is Imran Rafai, your trainer for this entire series.
Welcome back everybody for the second day in our training series, as you already know
this is a FREE training on YouTube for all the people who are interested to start a career
in networking.
In our last video we learnt about Network Fundamentals.
Today we would be dealing with the OSI Model and the TCP/IP Model.
When I say TCP/IP Models or OSI Model, it is nothing but a set of rules...
its a set of standards.
Now you might ask why we need a set of rules or set of standards in the computer industry!
To understand that we need to learn a little about the history of the computer industry.
Not long ago, there was a fierce battle between IBM and Digital Equipment Corporation (DEC)
for being the leading computer manufacturer.
But there was a problem.
Both these manufacturers manufactured devices which were not compatible with each other.
So if you bought a computer from IBM you had to buy a monitor, printer and every thing
from IBM.
Similarly if you bought a device from DEC then you had to buy all the accessories and
other devices from DEC so that you could actually use it.
There were many companies which bought equipments from both equipment manufacturers such that
the accounts department had IBM computers and devices and the marketing department had
Digital Equipment Corporation computer.
But the problem is they could not communicate with each other or they could not even share
information with each other.
Now that was not the right way forward.
That was about the time when international organization for standards or more commonly
known as ISO thought that there was a need for a standard.
ISO developed OSI which was an acronym for Open System Interconnect which is more commonly
known as OSI reference model.
At about the same time, a competing standard known as the TCP/IP model which was promoted
by the department of defence came into being.
The TCP/IP model is more like a stripped down version of the OSI Model and because it was
more relevant it went onto become the industry standard.
To understand little bit more about the models, we need to understand about layers approaches.
To understand that let us talk about this office that is on the screen.
Every office has different employees and employee levels.
So you might have a CEO, you might have a Senior office staff, you might have payroll
manager, an account manager, maintenance manager, you have maintenance staff, you have junior
office staff, and you have different staffs.
The reason every companies have different employees with different designations, is
because all those people have different roles and responsibilities.
So when you know that something is not done, or some task is not accomplished, you know
who is responsible.
For instance if salary is not credited on time, you know the responsibility has to be
with the payroll manager, whether the bank is involved or not... that is secondary, but
the payroll is your first point of contact.
You will need to go and speak to the payroll manager.
If you come to the office one fine day and you see that your office is really dirty,
it is not cleaned, you know the janitor is responsible or the maintenance department
is responsible.
So you know where the responsibility lies.
Similarly we learn about the OSI Model and the TCP/IP model because in learning about
the computer network or tomorrow when we are trouble shooting computer networks, we need
to know what works at what layer.
So if something isn't working, instead of troubleshooting all the eqipments, we know
exactly where the problem is!
That is why we have a layer approach.
Alright, knowing what we know now, lets get into the Models!
Lets understand how models work, what are the layers involved and lets compare TCP/IP
and the OSI Model.
What you see on the left is the OSI Model.
What you see on the right is the TCP/IP model.
Let me take a highlighter so that I can highlight as I talk!
Alright, for the moment, dont worry about the colors.
I have color coded it to compare between the OSI Model and the TCP/IP Model.
So lets start discussing from the left, from OSI Model.
Before we go any further, I need to stress on this point that as a student of networking,
all of you should know the layers by-heart!
So when I say that, you need to know exactly the sequences of the layers.
You need to know the layer 7 is the Application Layer, Layer 6 is Presentation Layer, Layer
5 is Sessions layer.
You need to know where the layers are!
One way of remembering the sequences of the layers is by having MNEMONICS.
One of the most popular mnemonics to remember the OSI model is the one given here.
So if you remember, "Please Do Not Throw Sausage Pizza Away", you can remember the first letter
of the layers from bottom up!
So "Please Do Not Throw Sausage Pizza Away" is PDNTSPA!
Similarly some people like to remember it from top to bottom, which is perfectly fine.
So if you want to remember it from top to bottom, then you have another MNEMONICS, which
says "All People Seem To Need Data Processing".
Well it is upto you.
You can do it the way you like it, as long as you remember that physical layer is layer
1 and application layer is layer 7.
Some people get confused when they remember it from top to bottom, that Application is
layer 1....
NO....
Application is layer 7 and Physical is layer 1!
Alright and if you wan to remember TCPIP model, then you could remember by just remembering
this MNEMONICS, which is "TCP/IP comes in a TIN".
Well it does not mean anything, but you can just remember - ATIN .... that is Application
Transport Internet and Network Interface!
Like I said, if you have a better way of remembering, please use it.... as long as you remember
the sequence of these layers, it should be perfectly fine!
Alrght, lets start with the Application layer.
Application layer is the point of contact for all Network Aware applications.
Let me repeat that, it is a point of contact for all Network Aware Applications.
A lot of authors, I have heard them say/write that all applications on your computer resides
on this application layer, which is not true.
Application layer ..... firstly deals with only application that is network aware and
secondly all the application on your computer has nothing do with the application layer,
if they do not communicate on the network!
To understand that a little bit more, let us assume that you have uninstalled all the
drivers from your PC, your wireless interface card, your ethernet interface card and all
network interface cards, you uninstall.
Uninstall the driver or physically remove if you can.
Now if you fire up microsoft word for instance, microsoft word will not communicate with the
application layer or for that matter it will not communicate with any of these layers.
That is because microsoft cannot access your network because because your Operating system
does not even have a network interface card!
Similarly, on a normal system, if you fire up your web browser, maybe chrome, internet
explorer, safari, any of the webbrowsers and if you type www.cnn.com, that web browser
creates an http request and it communicates with your application layer.
The application layer gives that data to the presentation layer.
The presentation layer does what it has to do, gives it to the sessions layer.
Sessions layer does the same thing and it gives to transport and it keeps passing it
to the next layer until it reaches the physical layer!
So this is how it works!
So if an application communicates with the networks, that is the only time the application
layer is invoked!
Some of the protocols that work at this layer are FTP, TFTP, SNMP, DNS, HTTP and there are
quite a few.
So you can just do a GOOGLE... you will get the entire list of all the protocols that
work at this layer!
Next we will deal with the presentation layer.
The presentation layer is the layer which GENERIFIES data.
When I say GENERIFIES data, it is the layer which takes the data coming out of sessions
layer on the way back, converts it into presentable form and gives it to the application layer.
So if you have raw data coming from sessions layer, to the presentation layer, this is
where data is converted.
So if it is an image, it creates an image.
If its a word document, it creates a word document.
So presentation layer is where all data conversion happens.
Also all encryption services like TLS, SSL all that are taken care of at this layer!
Next we have the sessions layer.
Sessions layer is the layer which creates and maintains session.
When I say that, lets assume your computer has two applications.
You have yout telnet program and you have your web browsing application, maybe internet
explorer!
Now both of these applications are accessing the network.
So this layer is the layer that create 2 different sessions and maintains them!
So when your web browser session is terminated, your telnet session will also not get termnated
because they are separate sessions!
So it maintains different sessions!
Now I have color coded the top three layers in blue, and the reason I have done that is
because as a network engineer, and especially as a Cisco Network Engineer, there is very
little that we need to deal with layer 5,6,7.
That is because most of the cisco devices will not look beyond layer 4.
So layer 1, 2, 3 &4 are very critical for Cisco Engineer.
But 5,6,7 are not so critical.
You just need to know how it works and you know as a rough idea, you know what it does,
that should be perfectly fine because layer 5,6,7 are taken care of by the operating system.
But layer 4,3,2,1 is where as a network engineer, you have to know exactly how they work!
Next we learn about the transport layer.
Transport layer is also one of the critical layers for a network engineer.
When the information coming from the upper layers comes to the transport layers, transport
layer breaks them into manageable segments.
Each segment, the transport layer adds its own header to create encapsulation.
Two critical decisions the transport layer takes is:1) Whether to use Reliable Communication
or Unreliable Communication.
2) Create Port Numbers.
When applications need a reliable communication, they use TCP which is nothing but an acronym
for Transmission Control Protocol.
If it wants an unreliable communication, it uses UDP, which is an acronym for User Datagram
Protocol.
When I say 'Reliable', it doesnt mean it is better than 'Unreliable' in that, the only
difference is that the reliable communication has to get an acknowledgement for every packet
that is sent!
In unreliable, there is not acknowledgement that is received for every segment transmission.
So unreliable is actually faster because of the less overhead.
So if it is realtime applications, they will use UDP, because it is faster and it is realtime.
So most of the time, if you have tried watching an online transmission or a live feed, there
are times when we see those green pixels on the screen.
This is nothing but the information for that pixel has not been received and the receiving
device has no way of telling the sending device that it did not receive that pixel.
Similarly another function that is taken care of by the transport layer is to create port
numbers.
Port number is a number that is attached with the IP Address, to identify which application
this information is coming from.
The transport layer, 1)Creates a random port source port number and attaches the port number
for the destination.
So if your traffic is going to a webserver, the webserver has a standard port number of
80!
So if you are going to an IP Address of 10.10.10.10 for instance as an example, it takes 10.10.10.10
and adds a port number for 80.
So it creates a socket....
socket is nothing but an ip address and port number.
It creates a socket and send down to the network layer.
It also adds a source port number.
Why does it require source port number?
The reason it creates a source port number is because if there are 2 applications running
on your computer and it is going to the same IP address, when the reply comes ack the transport
layer needs to know which data goes to which application.
And it will identify that by actually having our source port number.
Next we will learn about the Network Layer.
When the network layer gets a segment from the transport layer, it adds a network layer
header.
When a network layer header is added, that information is called as a Packet!
So one of the critcal functions of the Network Layer is of IP Address or also known as Logical
Addressing.
We will learn about IP addressing in the next video, DAY3.
But just know that this is where the IPAddress is added.
It also finds the best path.
So when I say best path, it compares the IPaddresses and it checks if the destination ip address
is in the local subnet.
If it is not on the local subnet, it will find the best path to the destination.
Next we have the DataLink Layer.
When the packet comes from the Network layer to the data link layer,the data link layer
will add data link header to it.
And that information is called a FRAME.
The data link layer is responsible for MAC ADDRESSING.
MAC is nothing but an acronym for Media Access Control, and MAC address is a hardware address.
That means every network interface card of your computer, has its own MAC address.
MAC Address is also known as Burn-In-Address and its a address that cannot be changed.
Yes there are ways of spoofing the address, but it cannot be changed physically.
This is a layer where Error Checking happens.
So when information coming from the physical layer to the data link layer, the data link
layer has the ability to check if there were error that were induced during transmission.
So it could use Cyclic Redundancy Check (CRC) or it could use Parity Check or any other
error checking mechanism that Data Link Layer uses to check for errors.
Next is the physical layer and physical layer is where the actually data transfer happen.
This is the layer that deals with wires, cables and hardware ports/connectors and all similar
things that happen at this layer.
As a computer engineer or as a network engineer, when somebody tells you that the internet
doesnt work, as an engineer you will start working or troubleshooting from Physical Layer.
First you will check the cables to see if it works.
If the cables are fine, next you will check for Layer 2 problem.
Then you will go to Layer 3, Layer 4.... so you will trouble shoot by layers and that
is why we have to learn about the models.
Also any change in one of the layers will not affect the adjacent layers as long as
the standard is followed.
So if a physical layer, instead of the ethernet cable I choose to use Wireless.
It should not matter because the change is happening on the physical layer only.
So datalink layer, as long as it gets the information the way it is expecting to get,
it does not matter how physical layer gets those information.
Similarly the Network Layer - We are in the midst of transition phase of going from IPv4
to IPv6, so that change is only to layer 3.
Layer 4 and Layer 2 will not be affected as long as the standard is followed and it is
receiving the data as it was receiving earlier.
So that is the beauty of the layered approach.
Now if you compare the left and the right we can see that the layer 5,6,7 is comparable
to Layer 4 in the TCP/IP model.
Transport Layer and Transport Layer in TCP/IP, they have comparable functions.
Similarly the Network Layer and the Internet Layer.
The layer 1 and layer 2 of OSI Model is comparable to Layer 1 of the TCP/IP model.
Next we will just see the OSI Model working.
Let us assume that the guy on the left wants to send some to the guy on the right.
So he creates a data.
Like we mentioned the top 3 layers are generally known as the upper layers and upper layer
we really do not deal much.
So lets assume the data goes to the transport layer.
What the transport layer does is, it takes the data, it segments it and adds its own
header.
So if you see, you have a transport header here.
Next lets assume we are dealing with UDP here, so it does not wait for acknowledgements.
It will send segment 1 to the network layer.
The network layer as we know will add a network header to the segment and it becomes a packet
now.
Network layer will give the segment 1 or the packet to the datalink layer.
The data link layer takes that and adds a Data Link header.
And if you can see the segment 2 also goes through the same process.
Next the segment 1 goes to the physical link layer and the physical link layer as we know
will convert it into 0s and 1s.
So our segment 1 got converted.
Next segment 2 also will get converted.
By that time the physical layer of the destination device would have taken those physical bits
and converted it into segment with the appropriate headers.
What the receiving layers will do is, it will strip the headers of the corresponding layers
from the source.
So the data link layer will strip the datalink header and give that information to the network
layer.
So if you see there was a datalink header to segment 1 which the data link layer stripped,
and gave that information to network layer.
Similarly it will happen to Segment 2 as well.
So for segment 1 when it goes to transport layer, this network header will get removed.
So if you see there, the network header got removed and it reached the transport layer.
Next the transport layer will wait until it gets all the segment.
That is what the transport layer will do.
So transport layer waits until segment 2 comes there.
Now transport layer will strip all the transport layer headers and combine that information
and give it to the upper layers.
So the transport layer combines it and the receiving guy receives the same data.
And this is how a very basic representation of how a data network works.
I think thats about all the information that we had to learn in this day 2 video.
Please go through this entire cloud map and I am sure you understand all the topics here.
But if you do not, please feel free to write into me at 'imran.rafai@nwking.org'.
Please dont forget to share our videos, like our videos, and please subscribe to our YouTube
channel.
You love and your respect is what motivates us to create free contents.
Thank you so much.