What is the network layer?
The Network Layer
Network-to-network connections are what make
the Internet possible. The "network layer" is the part of the
Internet communications process where these connections occur, by sending
packets of data back and forth between different networks. In the 7-layer OSI
model (see below), the network layer is layer 3. The Internet Protocol (IP) is
one of the main protocols used at this layer, along with several other
protocols for routing, testing, and encryption.
Suppose Bob and Alice are connected to the
same local area network (LAN), and Bob wants to send Alice a message. Because
Bob is on the same network as Alice, he could send it directly to her computer
across the network. However, if Alice is instead on a different LAN several
miles away, Bob's message will have to be addressed and sent to Alice's network
before it can reach her computer, which is a network layer process.
What is a network?
A network is a group of two or more connected
computing devices. Usually all devices in the network are connected to a
central hub — for instance, a router. A network can also include subnetworks,
or smaller subdivisions of the network. Sub-networking is how very large
networks, such as those provided by ISPs, are able to manage thousands of IP
addresses and connected devices.
Think
of the Internet as a network of networks: computers are connected to each other
within networks, and these networks connect to other networks. This enables
these computers to connect with other computers both near and far.
What happens at the network layer?
Anything that has to do with inter-network
connections takes place at the network layer. This includes setting up the
routes for data packets to take, checking to see if a server in another network
is up and running, and addressing and receiving IP packets from other networks.
This last process is perhaps the most important, as the vast majority of
Internet traffic is sent over IP.
What is a packet?
All data sent over the Internet is broken
down into smaller chunks called "packets." When Bob sends Alice a
message, for instance, his message is broken down into smaller pieces and then
reassembled on Alice's computer. A packet has two parts: the header, which
contains information about the packet itself, and the body, which is the actual
data being sent.
At the network layer, networking software
attaches a header to each packet when the packet is sent out over the Internet,
and on the other end, networking software can use the header to understand how
to handle the packet.
A header contains information about the
content, source, and destination of each packet (somewhat like stamping an
envelope with a destination and return address). For example, an IP header
contains the destination IP address of each packet, the total size of the
packet, an indication of whether or not the packet has been fragmented (broken
up into still smaller pieces) in transit, and a count of how many networks the
packet has traveled through.
What is the OSI model?
The Open Systems Interconnection (OSI) Model
is a description of how the Internet works. It breaks down the functions
involved in sending data over the Internet into seven layers. Each layer has
some function that prepares the data to be sent over wires, cables, and radio
waves as a series of bits.
The seven layers of the OSI model are:
Application layer: Data generated by and
usable by software applications. The main protocol used at this layer is HTTP.
Presentation layer: Data is translated into a
form the application can accept. Some authorities consider HTTPS encryption and
decryption to take place at this layer.
Session layer: Controls connections between
computers (this can also be handled at layer 4 by the TCP protocol).
Transport layer: Provides the means for
transmitting data between the two connected parties, as well as controlling the
quality of service. The main protocols used here are TCP and UDP.
Network layer: Handles the routing and
sending of data between different networks. The most important protocols at
this layer are IP and ICMP.
Data link layer: Handles communications
between devices on the same network. If layer 3 is like the address on a piece
of mail, then layer 2 is like indicating the office number or apartment number
at that address. Ethernet is the protocol most used here.
Physical layer: Packets are converted into
electrical, radio, or optical pulses and transmitted as bits (the smallest
possible units of information) over wires, radio waves, or cables.
It is important to keep in mind that the OSI
model is an abstract conceptualization of the processes that make the Internet
work, and interpreting and applying the model to the real-world Internet is
sometimes a subjective exercise.
The OSI model is useful for helping people
talk about networking equipment and protocols, determining which protocols are
used by which software and hardware, and showing roughly how the Internet
works. But it is not a rigid step-by-step definition of how Internet
connections always function.
OSI model vs. TCP/IP model
The TCP/IP model is an alternative model of
how the Internet works. It divides the processes involved into four layers
instead of seven. Some would argue that the TCP/IP model better reflects the
way the Internet functions today, but the OSI model is still widely referenced
for understanding the Internet, and both models have their strengths and
weaknesses.
In the TCP/IP model, the four layers are:
Application layer: This corresponds,
approximately, to layer 7 in the OSI model.
Transport layer: Corresponds to layer
4 in the OSI model.
Internet layer: Corresponds to layer 3
in the OSI model.
Network access layer: Combines the
processes of layers 1 and 2 in the OSI model.
But where are OSI layers 5 and 6 in the
TCP/IP model? Some sources hold that the processes at OSI layers 5 and 6 either
are no longer necessary in the modern Internet, or actually belong to layers 7
and 4 (represented by layers 4 and 3 in the TCP/IP model).
For instance, since the TCP protocol opens
and maintains sessions at OSI layer 4, one could consider OSI layer 5 (the
"session" layer) to be unnecessary — and it is not represented in the
TCP/IP model. Additionally, HTTPS encryption and decryption can be considered
an application layer (OSI layer 7 or TCP/IP layer 4) process instead of a
presentation layer (OSI layer 6) process.
An application
layer
is an abstraction layer that specifies the shared communications protocols and interface methods used by hosts in a communications network. The
application layer abstraction is used in both of the standard models of computer networking: the Internet Protocol Suite(TCP/IP) and the OSI model. Although both models use the same term
for their respective highest level layer, the detailed definitions and purposes
are different.
In
TCP/IP, the application layer contains the communications protocols and
interface methods used in process-to-process communications across an Internet Protocol (IP) computer network. The
application layer only standardizes communication and depends upon the
underlying transport layer-protocols to establish host-to-host data transfer channels and
manage the data exchange in a client-server or peer-to-peer networking model. Though the TCP/IP application layer does not
describe specific rules or data formats that applications must consider when
communicating, the original specification (in RFC 1123) does rely on and
recommend the robustness principle for application design.
In
the OSI model, the definition of the application layer is narrower in scope. The OSI model defines the application
layer as the user interface responsible for displaying received information to
the user. In contrast, the
Internet Protocol Suite does not concern itself with such detail. OSI also
explicitly distinguishes additional functionality below the application layer,
but above the transport layer at two additional levels: the session layer, and the presentation layer. OSI specifies a strict
modular separation of functionality at these layers and provides protocol implementations for each layer.
The IETF definition document for the application
layer in the Internet Protocol Suite is RFC 1123. It provided an
initial set of protocols that covered the major aspects of the functionality of
the early Internet:
·
Remote login to hosts: Telnet
·
File transfer: File Transfer Protocol (FTP), Trivial File Transfer Protocol (TFTP)
·
Electronic mail
transport: Simple Mail Transfer Protocol (SMTP)
·
Networking support: Domain Name System (DNS)
·
Host initialization: BOOTP
·
Remote host management: Simple Network Management Protocol (SNMP), Common Management Information Protocol over TCP (CMOT)
تعليقات
إرسال تعليق