LP-3_Networking-2
LP-3_Networking-2
LP-3_Networking-2
3 | Networking 2
UNIT III
Network Model
3.0 Intended Learning Outcomes
On completion of the module, you should be able to:
1. Demonstrate safe and ethical practice to reduce and manage risks and maximize
opportunities of digital Network technologies and the Network how to connect in
the internet.
3.1 Introduction
Let's start with a few definitions. A network model reflects a design or architecture to
accomplish communication between different systems. Network models are also referred to
as network stacks or protocol suites. Examples of network models includes TCP/IP,
Sequenced Packet Exchange/Internet Packet Exchange SPX/ IPX used by Novelle Netware,
the Network Basic Input Output System Net-BIOS, which comprises the building blocks for
most Microsoft networking and network applications; and AppleTalk, the network model
for Apple Macintosh computers.
A network model usually consists of layers. Each layer of a model represents specific
functionality. Within the layers of a model, there are usually protocols specified to
implement specific tasks. You may think of a protocol as a set of rules or a language. Thus, a
layer is normally a collection of protocols.
There are a number of different network models. Some of these models relate to a
specific implementation, such as the TCP/IP network model. Others simply describe the
process of networking, such as the International Organization for Standardization/Open
System Interconnection Reference Model ISO/ OSI-RM, or more simply, OSI-RM.
3.2 OSI-RM
RM. Many network models are described by way of OSI-RM and so we provide a
description of it here. The OSI-RM is depicted in Figure 1–1.
The OSI-RM
As indicated in Figure 3.1, each of the layers are numbered 1 through 7 from
physical to application layer.
LAYER 7 - All of the capabilities of networking begin in the Application layer. File
transfer, messaging, web browsing, and other applications are in this layer. Each such
application will appropriately invoke processing of data for transmission through well-
defined interfaces to layers below this one.
49
3 | Networking 2
LAYER 6 - The Presentation layer is responsible for data formatting. It takes care of
such things as bit and byte ordering and floating-point representation. Examples include
External Data Representation (XDR) and Abstract Syntax Notation (ASN).
LAYER 5 - The Session layer handles the exchange of data through dialog procedures
or chat or conversation protocols. This layer is largely designed for mainframe and terminal
communications. It has no relevance with respect to TCP/IP networking.
LAYER 4 - The Transport layer is responsible for the reliable transfer of data between
systems. It manages the communication session including flow control, ordering of
information, error detection, and recovery of data.
LAYER 3 - The Network layer owns the responsibility of delivering data between
different systems in different interconnected networks Internets.
LAYER 2 - The Data Link layer provides rules for sending and receiving data between
two connected nodes over a particular physical medium.
LAYER 1 - The Physical layer defines the required hardware, such as cables and
interfaces, for a given medium of communication, such as electrical, radio frequency, and
light-based. In this way, methods for transmitting and receiving bit-streams of information
are defined.
There is a great deal more to the OSI model than we have discussed here. For
complete details on this standard, visit
TCP/IP Model
The TCP/IP network model takes its name from two of its protocols, the Transmission
Control Protocol (TCP) and the Internet Protocol (IP). Figure 3–2 provides a five-
layer 2 representation of the TCP/IP Model. By utilizing a five-layer model, the lower four
layers are numbered identically to the lower four layers of the OSI-RM model. The lower
four layers of the model represent functionality performed internally by the Linux kernel.
The Application layer includes commands and daemons.
data itself. The information added by each layer is called a header when it is prefixed to the
data from the previous layer, and a trailer when it is suffixed. On the left-hand side of Figure
3–2, you see an increasing number of rectangles as you scan down the layers. The area in
gray represents the information added by each layer.
Figure
3– 2 The
TCP/IP Model
The receiving system, normally the server, performs the same steps except in reverse
(bottom to top), decapsulating the data. Each layer is responsible for interpreting the header
generated by the same layer on the sending system. This process is known as peer-to-
peer communication.
4 is called a segment. Otherwise, if it is UDP, then it is called a packet. The data of Layer 3 is
called a datagram; of Layer 2, a frame or cell; and of Layer 1, a signal.
The Hardware layer is responsible for exactly that hardware. This includes cables,
interface cards, and repeaters. It accepts the data passed to it by the Network Interface layer
and prefixes something called the Preamble, which is a well-known sequence of 64 bits used
for synchronization purposes. When it finishes its work, it generates a signal to be
submitted to the media (electrically-based cables in most cases).
The Hardware layer also imposes the maximum transfer unit (MTU) used by the
Internet layer to ensure that the Hardware layer does not get frames 3 that are too large or
too small. For Ethernet, the MTU for the signal is 1526 octets, and the minimum signal size is
72 octets.4 There are two hardware devices which operate at this
layer: repeaters and amplifiers. A repeater is a device with a number of ports (usually four
or more) that is capable of receiving signals, filtering out noise (phenomena not related to the
communication at hand), and repeating the signals to every port except the ingress
(incoming) port. Amplifiers perform the same task, except that they do not filter noise.
Consequently, repeaters are employed in electrical communications environments and
amplifiers are employed in light-based communications environments. These devices are
often called hubs or concentrators.
You may think of the Network Interface layer as a collection of device drivers. Its
responsibility is to prepare the data passed to it from the Internet layer for signaling. It does
this by prefixing its header (indicated as NILH in Figure 1–2), computing a Cyclic
Redundancy Check (CRC_a 32-bit checksum), appending the CRC to the datagram, and
passing this information to the device (interface) for signaling in what is called a frame. In
particular, this layer understands physical addresses (often referred to as Media Access
Control [MAC] addresses). When using Ethernet, this is often called an Ethernet address.
Physical addresses are local and only need to be unique within the local network. For
Ethernet interface chipsets, they are 48-bit addresses permanently written into the
programmable read-only memory (PROM).
52
3 | Networking 2
The Network Interface layer writes both the destination and source physical address
into its header during encapsulation. Consequently, it is at this layer that, during
deencapsulation, initial decisions are made about whether or not to continue processing an
incoming frame up the stack.
There is one device associated with this layer. It is a switch. Switches look very much
like repeaters, a piece of hardware with at least two network ports, but are more intelligent
than repeaters. Since they operate at the Network Interface layer, they are able to make
decisions based on physical addresses. Switches are sometimes called hubs
or bridges or layer 2 routers.
NOTE:
Switches are sometimes called bridges (or the other way around, if you like). Bridge
is an older term that is not commonly used today. Unfortunately, the terms switching, layer
2 switching, and layer 3 switching all confound the issue of what is really being described.
Most of the variation in the base term "switch" comes from vendors of switches and routers.
An argument could be made that the proper term for the layer 2 device that is capable of
making packet-forwarding decisions based on physical addresses is "bridge."
A similar argument could be made for the term switch. I could coin a new term,
say swidge, but I haven't got the courage, and, besides, it would probably make matters
worse. After all, companies like Cisco aren't likely to change their terminology just because I
say so. I had to make a decision about which term to use. So I decided to use switch.
Throughout this book, I will make no distinction between bridge and switch and will use the
term switch to mean a layer 2 device that is capable of making packet-forwarding decisions
based on physical addresses.
The Internet layer is responsible for a variety of tasks. In order to accomplish these
tasks it uses three principal protocols. The Internet Protocol (IP), the Internet Control
Messaging Protocol (ICMP), and the Internet Group Management Protocol (IGMP). The IP is
responsible for routing and fragmentation.5 The ICMP generates error messages, assists
routing through redirection, may implement rudimentary flow control, supports the ping
command, supports router discovery, and may generate timestamp and netmask queries and
responses. The IGMP supports Internet Layer multicasting. Each of these protocols has two
available versions: 4 and 6.
53
3 | Networking 2
The device that operates at this layer is a router. Routers are nodes that implement the
intelligence of the Internet layer protocols and forward datagrams to the
appropriate networks or subnetworks (discussed in Chapter 4) based on IP addresses and
the routing algorithm (described in Chapter 6). Routers are sometimes called layer 3
switches. Unfortunately, routers are also sometimes called hubs.
The Internet layer produces or reads the Internet layer header. The header contains a
lot of information and, in particular, includes the source and destination IP address
associated with the packet. There are two versions of the protocols in this layer: version 4 and
version 6. IPv4 addresses are 4 octets while IPv6 addresses are 16 octets. These are global
addresses, meaning that all nodes throughout a collection of networks that are
interconnected (internet) must be uniquely identified by this address. Data is passed through
such an internet by the process of routing. Routing is performed by examining a portion of
an IP address in order to determine to which network the data needs to be sent (effectively
the purpose of the routing algorithm). Linux systems can act as routers. This header, together
with the overall functionality of the Internet layer, is largely discussed in Chapters 4, 5, and
6. Additional details of the Internet layer and Linux router functionality are given in the last
six chapters of this book.
The Transport Layer is responsible for the end-to-end flow of data. There are two
primary protocols used within this layer (TCP and the UDP). An application will use one or
the other of these protocols for a given communication. These protocols, the headers they
produce or read, and the Transport layer.
This is the layer where all the applications live. These applications are responsible for
understanding the data format as well as interpreting the data. Example applications include
the Domain Name Service (DNS), the Dynamic Host Configuration Protocol (DHCP), the
Network File System (NFS), Samba, electronic mail (e-mail), the file transfer protocol (FTP),
and the telnet utility.
The device that operates at this layer is the gateway. Unfortunately, gateway is a term,
somewhat like hub, that is used in many ways. We generally define it to mean a link between
distinct and/or different computer networks. Often, it is used to refer to a system that is
capable of converting from one network protocol stack to another, such as a system that is
54
3 | Networking 2
interconnected into both a TCP/IP network and a Netware network. Gateway is often used
to refer to a system that interconnects an internal internetwork and an external network such
as the Internet. Other uses of the term gateway are described as they arise
Figure 3–3 depicts the relationship between the OSI-RM and the TCP/IP model.
The relationship between these two models at Layers 1, 2, and 3 is identical. While the
diagram in Figure 3–3 shows a one-to-one correspondence at Layer 4, it should be noted that
UDP does not perform all of the functions required by the OSI-RM Transport layer; we will
explore this fact further in Chapter 7.
The Application layer of the TCP/IP model assumes responsibility for the Session,
Presentation, and Application layer of the OSI-RM. This relationship will be detailed further
in Chapter 8 and numerous subsequent chapters.
Now it's time to compare both the reference model that we have learned till now. Let's start
by addressing the similarities that both of these models have.
55
3 | Networking 2
Following are some similarities between OSI Reference Model and TCP/IP Reference
Model.
Following are some major differences between OSI Reference Model and TCP/IP
Reference Model, with diagrammatic comparison below.
4. OSI model has a separate Presentation layer 4. TCP/IP does not have a separate Presentation layer or
and Session layer. Session layer.
56
3 | Networking 2
Diagrammatic Comparison between OSI Reference Model and TCP/IP Reference Model
Physical Layer
Physical layer in the OSI model plays the role of interacting with actual hardware and
signaling mechanism. Physical layer is the only layer of OSI network model which actually
deals with the physical connectivity of two different stations. This layer defines the
hardware equipment, cabling, wiring, frequencies, pulses used to represent binary signals
etc.
58
3 | Networking 2
Physical layer provides its services to Data-link layer. Data-link layer hands over
frames to physical layer. Physical layer converts them to electrical pulses, which represent
binary data. The binary data is then sent over the wired or wireless media.
Signals
When data is sent over physical medium, it needs to be first converted into
electromagnetic signals. Data itself can be analog such as human voice, or digital such as file
on the disk. Both analog and digital data can be represented in digital or analog signals.
Digital Signals
Digital signals are discrete in nature and represent sequence of voltage pulses. Digital
signals are used within the circuitry of a computer system.
Analog Signals
Analog signals are in continuous wave form in nature and represented by continuous
electromagnetic waves.
Transmission Impairment
When signals travel through the medium they tend to deteriorate. This may have many
reasons as given:
Attenuation
For the receiver to interpret the data accurately, the signal must be sufficiently strong.
When the signal passes through the medium, it tends to get weaker. As it covers
distance, it loses strength.
Dispersion
As signal travels through the media, it tends to spread and overlaps. The amount of
dispersion depends upon the frequency used.
Delay distortion
Signals are sent over media with pre-defined speed and frequency. If the signal speed
and frequency do not match, there are possibilities that signal reaches destination in
arbitrary fashion. In digital media, this is very critical that some bits reach earlier than
the previously sent ones.
Noise
Random disturbance or fluctuation in analog or digital signal is said to be Noise in
signal, which may distort the actual information being carried. Noise can be
characterized in one of the following class:
59
3 | Networking 2
o Thermal Noise
Heat agitates the electronic conductors of a medium which may introduce
noise in the media. Up to a certain level, thermal noise is unavoidable.
o Intermodulation
When multiple frequencies share a medium, their interference can cause noise
in the medium. Intermodulation noise occurs if two different frequencies are
sharing a medium and one of them has excessive strength or the component
itself is not functioning properly, then the resultant frequency may not be
delivered as expected.
o Crosstalk
This sort of noise happens when a foreign signal enters into the media. This is
because signal in one medium affects the signal of second medium.
o Impulse
This noise is introduced because of irregular disturbances such as lightening,
electricity, short-circuit, or faulty components. Digital data is mostly affected
by this sort of noise.
Transmission Media
The media over which the information between two computer systems is sent, called
transmission media. Transmission media comes in two forms.
Guided Media
All communication wires/cables are guided media, such as UTP, coaxial cables, and
fiber Optics. In this media, the sender and receiver are directly connected and the
information is send (guided) through it.
Unguided Media
Wireless or open air space is said to be unguided media, because there is no
connectivity between the sender and receiver. Information is spread over the air, and
anyone including the actual recipient may collect the information.
Channel Capacity
The speed of transmission of information is said to be the channel capacity. We count it
as data rate in digital world. It depends on numerous factors such as:
Bandwidth: The physical limitation of underlying media.
Error-rate: Incorrect reception of information because of noise.
Encoding: The number of levels used for signaling.
60
3 | Networking 2
Multiplexing
Multiplexing is a technique to mix and send multiple data streams over a single
medium. This technique requires system hardware called multiplexer (MUX) for
multiplexing the streams and sending them on a medium, and de-multiplexer (DMUX)
which takes information from the medium and distributes to different destinations.
Switching
Switching is a mechanism by which data/information sent from source towards
destination which are not directly connected. Networks have interconnecting devices,
which receives data from directly connected sources, stores data, analyze it and then
forwards to the next interconnecting device closest to the destination.
Switching can be categorized as:
Data-link Layer
Data Link Layer is second layer of OSI Layered Model. This layer is one of the most
complicated layers and has complex functionalities and liabilities. Data link layer hides the
details of underlying hardware and represents itself to upper layer as the medium to
communicate. Data link layer works between two hosts which are directly connected in
some sense. This direct connection could be point to point or broadcast. Systems on
broadcast network are said to be on same link. The work of data link layer tends to get more
complex when it is dealing with multiple hosts on single collision domain.
Data link layer is responsible for converting data stream to signals bit by bit and to
send that over the underlying hardware. At the receiving end, Data link layer picks up data
from hardware which are in the form of electrical signals, assembles them in a recognizable
frame format, and hands over to upper layer.
Data link layer has two sub-layers:
Logical Link Control: It deals with protocols, flow-control, and error control
Media Access Control: It deals with actual control of media
61
3 | Networking 2
Network Layer
Layer-3 in the OSI model is called Network layer. Network layer manages options
pertaining to host and network addressing, managing sub-networks, and internetworking.
Network layer takes the responsibility for routing packets from source to destination within
or outside a subnet. Two different subnet may have different addressing schemes or non-
compatible addressing types. Same with protocols, two different subnet may be operating
on different protocols which are not compatible with each other. Network layer has the
responsibility to route the packets from source to destination, mapping different addressing
schemes and protocols.
62
3 | Networking 2
Layer-3 Functionalities
Devices which work on Network Layer mainly focus on routing. Routing may include
various tasks aimed to achieve a single goal. These can be:
Addressing devices and networks.
Populating routing tables or static routes.
Queuing incoming and outgoing data and then forwarding them according to
quality-of-service constraints set for those packets.
Internetworking between two different subnets.
Delivering packets to destination with best efforts.
Provides connection oriented and connection less mechanism.
With its standard functionalities, Layer 3 can provide various features as:
Quality of service management
Load balancing and link management
Security
Interrelation of different protocols and subnets with different schema.
Different logical network design over the physical network design.
L3 VPN and tunnels can be used to provide end to end dedicated connectivity.
Internet protocol is widely respected and deployed Network Layer protocol which helps to
communicate end to end devices over the internet. It comes in two flavors. IPv4 which has
ruled the world for decades but now is running out of address space. IPv6 is created to
replace IPv4 and hopefully mitigates limitations of IPv4 too.
Transport Layer
Next Layer in OSI Model is recognized as Transport Layer (Layer-4). All modules and
procedures pertaining to transportation of data or data stream are categorized into this
layer. As all other layers, this layer communicates with its peer Transport layer of the remote
host.Transport layer offers peer-to-peer and end-to-end connection between two processes
on remote hosts. Transport layer takes data from upper layer (i.e. Application layer) and
then breaks it into smaller size segments, numbers each byte, and hands over to lower layer
(Network Layer) for delivery.
63
3 | Networking 2
Functions
This Layer is the first one which breaks the information data, supplied by Application
layer in to smaller units called segments. It numbers every byte in the segment and
maintains their accounting.
This layer ensures that data must be received in the same sequence in which it was
sent.
This layer provides end-to-end delivery of data between hosts which may or may not
belong to the same subnet.
All server processes intend to communicate over the network are equipped with well-
known Transport Service Access Points (TSAPs) also known as port numbers.
End-to-End Communication
A process on one host identifies its peer host on remote network by means of TSAPs,
also known as Port numbers. TSAPs are very well defined and a process which is trying to
communicate with its peer knows this in advance.
For example, when a DHCP client wants to communicate with remote DHCP server,
it always requests on port number 67. When a DNS client wants to communicate with
remote DNS server, it always requests on port number 53 (UDP).
Presentation Layer
The primary goal of this layer is to take care of the syntax and semantics of the
information exchanged between two communicating systems. Presentation layer takes care
that the data is sent in such a way that the receiver will understand the information data and
will be able to use the data. Languages syntax can be different of the two communicating
systems. Under this condition presentation layer plays a role translator.
3. Compression: It carries out data compression to reduce the bandwidth of the data to
be transmitted. The primary role of Data compression is to reduce the number of bits
to be 0transmitted. It is important in transmitting multimedia such as audio, video,
text etc.
65
3 | Networking 2
To manage and maintain the Syntax and Semantics of the information transmitted.
Encoding data in a standard agreed upon way. Eg: String, double, date, etc.
Perform Standard Encoding on wire
Session Layer
1. Dialog Control - This layer allows two systems to start communication with each
other in half-duplex or full-duplex.
2. Token Management - This layer prevents two parties from attempting the same
critical operation at the same time.
Assessment 1:
In your own words. What did you understand about the Comparison of OSI &
TCP/IP Model? Write it on your paper or bond paper.
6. When data frames are sent on the link, both machines must be synchronized in order
to transfer to take place. What is this?
7. What layer that takes the responsibility for routing packets from source to
destination within or outside a subnet?
8. It is a layer that offers peer-to-peer and end-to-end connection between two
processes on remote hosts. What is this?
9. It is a process on one host identifies its peer host on remote network by means of
TSAPs, also known as Port numbers. TSAPs are very well defined and a process
which is trying to communicate with its peer knows this in advance. What is this?
10. What is the layer that allows two systems to start communication with each other in
half-duplex or full-duplex?
Activity 3:
Based on your understanding. I want to express your idea on what did you
understand about the difference between OSI and TCP/IP Reference Model. (Essay)
68
3 | Networking 2
3.3 References
https://www.informit.com/articles/article.aspx?p=23987&seqNum=4
https://www.studytonight.com/computer-networks/
3.4 Acknowledgment
The images, tables, figures and information contained in this module were
taken from the references cited above.