--- Onehack.us e-Learning Platform ---
Instructor: Hello and welcome
to the computer networking session.
This is going to be the fundamentals of networking.
Very, very basic things we are going to cover
in this and it's very important to cover this topic
before I start cloud computing or Docker or Kubernetes.
So being a DevOps, you will be also
in charge of managing cloud computing environments,
connecting multiple systems together
and these things I'm saying because you will be
in charge in automating these things and as our golden rule,
you should know how to do things manually
so you can automate them.
So let's see what we are going to cover
in this networking session.
So we'll talk about the networking components first,
what the components responsible for networking.
We'll be talking about OSI model
and understand all the layers of OSI model.
We'll talk about then classification
of network based on the geography.
We'll talk about networking devices.
We'll understand our home network.
Then we'll talk about IP addresses, what are IP addresses
and how to understand different IP addresses range.
Protocols.
We'll understand how DNS or DSCP and DSCP servers work
and we will be also seeing some networking commands.
So this session is 90% theory
and we have some commands at the end
of the session which will be very helpful
for you when you're doing some troubleshooting
in the networking,
when you're connecting multiple systems together.
So what is a computer network?
In today's time you see billions
and billions of devices connected together on the internet.
It's not just about now the computer.
You have smartphone
and internet enabled devices or network enabled devices.
So what really is a computer network?
Well, as I see, it's a communication between
two or more network interfaces.
Yes, every device you're using
on the network will have an IP address assigned
to its network interface.
Like your laptop has ethernet adapter or wireless adapter.
Your smartphone has a wireless adapter
or a network interface we can call it.
Network enabled devices
as used in IoT will have network interfaces.
Because of these network interfaces which are
on our devices, we are able to create a communication
or should I say communication network where
these devices can exchange data.
So in short, computer network is communication
between two or more network interfaces.
Let's see the components that are used to
create a computer network.
You need two or more computer or devices, your smartphone
or any IOT device, you need cable or cables to
link these computer or devices or the wireless network.
So this cable or the wireless network will be connected
to the network interface or NIC card on each device.
And of course the device itself that knows what to do
with the data.
With the data that it is receiving over the network.
Switches to connect multiple network interfaces together.
Routers to connect multiple network together or software
or simply to begin with operating system running
on the device that can analyze the data that it received
on the network and present it to the user.
So these are the components generally used to
create a network or computer network
but how do they really communicate?
We see millions and billions
of devices and softwares and apps.
How is that you go to the market, you get a smartphone,
you use an app, take your picture, upload it.
There's some random phone, you have used some random app
and you are accessing some random website.
Everyone understands every operating system,
every network interface, network devices and websites
and apps understand how to communicate the same way
as all the other devices does.
So how is that possible?
What I'm saying is think
about we have so many languages on our planet earth
and if every country speaks only their language
they will not be able to communicate with each other.
Exchange ideas, share resources.
There should be a common platform where everyone
can communicate with each other.
Likewise, in the network or computers or devices
follow some set of standards.
So the hardware vendor or the app developer or
the website developer knows what standards to be followed.
So it can be communicated across the world.
OSI model has given that standard because your billions
of people around the world using computer network
and wants to communicate with each other.
So for the worldwide data communication, there should be
some standards and systems which are compatible
across all the devices, apps, operating systems.
There should be standard of communication methods
and devices also, you know,
you take a wifi router from Cisco
or Juniper or Delink or anywhere.
They provide you similar kind of communication.
That's because of the standards that they're following.
So ISO, international Organization of Standardization have
has developed this standard and which everyone
has to follow.
So the communication model that they developed, or think
of this like a a language that everybody
on the earth speaks.
I'm saying earth as if I'm an alien, but I want to
get through, present this important point to you
a common language that can be spoken by everyone.
Like that, ISO has developed OSI,
open system interconnection.
So OSI has developed, sorry, ISO has developed OSI.
Okay, sounds similar, right?
So OSI is the model of communication,
the standard developed by ISO.
And together it's called a simply ISO-OSI model
which is a seven layer architecture.
It was developed in 1984.
So you have these seven layers.
If you are from a computer field
you'd have already seen this in your school or college.
I remember we used to buy hard this.
So you have total seven layer
in this first layer is physical
then you have data link layer, second layer,
third layer is network layer,
fourth layer is transport layer, fifth layer is session,
sixth layer is presentation, seventh layer is application.
So to tell you in shot an application layer you have
think of your browsers or your apps, okay?
At that level, physical level layer like cables,
the data traveling through the cable, the analog signals
and there's so many things that happens in the middle.
Let's talk about it.
So the basic elements of the layered model
of all the seven layered model is one services,
second protocols, and third interfaces.
Service is the set of action that you know
one layer provides to the other layer.
Like layer one is providing something to layer two
that's a service that it is offering.
That's service, protocol is the rule.
So the offering of the service or the data
which is traveling from different devices
to your apps to your operating system,
follows some set of rules that is called protocol.
So standard protocols are defined in this OSI layer
which we are going to talk about.
An interface means communication between layers.
So one layer can offer service to the other layer.
We'll see how that works.
You know, let's talk
about like the sending and receiving letters instead
of sending and receiving some data
on the net or internet or computer network.
So you have a sender and you have a receiver, okay?
And sending a letter really who sends letter nowadays
except, you know, banks and government offices.
But yeah, let's take that example.
So you have a sender who wants to send a letter
and there is a receiver will be receiving the letter.
So first the letter is written and the you've put
into an envelope and drop it into the mailbox.
This is at the higher level this is happening where
sender understands what he or she's doing, okay
knows how to write the letter, knows how to pack it
into envelope and knows how to drop it into the mailbox.
Now after this, the middle layer
the letter is carried from the mailbox to the post office.
The sender does not understand this concept
maybe understand, but there is no part in it.
That's the middle layer.
So the lowest layer is the letter is delivered
to the receiver, okay?
By post office,
all those things that happens in the post office.
It's at the very lower layer really
we don't even think about how that happens.
And then towards the receiver,
the letter is delivered to the receiver's post office.
From there, the letter is carried and put
into the mailbox and the receiver is going to pick
up that letter, removes the envelope and reads it.
Really the center and receiver is worried
about just, you know, the center is worried
about writing the letter and dropping it.
Receiver is just worried about, you know, reading it.
That's all.
Those are the higher layers.
So there's so many services that are provided
in the middle layers and lower layer.
Wow, that's a tongue twister.
Similarly, if you're doing communication
maybe sending an email or a photograph or a video,
you're uploading some picture
on let's say Instagram or Facebook, right?
So you may be having a smartphone or a computer.
You are the sender and the server that is going to post it
on your Instagram is the receiver.
Or you can think, take an example of mail also sending mail.
So at the very higher level layer, you have your apps,
your softwares, your operating system, okay,
where you write the letter or you write the mail, right?
And then you click on the send button
and then all this layer, layer 6, 5, 4, 3, 2, 1
and then 1, 2, 3, 4, 5, 6 will do all its work
and the mail is received.
We understand all this layers one by one
but I just wanted to show you a high level view for now.
Okay? Now let's understand all these layers one by one.
First the physical layer, it's the lowest layer
in our OSI reference model.
And it is responsible
for the actual physical connection between the devices
like a cable between computer A to computer B.
Think of like that.
And here the information is in bits, ones and zeros.
So when it receives the signal
it is going to convert it into bits, ones, and zeros.
And it is going to send this to the data link layer.
The second layer.
The main function of the data link layer is to
make sure transfer is error free from one node
to another or the physical layer of course.
At this layer, the data is in frame, a physical layer,
the data is in bits, ones and zero.
At the data link layer, the data is in frame.
And here the devices are like Mac, Mac address.
The physical addressing works over here
network interface card will have a physical address
which we call it as Mac address.
Then the data is presented to the network layer.
Network layer works for the transmission
of data from one node to other, which are located
in different networks and it works on the IP address.
So when the data is presented to the network layer
it is assembled in packets and the senders
and receivers IP address are placed
in the header by the network layer.
The header of the packet, so bits, frames, then packets
then comes the transport layer.
So it takes the service
from the network layer and it really provides the service
to the application layer.
Here, the end-to-end connection
and the reliability is checked.
It is responsible
for the end-to-end delivery of the complete message.
It also provides the acknowledgement
and if there is any failure
or drop of data, it'll retransmit the data.
Then it's the session layer.
In TCP IP model, the application presentation
and session layer are presented as one layer.
They are responsible in the security,
maintenance of the connection, encryption, decryption
and then presenting the data to your apps
or to your softwares like browsers or mobile apps.
So if you are sending an email
the application layer is going to produce the data
which would be then transmitted,
transferred over the network.
And if it's receiving
then it is going to assemble all the data together
and present it to the application.
Let's understand a few more things about this OSI model.
We'll be talking about the protocols later
but what I want to show you here is are the devices.
So at layer one you have devices like hub, layer two,
you have devices like switches or you can call
like a switch is a layer two device router or firewall
or a layer three switch is at the third layer.
The network layer here
the IP address, like router forwards
the data based on the IP addresses, switch,
layer two device that is based on Mac addresses.
Layer four you have gateways
and layer 5, 6, 7, you have devices
or apps like web server, mail server, browser, your client.
So what you really need to understand
from all these OSI layers, one,
name and purpose of every layer
and the devices associated or used at that layer.
And also protocol
that we are going to talk later in the slides.
Let's summarize all these layers.
Physical layer, transmit bits over a medium to
provide mechanical and electrical specification like cables
that we lay around to connect multiple devices
or even the wireless communication.
Data link layer is going to organize bits into frame.
Physical layer is going to give the data into bits.
Data link layer is going to assemble it into frames.
Network layer, we have packets.
The packets travels from the source to the destination
and that's what provides the internet working.
Devices like routers
transport layer provides reliable process to
process message delivery and also error recovery.
If something fails, it'll also retransmit the data.
Session layer is to establish, manage
and terminate sessions.
Presentation layer to translate, encrypt, and compress data.
Application layer allows your apps
or your softwares to access the network resource.
So understanding functionalities of all these layers
and what device fits, what device or apps fits
at what layer is all you need to know for now.