Nothing Special   »   [go: up one dir, main page]

OSI Model

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

Contents

Introduction..................................................................................................................................................................... 1
Layers.................................................................................................................................................................................. 4
Split Concentration...................................................................................................................................................... 8
Layer 7: Application Layer........................................................................................................................................ 9
Layer 6: Presentation Layer................................................................................................................................... 10
Layer 5: Session Layer.............................................................................................................................................. 11
Top layers versus lower layers and Transport Layer................................................................................ 12
Network Layer & Data Link Layer...................................................................................................................... 14
Layer 1: Physical Layer............................................................................................................................................. 17
Host Communication............................................................................................................................................... 19
Encapsulation............................................................................................................................................................... 20
TCP/IP versus OSI model........................................................................................................................................ 21

Introduction

In this video we're going to look at the OSI model, with an emphasis on how devices
communicate. The open systems interconnection model or OSI model is a critical building
block for your understanding of networking.
 You'll often hear network engineers discuss issues but saying that there is a problem
at layer.
 we have a network fault at layer 3 or
 this is a layer 4 issue or
 we have a layer 7 issue.
To understand what that means. You need to have a good understanding of the model. The
model is important for troubleshooting and understanding networks and network
protocols.
We gonna firstly look at the reasons for using the OSI model.
 What advantages are there to using this model in networking today.
 We'll then look at the layers of the OSI and model. And that's where these terms
Layer 4 or 5 or 7 come into play.
 I'm going to show you how traffic flows between hosts with specific reference to the
OSI model.
 And lastly I'm going to show you how the OSI model is used in the real world, by
sniffing traffic using a free application called wireshark, wireshark is a sniffing
application that allows you to see traffic on the network.
In this example I'm going to open a web browser to a server on the Internet and we'll
capture the traffic and see what it looks like.

->The OSI model is often used to explain communication between devices in a network. It
makes it easier for network engineers to discuss specific issues with devices such as routers
or switches.
when host A sends traffic to host B.
 How does that communication actually take place and at which layer of the OSI
model do devices such as switches or routers operate.
There are multiple advantages to using the OSI model. And let's look at a few of those and
then I'll explain the layers in a lot more detail.
Now in the past they were older models that were proprietary and would typically control
by a single vendor. This caused multiple issues especially in networking where we have
many different devices that need to communicate with each other. Issues resulting from a
proprietary model included slow development and no interoperability between vendors.
For many years, there's been a major drive to standardize protocols, enhance
interoperability and use open standards.
 The OSI model was developed by the International Organization for Standardization
or the ISO,
 and it provides a layered approach to development and interoperability.
 It allows for multi-vendor interoperability and rapid development. Thus, for example
a web browser like chrome from Google can run on an HP computer or Dell laptop
and connect to a Cisco network, traverse the Internet and connect to a web server
running Apache on top of Linux.

 So, your web browser is running Perhaps in windows or it could be a Safari


browser running on a MacBook connecting across a Cisco network in your
corporate environment, traversing multiple devices on the Internet and
communicating with an Apache server running on Linux
 That kind of interoperability and communication has made a lot simpler because of
the OSI model.
We have seamless interoperability where traffic is same between multiple vendors and
multiple applications.
Layers

Now the OSI model consists of 7 layers with the advantage that each layer is independent
of other layers. The layers of the OSI model starting from the top or Layer 7 are:-
 Application
 Presentation
 Session
 Transport
 Network
 Data link and
 Physical
The physical layer is Layer 1. When discussing the OSI model, we typically explain and
reference it from the bottom up. So, we started layer 1 2 3 4 5 6 and end up at 7.
There are many different ways to remember the different layers of the OSI model. So, for
example All People Sleeping Through Networking Don't Pass. So, you're not going to push
your exam if you sleep through networking presentations. All people sleeping through
networking don't pass.
There are many other examples and you'll probably encounter some really funny ones and
some which I can't repeat here.
Now I'm going to go through each of these layers and a lot of detail in the upcoming
videos. Please bear with me because I know this can get a bit tedious and a bit boring but
it's important that you work through these videos to make sure that you have an
understanding of the OSI model and the different layers.
It's really important to know this and it's going to help you immensely as a network
engineer if you have a good understanding of the OSI model and you'll find this will help
you a lot when troubleshooting networks.
There are multiple advantages to the same model as mentioned including interoperability
and standards. Another big advantage of the OSI model is split development, or split areas
of concern.
An application developer as an example, writing an application like Microsoft Word, doesn't
need to understand the details of IP routing.
 So, if you were writing an application and you were for instance writing in Python or
another high-level programming language. You don't have to understand OSPF, BGP
or spanning tree or any one of the many other protocols used at lower layers of the
OSI model, because the different layers are separated from each other.
 A developer working at layer 7 doesn't need to know what's happening at layer 2 or
layer 3.

 Another example would be a Web Developer writing a Web Application in PHP or


some other high-level language, that developer doesn't need to understand the
details of copper or fiber cabling which resides at Layer1 in the OSI Model

The layers are separated and are independent of one another, so the areas of concern and
responsibility are split which makes things a lot less complex
When saving a file in Microsoft Word as an example, to the local hard drive or to a remote
network share,
 the developer doesn't need to understand the final details of ASCII or Storage Area
Network SANs or some other low level or some other low-level Disk Management
Software
 The Developer doesn't need to be concerned about whether a local hard drive is
used, which could be IDE or ASCII on the local machine, or a remote network drive
using some type of attached storage
 From the view point of the Developer, his applications is only talking to the layer
directly below the layer his working at
So, the operating system for example, such as Microsoft Windows or MAC OS will hide or
abstract the developer from the lower layers. Thus, making development a lot easier

->Now as I've mentioned, from a troubleshooting point of view, the OSI Model is gonna
make your life a lot easier, especially when discussing Network issues with other Engineers.
We'll be able to determine as an example, if a problem is a Layer1 problem, so a cable is
unplugged or it's a Layer3 issue Let's say OSPF is not advertising routes or if it's a Layer 7
issue, your FTP service may have stopped or there may be a bug in the application
Once you go through each of the layers, you'll hopefully have a good understanding of
each of those layers, what they do and hopefully it will help you with troubleshooting. The
OSI Model has also helped accelerate development of new applications and technologies.

In the last few years, there's been massive development in technologies that rely on
networks. Think of the fact that not many years ago sites such as Twitter, Facebook, LinkedIn
and other social media sites didn't exist.
Today developers for example, working on Facebook, don't need to understand, what an ISP
or Internet Service Provider is doing in the UK.
All they concentrate on is the development of their website and the ISP will route traffic to
those websites using protocols such as BGP or OSPF. So, it's not necessary for an
application developer to understand the details of networking,
By the same token a Network Engineer troubleshooting a network doesn't have to
understand how Facebook works. In other words, he doesn't need to understand the details
of PHP programming or Apache services
Network Engineers can concentrate on Network protocols rather than Programming
Languages, now that may change, and it probably will do with technologies such as
Software Defined Networking or SDN. And additionally, you may be the only person who
does all the network and service support in your organization. So, you have to understand
all the layers,
but that being said it still helps simplify teaching and learning as well as troubleshooting in
the real world. Please ensure that you have a good understanding of the OSI Model because
it will give you a much better understanding of networking, that's what this video I hope will
gonna give you

We as Network Engineers will use names and numbers interchangeably. So, we'll often talk
about Layer2 or Data Link Layer or Layer3 or the Network Layer, so remember your numbers
and your layers. Layer1 is Physical, 2 is Data Link, 3 is Network, 4 is Transport 5 is Session, 6
is Presentation and 7 is Application'
Remember both the name and the number
Split Concentration

Now in the past, there used to be a major split of concentration in the OSI Model. The top 3
layers where the focus of developers and server administrators. The lower 4 layers where the
domain of the Networking Engineer
These days because of the growth of technologies such as VMWare This divide is blurring
away. This divide is often not there, and these roles are blurred. Often today Network
Engineers need to troubleshoot servers and Server's Administrators need to troubleshoot
virtual switches within a VMware server,
but traditionally Developers focused on the development of applications such as Firefox or
Chrome which resides at the Application Layer.
 Developers will need to understand how to present data in specific formats, Server
Administrators would have to understand Operating Systems and how they manage
sessions and interact with applications and thus, they intended to concentrate their
effort on the top 3 layers
 Network Engineers concentrate in most cases on the lower 4 layers of the OSI Model
and hence that is the focus of this course. We're going to concentrate mainly on the
Transport, Network, Data Link and Physical Layers, in other words, Layers 1, 2, 3, and
4
It's a well-known joke in Networking circles that Developers will blame the Network when
applications are running slow. In some cases, Developers don't need to understand
Networking and that's perhaps a by-product of the OSI Model, they don't to understand
Networking because of the Split Roles and the Split Layers,
 Developers may blame the Network for performance of the applications where as in
actual fact the reason could be something else, such as the server being overloaded,
or a memory leak because of bad code in their development.
 But in brief, Network Engineers concentrate on the lower layers, Servers
Administrators tend to concentrate on the upper layers even though those lines are
now blurring
So, I'm gonna start off with the brief overview of Layer7, 6 and 5 and then we'll look at the
Transport, Network, Data Link and Physical layers in a lot more detail
Layer 7: Application Layer

So, starting at the top of the OSI model we have a 7 or the application layer.
So, we'll started Layer 7 and then work down through the various layers towards layer 1, the
physical.
 Layer 7 is once again the application layer and this layer provides and network
processes to applications. It provides access for users and application processes to
utilize it network services.
 This is a layer that a lot of people are familiar with, applications such as FTP, telnet
and HTTP are used at this layer.
 Please note that when we talk about the application layer we are not talking about
individual applications such as Firefox Chrome or Safari. We are discussing the
application protocol. In other words, HTTP which those web browsers use.

 As another example when discussing telnet, we are not talking about telnet
applications such as putty or Tera term or other Telnet applications. we are
talking about the protocol telnet.
 The same applies to other applications, applications such as Firefox Chrome or
Safari can function correctly because the applications are written to work with the
HTTP protocol. So, we refer to the application being HTTP rather than being
Firefox.
 This layer provides the network services to the application such as Firefox or chrome
or whichever web browser you are using. This layer can identify communication
partners, determine resource availability and provide user authentication.
Another example would be Microsoft Outlook, Microsoft Outlook is an application that
works with protocols such as IMAP, POP3 and SMTP. Don't worry about the details of the
individual protocols, such as SMTP or HTTP or FTP.
 What you need to take note of here is that the various applications that you use such
as putty or Firefox or Chrome use protocols to communicate with the lower layers of
the model.

 A few other examples would include remote file access, remote printer access,
resource sharing, directory services and there are many other examples.
So, once again the application layer is the window for users and application processes to
access network resources and services.

Layer 6: Presentation Layer

Layer 6 is the presentation layer and this layer is concerned with the actual format that data
is presented in. In other words, we are looking at data representation or syntax. The
presentation layer shows that data that is sent by one application can be successfully read
by another application.
 So, we need to ensure that the receiving system can understand the data that it's
receiving. In other words that the data is readable.
 It is important to understand that different systems have different ways of formatting
their data. Linux, Mac and Windows may format their data entirely differently. So, to
ensure that the receiving system can receive and understand the data that it's
receiving, the data needs to be changed to machine independent format. There are
some well-known examples here including JPEG, MPEG, ASCII, MP 3 and so forth and
so on.
 If you've ever tried to open a JPEG file in notepad or the incorrect application,
you'll see what happens when the format is not understood.
 If you open up but JPEG picture file in Notepad, you'll get a screen full of
unrecognized characters which aren't of any use.
 So, this layer formats the data to be presented to the application layer. It structures
the data, it negotiates data transfer syntax. For example, using ASCII or Unicode for
the transmission of data between two systems.
 it can also provide encryption. So, when you're sending for example a music file from
a Linux machine to a Windows machine, this layer ensures that the data is
transmitted in the format that both sides understand.
 So as an example, when using an MP 3 you could connect to a Web site running
an Apache server on Linux from your windows machine or from a mobile device
such as an iPhone.
 You can listen to music view pictures watch videos and so forth because the data
is presented in a format that both sides understand.

Layer 5: Session Layer


The session layer is concerned with into host communication. So, this layer is involved in the
establishment, maintenance and termination of sessions between applications. This allows
two application processes on different machines to establish a session between them. This
acts as a coordinator of communication between the systems.
 Examples of protocols that exist at this layer include remote procedure calls (RPCs),
network file system or NFS and Apple's zone information protocol or (ZIP)
 This allows two application processes on different machines to establish, use and
terminate a connection and that is called a session. These perform functions that
allow those processes to communicate to the network performing actions, providing
security, name recognition logging and so forth.
 A well-known example from the Microsoft world is NetBIOS or network basic
input output system and lastly, point to point tunneling protocol or (PPTP).
So, various protocols at this layer ensure that requests and responses between applications
can work properly over a session between those end user application processes.
So, those were the top three layers of the oocyte model.
Top layers versus lower layers and Transport Layer

 Once again we have application layer presentation layer and session layer. These
were the primary focus of developers or system administrators or server
administrators.
 Now let’s concentrate on transport layer, network layer, datalink layer and physical
layer which are the realm or responsibility typically of a network engineer.

Layer 4 or the transport layer ensures end to end communication, reliability and flow
control. This layer performs message segmentation where it accepts a message from the
higher layers in the OSI model.
 In other words, from the session layer above, it splits the message into smaller units.
If they are not small enough already and then passes the smaller units down to the
network layer for sending.
The transport layer at the receiver will reassemble the message at this layer. This layer also
handles transportation issues between hosts and ensures data transport reliability.
The two main protocols at this layer are TCP or Transmission Control Protocol and UDP or
use a datagram protocol.
TCP provides reliability.
 It establishes, maintains and terminates of virtual circuits between devices. So, to end
systems will go through what's called the TCP three-way handshake to establish a
connection between each other.
 Packets are sequenced and if packets go missing those packets will be retransmitted.
Please refer to the TCP and UDP video for much more detail on the processes used
by TCAP and UDP.
UDP on the other hand, does not provide reliability.
 If packets are dropped, they are lost and Higher layer protocols at the application
layer would need to ensure reliability.
 So, UDP doesn't retransmit the lost packets, TCP would however.
 Flow control might also be implemented at the transport layer. Flow Control will
manage a data transmission between devices to ensure that the transmitting device
does not send more data than the receiving device can process.
 As an example, you could have an iPhone receiving traffic from a powerful server.
The server has much more CPU processing power and perhaps a very high-speed
interface.
 The server could send so much traffic that the iPhone is overwhelmed. So, the
receiving device in this example, the iPhone, can tell the transmitting device. In
other words, the server, to back off or slowed down when no message buffers are
available.
 Session multiplexing also takes place at this layer. This allows for the multiplexing of
several message streams or sessions into one logical link and this layer will keep
track of which message belongs to which session.
 UDP on the other hand does not give us that kind of reliability. UDP is normally used
for applications such as voice over IP or VoIP, which does not require retransmission
of packets.
 In some cases, such as with VoIP or voice over IP, retransmitting packets would
be irrelevant and thus applications would use UDP when retransmission is not
required.
 UDP is also more lightweight and has less overhead than TCP. UDP does not use
sequencing or provide other reliability mechanisms that you get in TCP.

One of the well-known analogies to differentiate between TCP and UDP is, to think of TCP
as a telephone call.
When I phone you,
 I get an acknowledgement from you that it's you are speaking because you would
typically say hello it's David speaking. So, you're going to at least say hello and then
probably mention your name.
 If I give you a piece of information over the telephone such as a string of numbers,
you may repeat that back to me to ensure that you got the information correctly.
 So as an example, if I told me that someone's telephone number is 555-1212.
 you would repeat that back to me, you would say the number is 555-1212, and
that ensures that both of us know that you got the information correctly.

That's a very similar mechanism to TCP where all information that is transmitted is
acknowledged. So, there is an acknowledgement of receipt of information. If the
information is not received properly it's retransmitted.
The analogy for UDP is that it's like a postal service. if i want to give you someone's
telephone number, i write it on a piece of paper put it in an envelope and then I mail it to
you. But in this case there's no guarantee that the piece of mail will actually reach you, And
in the same way there's no reliability in UDP.

Network Layer & Data Link Layer


The network layer or Layer 3 is very important to us as a network engineers as this is where
routers reside. This layer is all about data delivery where routers routing data packets from
one device to another. Cisco and other vendors also have what is called Layer 3 switches.

 layer 3 switches have a router capabilities so that they can also route packets
between VLANs within a network as an example. Routers or layer 3 devices choose
or select the best path to deliver data based on the information provided by routing
protocols such as OSPF or Open Shortest Path, BGP or Border Gateway Protocol or
ISIS or intermediate system to intermediate system. Those are three examples of
routing protocols you may encounter. They use the logical addressing scheme of IP
version 4 to determine the best path.
 So, in an IP version 4 network we have addresses such as 192.168.1.1 with a network
mask of 255.255.255.0. The network mask informs devices that, in this example, the
first three octets on network and that’s what writing decisions are made on. Please
refer to the IP addressing videos for more detail about network and host portions of
an IP address.
 So, routers or layer 3 switches will determine the best path to route traffic based on
criteria such as
the cost or number of hops or bandwidth or longest match of a network address.
So various criteria can be used to determine the best route.
So as an example I was P.F. determines the best path based on bandwidth.
RP Well writing information protocol which is an older routing protocol used Hopp count to
determine
the best path.
But what's important to know is that routing decisions are based on the logical addressing
format in
IP version 4 or IP version 6.
There's no reliability at the network layer.
IP is not concerned with reliability and relies on the higher layer protocols such as TZP to
provide
reliability or if UDP is used the application layer needs to provide the reliability if it's
required.
So as an example when using TFT P DFT P uses UDP at least for an IP it layers 3 but the TFT
P application
provides the reliability because there's no reliability in UDP or in IP.
So IP does not provide any reliability will retransmission of packets the network layer or
Layer 3 provides
path determination and logical addressing layer 2 or the data link layer provides physical
addressing
and access to media it is concerned with how data is formatted from upper layers for
transmission over
a given network technology.
It is also concerned with how access to the network is controlled.
An example is Ethernet which uses a Mac address or Media Access Control address a MAC
address is used
as the identifier of a device.
So on a network interface card or Nic a MAC address is Boente in by the manufacturer.
MAC addresses of 48 bits in length and they broken up into two parts.
We have what is called the organization unit identifier or you will die and then a unique
portion for
the specific network card MAC addresses should be unique.
So the combination of vendor by hand a unique value should make the MAC address on a
nic unique.
We'll spend some time later looking at this but as an example on my PC I can use the
command IP config
for special to view the MAC address of my network interface card.
So notice on my Ethernet adapter Local Area Connection I can see the physical address
written in hexadecimal
as follows.
This portion identifies the vendor UI organizational unit identifier.
And this is a unique value assigned to the network interface card by the manufacturer.
MAC addresses use a flat addressing scheme unlike IP MAC addresses only consist of a
vendor code and
a unique value.
When installing network cards you don't need to ensure that network cards of a specific
manufacturer
are in a single subnet or a specific subnet.
MAC addresses are part of a flat address structure unlike IP version 4 IP version 6 addresses
which
have a logical addressing scheme typically assigned by a network engineer and addresses
are grouped
into subnets and configured appropriately.
You would ensure in IP version for dresses as an example that device is configured in the
same subnet
or in a specific portion of your network.
You wouldn't put devices in the same subnet and then spread them across your apology.
However with MAC addresses you could have HP or Dell laptops spread throughout your
network.
You don't have to ensure that MAC addresses are sequential or that they are in a specific
order.
This layer also provides error detection and in certain cases can correct errors that occur at
the physical
layer when using Ethernet as an example.
The data sent on to the network has to be formatted according to the rules of Ethernet.
However that data make traverse many links and at another point in the network it may
traverse or when
link that using Point to Point protocol or PDP.
So the data link layer ensures that the data from higher layers is formatted correctly for
transmission
across individual physical links where the physical link characteristics may vary.
One link may be Ethernet another link may use Peepy across a serial cable and other link
may be using
DSL.

Layer 1: Physical Layer

The first layer in the OSI Model or Layer1 is the Physical Layer
It defines how data is transmitted, so in other words, what states represents
binary 1s or binary 0s. So media signal and binary transmission are defined
at this layer. The Physical Layer defines the electrical, mechanical
procedural and functional specifications for the physical link or the Physical Layer
this allows for interoperability, to put that into plain English here's an example
RJ45 connectors are used in Ethernet and you would plug an RJ45 connector
into the Network Interface Card of a PC, the standards associated with an RJ45
interface are different to other interfaces such as a V35 connection which is used
in some WAN implementations. So the physical characteristics of this interfaces
and the specifications for activating the connections are different
On Ethernet as an example at Layer2 Ether2 might be used but PPP or HDLC
maybe used at Layer2 on a WAN interface. The physical characteristics here
are very different, so things such as the pins, the voltage
the cable specifications, and the devices that are supported may vary
Copper as an example has different physical characteristics and specifications
when compared to fiber. Fiber transmits light, copper transmits electrical signals
The physical infrastructure is very different and that's need to be standardized
As an example, a Network Engineer needs to know that it can connect an RJ45
cable to a Dell laptop or an HP laptop or a Cisco switch
Devices provided by different vendors. Specifications are standardized so
that Network Engineers could go out and purchase a Cat5 cable or Cat6 cable
with an RJ 45 connector from a local network supplier and plugged it into anyone
of those devices without worrying about compatibility
The physical specifications are laid out at Layer1 of the OSI Model
and thus we have interoperability between different devices from
different vendors because those vendors adhere to the standards at the
Physical Layer or Layer1 of the OSI Model
Once again a Software Developer working at Layer 7 of the OSI Model
doesn't need to be concerned with the physical characteristics of Ethernet
or ATM or DSL or RJ45 cables or V35 cables or fiber optics and so forth and so on
The Developer adheres to the specifications at Layer7 and Network vendors
providing networking equipment or PC manufacturers providing PCs adhere to the
standards at Layer1 to ensure interoperability between networking devices
The Physical Layer is often the easiest layer to identify because it's focused
on physical devices with physical cabling, there are many functions performed
by this layer and they will vary depending on the physical media
So as an example Layer1 specifications include cable specifications
like maximum cable length, electrical specifications, radio specifications
including signal strength, modulation techniques, line coding, bit synchronization
and many other options. You'll have to refer to the physical specifications
of an individual media type such as Ethernet to see the details and
specifications for that individual media type; Fiber is different to copper,
which is different to wireless, which is different to DSL
We're not gonna concentrate on those here if you're planning on becoming
a manufacturer you would have to adhere to the manufacturing requirements
for cabling and interfaces to ensure that you can form to the
specifications so that interoperability and standardization is ensured

Host Communication

In this video, we're going to continue the discussion of the OSI Model
by looking at traffic flows between hosts. I want to show you a practical demonstration
of the OSI Model by using Wireshark to capture traffic between devices
Now when communication takes place between 2 hosts so in this example we have
HostA talking to HostB, the information that's going to be transmitted across the
network must undergo a process of conversion at both the transmitting device
as well as the receiving device, this is commonly known as encapsulation
and de-encapsulation and I'm going to cover this in more detail in the next
few minutes. At the end of this video you should be comfortable with the
fact that each layer of the OSI Model only talks to the corresponding layer
of the communication partner, in other words, Layer7 communicates with Layer7
Layer1 communicates with Layer1 and so forth and so on
So let's look at that in more detail
So when the sender wants to transmit data, let's say in this example
your PC is opening up a Web connection to Cisco.com and the PC is sending
some information, that information has to go through the OSI Model from Layer7
all the way down to Layer1, to then be transmitted across the physical media
So in this example user data is transmitted, so at Layer7 of the OSI Model
the data is encapsulated with the Layer7 header, that in turn is encapsulated
with the Layer6 header at the Presentation Layer and that in turn is encapsulated
with the Layer5 header at the Session Layer, which in turn is encapsulated
with the Layer4 header at the Transport Layer and this continues all the way
down, at Layer3 the data is encapsulated with the Network Layer header, at Layer2
the data is encapsulated with the Data Link Layer header and in this case a
frame check sequence is added to the data.The frame check sequence ensures
that the data is not corrupted when sent from the sender to the receiver
Lastly, the data is transmitted across the wire or physical media as bits
in other words, 0s and 1s and that data is then sent from the sender to the receiver
What I'd like you to notice here is that each layer of the OSI Model prepens a new
header on the data, so data is encapsulated with the Layer7 header, Layer6 header
and so forth and so on through all the layers of the OSI Model
and is then transmitted across the wire. In a moment I'll demonstrate this
by using Wireshark which is a great sniffing application and Wireshark allows us
to view data in real time but please note that the sender is transmitting the data
the data is encapsulated at each layer of the OSI Model and is then transmitted
to the receiver. So A is sending the data to B, this is a very simple network
where I've got 2 PCs connected back to back with say a cross-over cable
but in the real world, the network between this devices could be really
complicated, device A may be in England and device B may be in the USA and
there's going to be multiple devices and multiple media types between the 2 PCs
when data is transmitted from A to B. But for now let's keep it simple
the data is transmitted across a single cable from A to B

Encapsulation
At the receiving end the receiver reverses the process
so the bits are received at the Physical Layer by the Network Interface Card or NIC
The Layer2 header is red, it is then striped and the data is passed to Layer3
The Layer3 header is red and that's striped and the data is passed to Layer4
and this process continues until all the headers have been removed
So this is the process of de-encapsulation, where the headers are striped
and the data is passed up through the OSI Model until only the original data
remains without any headers. This data will then be processed by an application
on that PC or in this example the Web server, so the Web server will process the
HTTP get message sent by the browser on the client as an example
So in summary, please note that on the sender the data is transmitted down
through the OSI Model and encapsulated at each Layer and then physically
transmitted across the wire. At the receiver, the data is de-encapsulated at
each layer of the OSI Model until we have the original
data which is then used by the application
So what's important to note is that because of encapsulation and de-encapsulation
each layer of the OSI Model only communicates with the equivalent layer on the
other device. So in this example PC A's Application Layer communicates with PC B's
Application Layer, this is true for all the other layers
The Presentation Layer communicates with the Presentation Layer, Session with Session
Transport with Transport and so forth and so on
Each layer only communicates with the equivalent layer on the other device
At the Physical Layer, the data is transmitted as bits, so as an example if we use
Ethernet electrical current may be used to transmit 0s and 1s
Now specific terms are used in networking to refer to each layer
So at the Physical Layer, the data is transmitted as bits
At the Data Link Layer, it's known as frames
At the Network Layer, it's known as packets
And at the Transport Layer, it's known as segments
So in other words PC A transmits packets to PC B at the Network Layer
At the Data Link Layer for example, frames are transmitted and so forth and so on
It's important that you understand these terms because in Networking and in this course
We'll talk about how packets are routed by routers or how frames are transmitted
through switches and that's because routers resides
at Layer3 of the OSI Model and switches resides at Layer2

TCP/IP versus OSI model

These days those lines are blurred because we have Layer 3 switches
but in simple terms a router will transmit packets and the switch will transmit frames
Now in the real world, a lot of Networking Engineers do not use the OSI Model
in its purest form or original form. Network Engineers tend to concentrate
on the lower 4 layers of the OSI Model, now that's changing again with the rise
of virtualization and technologies such as VMware, but it's still true for many
Network Engineers, so in it's purest form, the OSI Model has 7 layers
The Application Layer at Layer7 all the way down to the Physical Layer at Layer1
This model, however, was not originally developed for TCP IP, it was originally
develop for protocols such as CLNS and CLNP or Connectionless-mode Networks Service
and Connectionless Mode Network Protocol, don't worry too much about this protocols
unless you're using a routing protocols such as ISIS, you'll probably not
going to encounter this protocols if you're not using ISIS
TCP/IP had its own model which consisted of the Application Layer, the Transport Layer
Internet Layer, and Network Access Layer. As you can see here the top 3 layers
of the OSI Model are group into a single layer, so Application, Presentation and Session
are group as a single layer called Application
The transport Layer is equivalent, and the Network equivalent is known as the Internet Layer
The Data Link and Physical Layers are grouped together into what's called
the Network Access Layer in the TCP/IP Model
Now in the real world, we tend to use a Hybrid of both of these models
So you'll often find that Network Engineers group the Application
Presentation and Session Layer into the Application Layer
but they will still refer to the Transport, Network, Data Link and Physical Layers
which are part of the OSI Model, they'll leave and refer to this Hybrid Model
as the OSI Model sometimes. The reason for that is that most Network Engineers
still tend to spend most of their time looking at the lower 4 layers of the OSI Model
and thus the top 3 layers are group together into a single layer
known as the Application Layer, Network Engineers tend to concentrate their time
and efforts on getting information from 1 host to another host rather than
being concerned about what happens when the data gets to that host
The higher layers of the OSI Model may still be the realm of the Developer or Server Admin
and thus a lot of Network Engineers will use the Hybrid Model but still refer to it
as the OSI Model, so just be aware that we have the pure OSI Model, we have the TCP/IP
Model
and then we have this Hybrid Model. However because of the growth of VMware
a lot of Network Engineers are having to work with all the layers of the OSI Model
So this may not be true in your environment, you may have to troubleshoot applications
as well as network infrastructure issues, where some Engineers never get involved
with application troubleshooting, they spend their
time working with routing protocols an example
Another important concept to understand is that when Host B receives traffic
it needs some way of differentiating protocols used at the higher layers of the OSI Model
So as an example Host A may be sending Telnet traffic to Host B and at the same time
may be sending TFTP traffic to Host B, how does Host B know which of these applications
the traffic belongs to. You could have Telnet traffic mingled with TFTP traffic
So the PC may receive 10 packets, the first 3 packets could be TFTP
then there may be 2 packets of Telnet traffic and then 5 packets of TFTP
How does Host B know which application to forward the traffic to at higher layers
Host B may also be running multiple Layer3 protocols so as an example
it may be running IPv4 as well as IPv6. How does Host B know whether the traffic
arriving at Layer2 is IPv4 or IPv6?
So when the bits are received at the Physical Layer of the Network Interface Card of the PC
52
it will read the Layer2 frame at the Data Link Layer and in that frame
if it's using Ethernet2 which is the most common type of Ethernet
There's a field called Type field that denotes or specifies the higher layer protocol
So the Network Interface card will read the Type field, the Type field informs
the Network Interface Card whether the traffic is IPv4 or IPv6 or perhaps some
other protocols such as ARP, so the Type field informs the device which process
to send the traffic to at higher layers, so it could be the IPv4 or could be IPv6
At Layer3 the protocol number informs the device which protocol is running at Layer4
The 2 most common protocols are TCP and UDP. So at the Network Layer the Protocol field
specifies the Layer4 protocol and at Layer4, the port number specifies the application that's
being used which could be Telnet, TFTP, HTTP and so forth and so on
So as an example Telnet uses port 23, TFTP uses port 69 and HTTP uses port 8o
but there are many other well-known port numbers, it's well worth learning
some of the well-known port numbers to help you in your networking career

You might also like