0% found this document useful (0 votes)
14 views

DCCN Module (1)

Uploaded by

tolasagirma4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

DCCN Module (1)

Uploaded by

tolasagirma4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 135

College of Natural and computational science

Department of Computer Science

Module prepared on Data Communication and Computer Networks

Prepared By: Getachew Abera (M.sc. in Computer Science)

Mar 2024
Gambella, Ethiopia
Course goals and objectives
By the end of this course, students will be able to:
 Understand the concepts and principles of data communications and computer
networks
 Understand data transmission and transmission media
 Understand Protocols and various networking components
 Understand TCP/IP & OSI Reference Model
 Understand LAN and WAN technologies
 Understand and implement IP addressing.
 Build small to medium level Computer networks
 Understand subnets

Mar 2024
Gambella, Ethiopia

ii
Table of Contents
Chapter 1: Data Communication and Computer Networking Basics ......................... 1
1.1 Introduction ............................................................................................................... 1

1.2 Data Representation ................................................................................................... 2

1.3 Digital Transmission in Computer Network ............................................................. 3

1.4 Transmission Impairment .......................................................................................... 5

1.5 Types of Transmission modes ................................................................................... 6

1.6 Components of Data Communication ....................................................................... 7

1.7 Protocol and Standard in Computer Networks .......................................................... 8

1.8 Computer Network .................................................................................................. 12

1.8.1 Network Types .................................................................................................. 14


1.8.2 Architecture ....................................................................................................... 19
1.8.3 Network Components........................................................................................ 24
1.8.3.2 Software Components........................................................................................ 26

1.8.4 Network Topology ............................................................................................ 26


1.9 Transmission Media ................................................................................................ 33

1.9.1 Guided Media .................................................................................................... 34


1.9.2 Unguided Transmission .................................................................................... 40
Chapter 2: LAYERED MODELS ................................................................................. 45
2.1 Introduction ............................................................................................................. 45

2.2 The OSI model ......................................................................................................... 46

2.3 Layers in the OSI Model .......................................................................................... 49

2.3.1 Application, Session and Presentation Layers .................................................. 50


2.4 Functions of Application layer ................................................................................ 59

2.5 Function of presentation layer ................................................................................. 60

2.6 Session Layer ........................................................................................................... 60

Chapter 3: Transport Layer .......................................................................................... 62

iii
3.1 Introduction ............................................................................................................. 62

3.2. Segmentation .......................................................................................................... 63

3.3. Addressing .............................................................................................................. 65

3.4. Multiplexing and DE-multiplexing ........................................................................ 66

3.5. Connectionless/Connection-Oriented ..................................................................... 67

3.6. Unreliable/ Reliable ................................................................................................ 67

3.7. Protocols in Transport Layer .................................................................................. 69

Chapter 4: Network Layer Addressing and Routing .................................................. 74


4.1 Introduction ............................................................................................................. 74

4.2. NIC addressing ....................................................................................................... 75

4.3. Packetizing.............................................................................................................. 76

4.4. IP addressing........................................................................................................... 76

4.5. IPv4 ......................................................................................................................... 82

4.6. Internet Protocol Version 6 (IPv6) ......................................................................... 84

4.7 Classfull Addressing ................................................................................................ 84

4.8. Sub-netting.............................................................................................................. 86

4.9 Types of IP Addresses ........................................................................................... 102

4.10 Address Mapping ................................................................................................. 104

4.11. ICMP .................................................................................................................. 106

4.12 Routing ................................................................................................................ 107

Chapter 5: Link Layer and Physical Layer ................................................................ 112


5.1. Link layer services ................................................................................................ 112
5.2. Physical Layer Services ........................................................................................ 118
5.2.4. LAN Devices: Repeaters, Hubs, Bridges and switches ................................. 121
5.2.5. WAN Devices Routers, Layer 3 Switches and Gateways .............................. 124
Routers: .................................................................................................................... 124
5.2.7. Physical Layer and its responsibilities ........................................................... 125

iv
Chapter 1: Data Communication and Computer Networking Basics

1.1 Introduction

The term “Data Communication” comprises two words: Data and Communication. The
parties creating and using the data agree upon the word data refers to information
presented in whatever form. Data can be any text, image, audio, video, and multimedia
files. Communication is an act of sending or receiving data. Thus, data communication
refers to the exchange of data between two or more networked or connected devices.
These devices must be capable of sending and receiving data over a communication
medium. Examples of such devices include personal computers, mobile phones, laptops,
etc. As we can see in below figure, four different types of devices — computer, printer,
server and switch are connected to form the network. These devices are connected
through a media to the network, which carry information from one end to other end.

Fig 1.1: Communication among devices

Data communications are the exchange of data between two devices via some form of
transmission medium such as a wire cable. For data communications to occur, the
communicating devices must be part of a communication system made up of a
combination of hardware (physical equipment) and software (programs). The
effectiveness of a data communications system depends on four fundamental
characteristics: delivery, accuracy, timeliness, and jitter.

 Delivery- The system must deliver data to the correct destination. Data must be
received by the intended device or user and only by that device or user.
 Accuracy- The system must deliver the data accurately. Data that have been
altered in transmission and left uncorrected are unusable.

1
 Timeliness- The system must deliver data in a timely manner. Data delivered late
are useless. In the case of video and audio, timely delivery means delivering data
as they are produced, in the same order that they are produced, and without
significant delay. This kind of delivery is called real-time transmission.
 Jitter- Jitter refers to the variation in the packet arrival time. It is the uneven
delay in the delivery of audio or video packets.

1.2 Data Representation

Information today comes in different forms such as text, numbers, images, audio, and
video.

Text; in data communications, text is represented as a bit pattern, a sequence of bits (Os
or Is). Different sets of bit patterns have been designed to represent text symbols. Each
set is called a code, and the process of representing symbols is called coding. Today, the
prevalent coding system is called Unicode, which uses 32 bits to represent a symbol or
character used in any language in the world. The American Standard Code for
Information Interchange (ASCII), developed some decades ago in the United States, now
constitutes the first 127 characters in Unicode and is also referred to as Basic Latin.

Numbers: Numbers are also represented by bit patterns. However, a code such as ASCII
is not used to represent numbers; the number is directly converted to a binary number to
simplify mathematical operations.

Images: Images are also represented by bit patterns. In its simplest form, an image is
composed of a matrix of pixels (picture elements), where each pixel is a small dot. The
size of the pixel depends on the resolution.

Audio: Audio refers to the recording or broadcasting of sound or music. Audio is by


nature different from text, numbers, or images. It is continuous, not discrete.

Video: Video refers to the recording or broadcasting of a picture or movie. Video can
either be produced as a continuous entity (e.g., by a TV camera), or it can be a
combination of images, each a discrete entity, arranged to convey the idea of motion.

2
1.3 Digital Transmission in Computer Network

Data or information can be stored in two ways, analog and digital.

For a computer to use the data, it must be in discrete digital form. Similar to data, signals
can also be in analog and digital form. To transmit data digitally, it needs to be first
converted to digital form.

Digital-to-Digital Conversion

This section explains how to convert digital data into digital signals. It can be done in two
ways,

1. Line coding

2. Block coding.

For all communications, line coding is necessary whereas block coding is optional

Line Coding

• The process for converting digital data into digital signal is said to be Line Coding.
Digital data is found in binary format. It is represented (stored) internally as series of 1s
and 0s.

Fig 1.2: Digital data to Digital signal conversion

Digital transmission of digital data

• In digital transmission, signals flow in the form of discrete pulses of electricity (voltage)
or light.

3
• The entire communication channel capacity is used to transmit a single data signal (i.e.
all frequencies are used).

• Because of the problem of attenuation of the signal (i.e. signal loss over distance),
digital transmission systems use repeaters to boost the signal back to its original
strength when
transmitting over long distances.

Synchronous and asynchronous communication

• There are two other common approaches for synchronising the sender and the receiver
in data communications. These are known as asynchronous and synchronous
transmission.

• In asynchronous transmission the timing problem is avoided by not sending long


uninterrupted

• A character can consist of anything between 5 and 8 bits.

• Synchronization must only be maintained within each character; the receiver has a
chance to resynchronize at the beginning of each character.

• Using asynchronous communication, the sender and receiver must agree on the number
of bits in a character before transmission begins.

In synchronous transmission, the data bits are transmitted in a continuous stream


without interruption.

 To prevent timing drift between the sender and receiver, their clocks must be
somehow synchronized.

4
 One possibility is to provide a separate clock line between the sender and
receiver.

 One side (either the sender or receiver) will transmit a regular pulse onto the
clock line, and the other side will use these regular pulses to synchronize its
clock.
Analogue transmission of digital data

• The alternative to transmitting the digital data inside the computer as a digital signal is
to convert the digital data into analogue form, transmit it over the network, and then
convert it back

into digital data at the receiving computer.

• The signals are continuous and non-discrete, and flow across the physical medium in
the form of electromagnetic or optical waves. While digital systems use repeaters,
analogue systems use amplifiers to regenerate analogue signals at their original strength.

1.4 Transmission Impairment

Signals travel through transmission media, which are not perfect. The imperfection
causes signal impairment. This means that the signal at the beginning of the medium is
not the same as the signal at the end of the medium. What is sent is not what is received.
Three causes of impairment are attenuation, distortion, and noise.

Attenuation: Attenuation means a loss of energy. When a signal, simple or composite,


travels through a medium, it loses some of its energy in overcoming the resistance of the
beams of bits. Instead, data are transmitted one character at a time. That is why a wire
carrying electric signals gets warm, if not hot, after a while.

Distortion: Distortion means that the signal changes its form or shape. Distortion can
occur in a composite signal made of different frequencies. Each signal component has its
own propagation speed through a medium and, therefore, its own delay in arriving at the
final destination. In other words, signal components at the receiver have phases different
from what they had at the sender.

5
Noise: Noise is another cause of impairment. Several types of noise, such as thermal
noise, induced noise, crosstalk, and impulse noise, may corrupt the signal. Thermal noise
is the random motion of electrons in a wire, which creates an extra signal not originally
sent by the transmitter. Crosstalk is the effect of one wire on the other. One wire acts as a
sending antenna and the other as the receiving antenna.

1.5 Types of Transmission modes

 The data transfer between two linked devices can take place in three modes. These
are called transmission modes. They are

1. Simplex, there are types transmission modes. those are :-


1. simplex, 2. half duplex, 3. full-duplex

2. Half Duplex

3. Full-Duplex.

Simplex: If the data transfer between two linked devices takes place only in one
direction, it is called Simplex mode. i.e. only one of the two devices on a link can
transmit data and the other will only receive the data. Example: keyboard/monitor
relationship.

Half Duplex: In half duplex both the linked devices can transmit and receive the data.
But not at the same time. i.e when the first device is sending the data the second will only
receive ,similarly when the second is sending the data the first will be receive. The use of
a walkie-talkie by police and army personal is an example for this half-duplex
transmission.

Full Duplex: In Full duplex mode (also called Duplex) both the linked devices can
transmit and receive the data at the same time. One common example is mobile phone or
telephone line where both users can talk and hear at the same time.

6
1.6 Components of Data Communication

Whenever we talk about communication between two computing devices using a


network, five most important aspects come to our mind. These are sender, receiver,
communication medium, the message to be communicated, and certain rules called
protocols to be followed during communication. The communication media is also called
transmission media. Figure below shows the role of these five components in data
communication.

Sender: A sender is a computer or any such device which is capable of sending data over
a network. It can be a computer, mobile phone, smartwatch, walkietalkie, video recording

7
device, etc. Receiver: A receiver is a computer or any such device which is capable of
receiving data from the network. It can be any computer, printer, laptop, mobile phone,
television, etc. In computer communication, the sender and receiver are known as nodes
in a network.

Message: It is the data or information that needs to be exchanged between the sender and
the receiver. Messages can be in the form of text, number, image, audio, video,
multimedia, etc.

Communication media: It is the path through, which the message travels between
source and destination. It is also called medium or link, which is either wired or wireless.
For example, a television cable, telephone cable, Ethernet cable, satellite link,
microwaves, etc.

Protocols: It is a set of rules that need to be followed by the communicating parties in


order to have successful and reliable data communication. You have already come across
protocols such as Ethernet and HTTP.

1.7 Protocol and Standard in Computer Networks

Protocol In Order to make communication successful between devices, some rules and
procedures should be agreed upon at the sending and receiving ends of the system.

Protocol In Order to make communication successful between devices , some rules and
procedures should be agreed upon at the sending and receiving ends of the system. Such
rules and procedures are called as Protocols . A network protocol is an established set of
rules that determine how data is transmitted between different devices in the same
network. Define the rules that govern the communications between two computers
connected to the network .It defines what is communicated, how it is communicated, and
when it is communicated. The key elements of a protocol are syntax, semantics, and
timing.

8
A protocol specification consists of the syntax, which defines the kinds and formats of
the messages exchanged, and the semantic, which specifies the action taken by each
entity when specific events occur

In above diagrams Protocols are shown as set of rules . Such that Communication
between Sender and Receiver is not possible without Protocol.

Standards : Standards are the set of rules for data communication that are needed for
exchange of information among devices. It is important to follow Standards which are
created by various Standard Organization like IEEE , ISO , ANSI etc.

Types of Standards:

o De Facto Standard.
o De Jure Standard.
De Facto Standard: The meaning of the work “De Facto” is “By Fact” or “By
Convention”. These are the standards that have not been approved by any Organization,
but have been adopted as Standards because of its widespread use. Also sometimes
Manufacturers often establish these standards.

For Example: Apple and Google are two companies, which established their own rules
on their products, which are different. In addition, they use some same standard rules for
manufacturing for their products.

De Jure Standard: The meaning of the word “De Jure” is “By Law” or “By
Regulations”. Thus, these are the standards that have been approved by officially

9
recognized body like ANSI, ISO , IEEE etc. These are the standard, which are important
to follow if it is required or needed.

For example : All the data communication standard protocols like SMTP , TCP , IP ,
UDP etc. are important to follow the same when we needed them.

Note: A standard is a formalized protocol accepted by most of the parties that implement
it. A protocol is not a set of rules. A protocol is the thing those rules describe the rules of.
This is why programs implement a protocol and comply with a standard.

Protocols and standards make networks work together. Protocols make it possible for the
various components of a network to communicate with each other, and standards make it
possible for different manufacturers’ network components to work together.

Circuit switching and Packet switching

What Is Circuit Switching?

Circuit switching is defined as the method of switching which is used for establishing a
dedicated communication path between the sender and the receiver. The link which is
established between the sender and the receiver is in the physical form. Analog telephone
network is a well-known example of circuit switching. Bandwidth is fixed in this type of
switching.

Advantages of Circuit Switching

 The bandwidth used is fixed.

 The quality of communication is increased as a dedicated communication channel is


used.
 The rate at which the data is transmitted is fixed.

 While switching, no time is wasted in waiting.

 It is preferred when the communication is long and continuous.

Disadvantages

10
 Since dedicated channels are used, the bandwidth required is more.

 The utilization of resources is not full.

 Since a dedicated channel has been used, the transmission of other data becomes
impossible.

 The time taken by the two stations for the establishment of the physical link is too
long.

 Circuit switching is expensive because every connection uses a dedicated path


establishment.
 The link between the sender and the receiver will be maintained until and unless
the user terminates the link. This will also continue if there is no transfer of data
taking place.
What is Packet Switching?

Packet switching is defined as the connectionless network where the messages are
divided and grouped together and this is known as a packet. Each packet is routed from
the source to the destination as individual packets. The actual data in these packets are
carried by the payload. When the packet arrives at the destination, it is the responsibility
of the destination to put these packets in the right order.

Advantage of packet switching

 There is no delay in the delivery of the packets as they are sent to the destination
as soon as they are available.
 There is no requirement for massive storage space as the information is passed on
to the destination as soon as they are received.
 Failure in the links does not stop the delivery of the data as these packets can be
routed from other paths too.
 Multiple users can use the same channel while transferring their packets.
 The usage of bandwidth is better in case of packet switching as multiple sources
can transfer packets from the same source link.
Disadvantages

 Installation costs of packet switching are expensive.

11
 The delivery of these packets becomes easy when complicated protocols are
used.
 High-quality voice calls cannot use packet switching as there is a lot of delay in
this type of communication.
 Connectivity issues may lead to loss of information and delay in the delivery of
the information.
Switching Packet Switching

A circuit needs to be established to make sure Each packet containing the information that
that data transmission takes place. needs to be processed goes through the
dynamic route.

A uniform path is followed throughout the There is no uniform path that is followed end
session. to end through the session.

It is most ideal for voice communication, It is used mainly for data transmission as the
while also keeping the delay uniform. delay is not uniform.

Without a connection, it cannot exist, as the A connection is not necessary, as it can exist
connection needs to be present on a physical without one too. It needs to be present on a
layer. network layer.

Data to be transmitted is processed at the Data is processed and transmitted at the source
source itself. as well as at each switching station.

1.8 Computer Network

A network consists of two or more computers that are linked in order to share resources
(such as printers), exchange files, or allow electronic communications. The computers on
a network may be linked through cables, telephone lines, radio waves, satellites, or
infrared light beams.

Network Applications
A network application is any application running on one host providing communication
to another application running on a different host. Network applications allow network

12
operators to easily manage and monitor network traffic as well as analyze data that can be
used to improve network systems.
Network Criteria
A network must be able to meet a certain number of criteria. The most important of these
are performance, reliability, and security.
Performance: Performance can be measured in many ways, including transit time and
response time. Transit time is the amount of time required for a message to travel from
one device to another. Response time is the elapsed time between an inquiry and a
response. The performance of a network depends on a number of factors, including the
number of users, the type of transmission medium, the capabilities of the connected
hardware, and the efficiency of the software. Performance is often evaluated by two
networking metrics: throughput and delay. We often need more throughput and less
delay. However, these two criteria are often contradictory. If we try to send more data to
the network, we may increase throughput but we increase the delay because of traffic
congestion in the network.
Reliability In addition to accuracy of delivery, network reliability is measured by the
frequency of failure, the time it takes a link to recover from a failure, and the network's
robustness in a catastrophe.
Security Network security issues include protecting data from unauthorized access,
protecting data from damage and development, and implementing policies and
procedures for recovery from breaches and data losses.
Advantages of computer network
A network is very useful for connection and communication purposes. Not just that, it
also has many other advantages. Below are some of the prominent ones:
• Ease of accessibility
• Flexibility
• Faster Problem-solving
• Convenient resource sharing
• Connectivity
• Security
• Great storage capacity
• Reliability
Disadvantages of computer networks
Various disadvantages include:

13
• Lack of robustness
The connected systems on a network entirely depend on the main server. In case if the
server breakdown, the system cannot be used anymore.
Not only the main server, if the problem lies on the central server or the bridging device
the entire network will be failing. That is the reason why most of the large organizations
tend to keep their central server as a powerful computer, which makes the
implementation and maintenance easy.
• Spread of computer virus
• Cost of the network
• Dependency
• Implementation
• Lack of Productivity
• Health issues
1.8.1 Network Types

Computer networks are categorized based on geographical areas and architecture.

Geographical Area

Generally, networks are distinguished based on their geographical span. A network can
be as small as distance between your mobile phone and its Bluetooth headphone and as
large as the internet itself, covering the whole geographical world.

PAN

A Personal Area Network (PAN) is smallest network which is very personal to a user.
This may include Bluetooth enabled devices or infra-red enabled devices. PAN has
connectivity range up to 10 meters. PAN may include wireless computer keyboard and
mouse, Bluetooth enabled headphones, wireless printers and TV remotes.

For example, Piconet is Bluetooth-enabled Personal Area Network, which may contain
up to 8 devices connected together in a master-slave fashion.

14
LAN

A computer network spanned inside a building and operated under single administrative
system is generally termed as Local Area Network (LAN). Usually, LAN covers an
organization’ offices, schools, colleges or universities. Number of systems connected in
LAN may vary from as least as two to as much as 16 million.

LAN provides a useful way of sharing the resources between end users. The resources
such as printers, file servers, scanners, and internet are easily sharable among computers.

LANs are composed of inexpensive networking and routing equipment. It may contains
local servers serving file storage and other locally shared applications. It mostly operates
on private IP addresses and does not involve heavy routing. LAN works under its own
local domain and controlled centrally.

LAN uses either Ethernet or Token-ring technology. Ethernet is most widely employed
LAN technology and uses Star topology, while Token-ring is rarely seen. LAN can be
wired, wireless, or in both forms at once.

A local area network (LAN) is a group of computers and associated devices that share a
common communications line or wireless link to a server. Typically, a LAN encompasses
computers and peripherals connected to a server within a distinct geographic area such as
an office or a commercial establishment. Computers and other mobile devices use a LAN
connection to share resources such as a printer or network storage. A local area network

15
may serve as few as two or three users (for example, in a small-office network) or several
hundred users in a larger office.

LAN networking comprises cables, switches, routers and other components that let users
connect to internal servers, websites and other LANs via wide area networks. Ethernet
and Wi-Fi are the two primary ways to enable LAN connections. Ethernet is a
specification that enables computers to communicate with each other. Wi-Fi uses radio
waves to connect computers to the LAN. Other LAN technologies, including Token
Ring, Fiber Distributed Data Interface and ARCNET, have lost favor as Ethernet and Wi-
Fi speeds have increased.

The rise of virtualization has fueled the development of virtual LANs, which allows
network administrators to logically group network nodes and partition their networks
without the need for major infrastructure changes. Typically, a suite of application
programs can be kept on the LAN server. Users who need an application frequently can
download it once and then run it from their local device. Users can order printing and
other services as needed through applications run on the LAN server. A user can share
files with others stored on the LAN server; read and write access is maintained by a
network administrator.

Local Area Network (LAN) provides data communication within shorter distance and
connects several devices such as computers and printers.

• This type of network contains computers that are relatively closer and are
physically connected with cables and wireless media.
• Any network that exists within a single building, or even a group of adjacent
buildings, is considered as LAN.
• Local Area Network is a group of computers connected to each other in a small area
such as building, office.
• LAN is used for connecting two or more personal computers through a
communication medium such as twisted pair, coaxial cable, etc.
• It is less costly as it is built with inexpensive hardware such as hubs, network
adapters, and Ethernet cables.
• The data is transferred at an extremely faster rate in Local Area Network.
• Local Area Network provides higher security.

16
MAN

A metropolitan area network (MAN) is a computer network that connects computers


within a metropolitan area, which could be a single large city, multiple cities and towns,
or any given large area with multiple buildings.
A MAN is larger than a local area network (LAN) but smaller than a wide area network
(WAN)
 A metropolitan area network is a network that covers a larger geographic area by
interconnecting a different LAN to form a larger network.
 Government agencies use MAN to connect to the citizens and private industries.
 In MAN, various LANs are connected to each other through a telephone exchange
line.
 Uses Of Metropolitan Area Network:
• MAN is used in communication between the banks in a city.
• It can be used in an Airline Reservation.
• It can be used in a college within a city.
• It can also be used for communication in the military

Metropolitan Area Network (MAN) is an extensive network that connects numerous


corporate LANs together. Usually MANs are not owned by sole organization. A group or
single network provider that sells its networking services to corporate customers
maintains their communication devices and equipment.

17
WAN
• Wide Area Network is connecting two or more LANs together, generally across a
wide geographical area.
• A Wide Area Network is a network that extends over a large geographical area
such as states or countries.
• A Wide Area Network is quite bigger network than the LAN.
• A Wide Area Network is not limited to a single location, but it spans over a large
geographical area through a telephone line, fiber optic cable or satellite links.
• A Wide Area Network is widely used in the field of Business, government, and
education.
• The internet is one of the biggest WAN in the world.

Examples of Wide Area Network:

• Mobile Broadband: A 4G network is widely used across a region or country.

• Last mile: A telecom company is used to provide the internet services to the customers
in hundreds of cities by connecting their home with fiber.

Advantages of Wide Area Network:

• Geographical area

• Centralized data

• Get updated files

18
• Exchange messages

• Sharing of software and resources: In WAN network, we can share the software and
other resources like a hard drive, RAM.

• Global business: We can do the business over the internet globally.

Example:-A company may have its corporate headquarters and manufacturing plant
located in one city and marketing office in another city. Each site needs resources, data
and programs locally, but it also needs to share data with other sites. To accomplish this,
the company can attach devices that connect over public utilities to create a WAN.

Disadvantages of Wide Area Network:

• Security issue
• Needs Firewall & antivirus software
• High Setup cost
• Troubleshooting problems
1.8.2 Architecture

Based on network design, a computer network can be divided into the following two types:

1.8.2.1 Peer-to-Peer
The peer to peer network is a computer group or a group of computer systems that are
connected through the internet. It allows direct sharing of the files between the network
systems without any need for a central server. The network form is common in small
offices that do not need a file server that is dedicated for use
Some of the characteristics are:
• The Peer-to-Peer network is also called P2P or computer-to-computer network. 'Peers'
are the nodes or computer system which are connected to each other.

• A peer to peer network has no dedicated servers. In a peer to peer network, a number of
workstations (or clients) are connected together for sharing devices, information or data.
All the workstations (clients) are considered equal. Any one computer can act as client or
server at any instance.

19
• This network is ideal for small networks where there is no need for dedicated servers,
like home networks, small business networks, or retail shops.

• A peer-to-peer network can be configured as both wired as well as a wireless network.


It is most commonly used in the Local Area Network, especially in small offices, or
within a single department of a large organization.

• The nodes present in the network are situated very near to each other. Each node has
access to devices and files on other computers and can store independently its own
software and information.

Advantages of using a peer-to-peer network:

• Easy to implement and manage.


• Nodes or workstations are independent of one another. Also, no access permissions are
needed.
• The network is reliable in nature. If a peer fails, it will not affect the working of others.
• There is no need for any professional software in such kind of networks.
• The cost of implementation of such networks is very less.
Disadvantages of using a peer-to-peer network:

• Storage is decentralized, and also not so efficiently managed.

• No data backup options are available in peer-to-peer networks.

• These kinds of networks are not so secure.

20
1.8.2.2 Client/server
A client server network includes many clients or workstations that are connected to at
least one central server. Most of the data and the applications get installed on the server.
When the client wants access to the resources they then access it from the server. The
server mostly has a private user directory as well as many public directories. The client
server network has faster speed access because these are designed to support several
clients. The client functions as a workstation without sharing any of the resources.
Some of the characteristics:
• A Server-Based network can also be termed as a Client-Server network.
• A server is a node that acts as a service provider for clients. They wait for client
requests and then respond to them.
• The server is located elsewhere on the network, usually on a more powerful
machine. Here, the server is the central location where users share and access
network resources.
• It controls the level of access that users have to share resources. In other words, a
server provides functionality and serve other programs called clients.
A client is a computer hardware device or software that accesses a service made available
by a server. The server is often (but not always) located on a separate physical computer.
A server is a physical computer dedicated to run services to serve the needs of other
computers. Depending on the service that is running, it could be a file server, database
server, home media server, print server, or web server.
A host is a computer, connected to other computers for which it provides data or services
over a network. In theory, every computer connected to a network acts as a host to other
peers on the network. In essence, a host reflects the logical relationship of two or more
computers on a network.

21
Different types of servers used in client server based networks are listed below.
File Server: File servers are used to store the user documents and files centrally. An ideal
file server should have a large amount of memory and storage space, fast hard-disks,
multiple processors, fast network adapters, redundant power supplies etc.
Print Server: Print Server, which redirects print jobs from client computers to specific
printers.
Mail Server: Mail Servers are used to transmit emails using email protocols. Most
widely used email transmission protocol is SMTP (Simple Mail Transfer Protocol). Mail
Servers exchange emails between different domains.
Application Server: Common computer applications or programs which are required by
different network users can be run in a central server, which enables multiple network
users to access common network applications from the network.
Database Server: Database Server allows authorized network clients to create, view,
modify and/or delete an organization's data, stored in a common database.
Directory Servers: Directory Servers allows the central administration and management
of network users and network resources. It provide the basic functions of network
security Such as Authentication and Authorization.
 The Server-based network can be applied for various uses and applications. Some
of them are as follows:
 Centralization:
 Proper Management:

22
 Backup and Recovery:
 Upgradation and Scalability:
 Accessibility:
 Security:
Advantages of using a server-based network:
• It facilitates a Centralized storage system.
• Centralization makes administration easy.
• Data can be easily backed in such networks.
• The network is easy to scale.
• Data sharing speed is high.
• Servers can serve multiple clients at a time.
Disadvantages of using a server-based network:
• Dependency is more on a centralized server.
• If the server's data is corrupted, all nodes will be affected.
• A network administrator is required.
• The cost of the server and network software is very high

BASIS FOR COMAPAISON CLIENT-SERVER PEER-TO-PEER


Basic There is a specific server and Clients and server are not
specific clients connected to the distinguished; each node act as
server. client and server.
Service The client request for service and Each node can request for
server respond with the service. services and can also provide the
services.
Focus Sharing the information. Connectivity.
Data The data is stored in a centralized Each peer has its own data.
server.
Server When several clients request for As the services are provided by
the services simultaneously, a several servers distributed in the
server can get bottlenecked. peer-to-peer system, a server in
not bottlenecked.
Expense The client-server are expensive to Peer-to-peer are less expensive to
implement. implement.

23
Stability Client-Server is more stable and Peer-to Peer suffers if the number
scalable. of peers increases in the system.
1.8.3 Network Components

Computer networks components comprise both physical parts as well as the software
required for installing computer networks, both at organizations and at home. The
hardware components are the server, client, peer, transmission medium, and connecting
devices. The software components are operating system and protocols.

1.8.3.1 Hardware Components

 Servers: Servers are high-configuration computers that manage the resources of


the network. The network operating system is typically installed in the server and
so they give user accesses to the network resources. Servers can be of various
kinds: file servers, database servers, print servers etc.

 Clients: Clients are computers that request and receive service from the servers to
access and use the network resources.

 Peers: Peers are computers that provide as well as receive services from other
peers in a workgroup network.

 Transmission Media: Transmission media are the channels through which data is
transferred from one device to another in a network. Transmission media may be
guided media like coaxial cable, fiber optic cables etc; or maybe unguided media
like microwaves, infra-red waves etc.

 Connecting Devices: Connecting devices act as middleware between networks or


computers, by binding the network media together. Some of the common
connecting devices are:

Network interface card

The Network Interface Card (NIC), also known as a network adaptor, acts as the
interface between the computer and the physical network connection. In most networks,
every computer must have a network interface card to be able to connect to the network.

24
NICs are usually specific to a particular type of cabling – for example, a NIC may have
either an RJ45 connector or a BNC connector – although it is possible to get combo
cards, which include more than one type of connector.
Transceivers: A transceiver is a networking device that converts from one cabling
technology to another. For example, a transceiver may act as an interface between a
network based on coaxial cable and one using fiber-optic cable.

Repeater: In a bus topology, signal loss can occur if the segments are too long. A
repeater is a device that connects two network segments and broadcasts data between
them. It amplifies the signal, thereby extending the usable length of the bus.
Hub: One network component that has become standard equipment in networks is the
hub. A hub acts as the central component in a star topology, and typically contains 4, 8,
16 or even more different ports for connecting to computers or other hubs. It is similar in
operation to a repeater, except that it broadcasts data received by any of the ports to all
other ports on the hub. Hubs can be active, passive or hybrid.

Most hubs are active; that is, they regenerate and retransmit signals in the same way as a
repeater does. Because hubs usually have eight to twelve ports for network computers to
connect to, they are sometimes called multiport repeaters. Active hubs require electrical
power to run. Some types of hubs are passive. They act as connection points and do not
amplify or regenerate the signal; the signal passes through the hub. Passive hubs do not
require electrical power to run. Advanced hubs that will accommodate several different
types of cables are called hybrid hubs.

Bridges, switches and routers

For large networks, it is often necessary to partition it into smaller groups of nodes to
help isolate traffic and improve performance. A bridge is a device that acts as an interface
between two sets of nodes. For example, if a company’s network has been partitioned
into two subnets, for the sales department and administration department respectively, a
bridge will be placed between the two networks. If a computer on the sales subnet sends
data to another computer on the sales subnet, the bridge will not pass on the data to the
administration subnet. However, if the same computer sends data to a computer on the

25
administration subnet, it will be forwarded by the bridge. Because not all data is passed
onto the other subnet, network traffic is reduced.
A switch is similar to a bridge, except that it has multiple ports. A switch can also be seen
as a more intelligent hub – whereas a hub passes on all data to every port, a switch will
only pass data on to the port that it is intended for.

A router is also used for connecting networks together. However, unlike a bridge, a
router can be used to connect networks that use different network technologies. Routers
are very commonly found in the hardware infrastructure that forms the basis of the
Internet.

1.8.3.2 Software Components

Networking Operating System − Network Operating Systems is typically installed in the


server and facilitate workstations in a network to share files, database, applications,
printers etc.

Protocol Suite − A protocol is a rule or guideline followed by each computer for data
communication. Protocol suite is a set of related protocols that are laid down for
computer networks. The two popular protocol suites are − OSI model and TCP/IP
model

1.8.4 Network Topology

The network topology is a structure or the physical arrangement of the network devices,
how the components of the network are interconnected with each other.

Bus Topology
The bus topology is designed in such a way that all the stations are connected through a
single cable known as a backbone cable.
Each node is either connected to the backbone cable by drop cable or directly connected
to the backbone cable.
When a node wants to send a message over the network, it puts a message over the
network. All the stations available in the network will receive the message whether it has
been addressed or not.

26
 The bus topology is mainly used in 802.3 (Ethernet) and 802.4 standard
networks.
 The configuration of a bus topology is quite simpler as compared to other
topologies.
 The backbone cable is considered as a "single lane" through which the message is
broadcast to all the stations.
The most common access method of the bus topologies is CSMA (Carrier Sense Multiple
Access).
CSMA: It is a media access control used to control the data flow so that data integrity is
maintained, i.e., the packets do not get lost. There are two alternative ways of handling
the problems that occur when two nodes send the messages simultaneously.
CSMA CD: CSMA CD (Collision detection) is an access method used to detect the
collision. Once the collision is detected, the sender will stop transmitting the data.
Therefore, it works on "recovery after the collision".
CSMA CA: CSMA CA (Collision Avoidance) is an access method used to avoid the
collision by checking whether the transmission media is busy or not. If busy, then the
sender waits until the media becomes idle. This technique effectively reduces the
possibility of the collision. It does not work on "recovery after the collision".

Advantages of Bus topology:


 Low-cost cable: In bus topology, nodes are directly connected to the cable
without passing through a hub. Therefore, the initial cost of installation is low.
 Moderate data speeds: Coaxial or twisted pair cables are mainly used in bus-based
networks that support upto 10 Mbps.

27
 Familiar technology: Bus topology is a familiar technology as the installation and
troubleshooting techniques are well known, and hardware components are easily
available.
 Limited failure: A failure in one node will not have any effect on other nodes.
Disadvantages of Bus topology:
 Extensive cabling: A bus topology is quite simpler, but still it requires a lot of
cabling.
 Difficult troubleshooting: It requires specialized test equipment to determine the
cable faults. If any fault occurs in the cable, then it would disrupt the
communication for all the nodes.
 Signal interference: If two nodes send the messages simultaneously, then the
signals of both the nodes collide with each other.
 Reconfiguration difficult: Adding new devices to the network would slow down
the network.
 Attenuation: Attenuation is a loss of signal leads to communication issues.
Repeaters are used to regenerate the signal.
Star Topology: Star topology is an arrangement of the network in which every node is
connected to the central hub, switch or a central computer.
 The central computer is known as a server, and the peripheral devices attached to
the server are known as clients.
 Coaxial cable or RJ-45 cables are used to connect the computers.
 Hubs or Switches are mainly used as connection devices in a physical star
topology.
 Star topology is the most popular topology in network implementation.
Advantages of Star topology
 Efficient troubleshooting: Troubleshooting is quite efficient in a star topology as
compared to bus topology. In a bus topology, the manager has to inspect the
kilometers of cable. In a star topology, all the stations are connected to the
centralized network. Therefore, the network administrator has to go to the single
station to troubleshoot the problem.

28
 Network control: Complex network control features can be easily implemented in
the star topology. Any changes made in the star topology are automatically
accommodated.
 Limited failure: As each station is connected to the central hub with its own cable,
therefore failure in one cable will not affect the entire network.
 Familiar technology: Star topology is a familiar technology as its tools are cost-
effective.
 Easily expandable: It is easily expandable as new stations can be added to the
open ports on the hub.
 Cost effective: Star topology networks are cost-effective as it uses inexpensive
coaxial cable.
 High data speeds: It supports a bandwidth of approximately 100Mbps. Ethernet
100BaseT is one of the most popular Star topology networks.
Disadvantages of Star topology
 A Central point of failure: If the central hub or switch goes down, then all the
connected nodes will not be able to communicate with each other.
 Cable: Sometimes cable routing becomes difficult when a significant amount of
routing is required.

Ring Topology
 Ring topology is like a bus topology, but with connected ends.

29
 The node that receives the message from the previous computer will retransmit to
the next node.
 The data flows in one direction, i.e., it is unidirectional.
 The data flows in a single loop continuously known as an endless loop.
 It has no terminated ends, i.e., each node is connected to other node and having no
termination point.
 The data in a ring topology flow in a clockwise direction.
The most common access method of the ring topology is token passing.
Token passing: It is a network access method in which token is passed from one node to
another node.
Token: It is a frame that circulates around the network.
How Token passing Works
A token moves around the network, and it is passed from computer to computer until it
reaches the destination.
The sender modifies the token by putting the address along with the data.
The data is passed from one device to another device until the destination address
matches. Once the token received by the destination device, then it sends the
acknowledgment to the sender.
In a ring topology, a token is used as a carrier.
Advantages of Ring topology:
 Network Management: Faulty devices can be removed from the network without
bringing the network down.
 Product availability: Many hardware and software tools for network operation and
monitoring are available.
 Cost: Twisted pair cabling is inexpensive and easily available. Therefore, the
installation cost is very low.
 Reliable: It is a more reliable network because the communication system is not
dependent on the single host computer.
Disadvantages of Ring topology:

30
 Difficult troubleshooting: It requires specialized test equipment to determine the
cable faults. If any fault occurs in the cable, then it would disrupt the
communication for all the nodes.
 Failure: The breakdown in one station leads to the failure of the overall network.
 Reconfiguration difficult: Adding new devices to the network would slow down
the network.
 Delay: Communication delay is directly proportional to the number of nodes.
Adding new devices increases the communication delay.
Mesh Topology
In this type of topology, a host is connected to one or multiple hosts. This topology has
hosts in point-to-point connection with every other host or may also have hosts which are
in point-to-point connection with few hosts only.

Hosts in Mesh topology also work as relay for other hosts, which do not have direct
point-to-point links. Mesh technology comes into two types:
Full Mesh: All hosts have a point-to-point connection to every other host in the network.
Thus for every new host n(n-1)/2 connections are required. It provides the most reliable
network structure among all network topologies.
Partially Mesh: Not all hosts have point-to-point connection to every other host. Hosts
connect to each other in some arbitrarily fashion. This topology exists where we need to
provide reliability to some hosts out of all.

31
Tree Topology:
Also known as Hierarchical Topology, this is the most common form of network
topology in use presently. This topology imitates as extended Star topology and inherits
properties of Bus topology.
This topology divides the network into multiple levels/layers of network. Mainly in
LANs, a network is bifurcated into three types of network devices.
The lowermost is access-layer where computers are attached.
The middle layer is known as distribution layer, which works as mediator between upper
layer and lower layer.
The highest layer is known as core layer, and is central point of the network, i.e. root of
the tree from which all nodes fork.

All neighboring hosts have point-to-point connection between them. Similar to the Bus
topology, if the root goes down, then the entire network suffers even though it is not the
single point of failure. Every connection serves as point of failure, failing of which
divides the network into unreachable segment.
Hybrid Topology
The combination of various different topologies is known as Hybrid topology.
A Hybrid topology is a connection between different links and nodes to transfer the data.
When two or more different topologies are combined together is termed as Hybrid
topology and if similar topologies are connected with each other will not result in Hybrid

32
topology. For example, if there exist a ring topology in one branch of ICICI bank and bus
topology in another branch of ICICI bank, connecting these two topologies will result in
Hybrid topology.
Advantages of Hybrid Topology
 Reliable: If a fault occurs in any part of the network will not affect the functioning of
the rest of the network.
 Scalable: Size of the network can be easily expanded by adding new devices without
affecting the functionality of the existing network.
 Flexible: This topology is very flexible as it can be designed according to the
requirements of the organization.
 Effective: Hybrid topology is very effective as it can be designed in such a way that
the strength of the network is maximized and weakness of the network is minimized.
Disadvantages of Hybrid topology
 Complex design: The major drawback of the Hybrid topology is the design of the
Hybrid network. It is very difficult to design the architecture of the Hybrid network.
 Costly Hub: The Hubs used in the Hybrid topology are very expensive as these hubs
are different from usual Hubs used in other topologies.
 Costly infrastructure: The infrastructure cost is very high as a hybrid network
requires a lot of cabling, network devices, etc.

1.9 Transmission Media

 Transmission media are actually located below the physical layer and are directly
controlled by the physical layer. You could say that transmission media belong to
layer zero.
 Transmission medium refers to the physical path of data between transmitter and
receiver.
 A transmission medium can be broadly defined as anything that can carry
information from a source to a destination
 In wired media, medium characteristics are more important whereas, in wireless
media, signal characteristics are more important.

33
 Different transmission media have different properties such as bandwidth, delay,
cost and ease of installation and maintenance.
Some factors need to be considered for designing the transmission media
 Bandwidth: All the factors are remaining constant, the greater the bandwidth of a
medium, the higher the data transmission rate of a signal.
 Transmission impairment: When the received signal is not identical to the
transmitted one due to the transmission impairment. The quality of the signals
will get destroyed due to transmission impairment.
 Interference: An interference is defined as the process of disrupting a signal
when it travels over a communication medium on the addition of some unwanted
signal.
 In telecommunications, transmission media can be divided into two broad
categories:
 Guided (wired) transmission media
 Twisted pair cable
 Coaxial cable
 Fiber optics cable
 Unguided (wireless) transmission media
 Microwave (Terrestrial Microwave)
 Satellite Microwave
 Infrared
1.9.1 Guided Media
Guided media, which are those that provide a conduit from one device to another, include
twisted-pair cable, coaxial cable, and fiber-optic cable. A signal traveling along any of
these media is directed and contained by the physical limits of the medium. Twisted-pair
and coaxial cable use metallic (copper) conductors that accept and transport signals in the
form of electric current. Optical fiber is a cable that accepts and transports signals in the
form of light.
1. Twisted Pair Cable
A twisted pair consists of two conductors (normally copper), each with its own plastic
insulation, twisted together.

34
One of the wires is used to carry signals to the receiver, and the other is used only as a
ground reference. The receiver uses the difference between the two. In addition to the
signal sent by the sender on one of the wires, interference (noise) and crosstalk may
affect both wires and create unwanted signals. If the two wires are parallel, the effect of
these unwanted signals is not the same in both wires because they are at different
locations relative to the noise or crosstalk sources (e,g., one is closer and the other is
farther). This results in a difference at the receiver. By twisting the pairs, a balance is
maintained.
For example, suppose in one twist, one wire is closer to the noise source and the other is
farther; in the next twist, the reverse is true.
Twisting makes it probable that both wires are equally affected by external influences
(noise or crosstalk). This means that the receiver, which calculates the difference between
the two, receives no unwanted signals. The unwanted signals are mostly canceled out.
From the above discussion, it is clear that the number of twists per unit of length (e.g.,
inch) has some effect on the quality of the cable.

Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted
pair cable is from 0 to 3.5 KHz. A twisted pair consists of two insulated copper wires
arranged in a regular spiral pattern.

35
The degree of reduction in noise interference is determined by the number of turns per
foot. Increasing the number of turns per foot decreases noise interference.
Types of Twisted pair
There are two types of twisted pair:
A. Unshielded Twisted Pair
 It’s the most is widely used in telecommunication.
 It has four pairs of wires inside the jacket.
 Each pair is twisted with a different number of twists per inch to help eliminate
interference from adjacent pairs and other electrical devices.
 The tighter the twisting, the higher the supported transmission rate and the greater
the cost.
 Twisted pair wiring, regardless of the category or type, uses separate physical
wires for the positive and negative leads of the transmit and receive function.
 For two devices to communicate, they must agree on which device (or devices) is
to transmit and is to receive on which wire leads.
Following are the categories of the unshielded twisted pair cable:
 Category 1: Category 1 is used for telephone lines that have low-speed data.
 Category 2: It can support up to 4Mbps.
 Category 3: It can support up to 16Mbps.
 Category 4: It can support up to 20Mbps. Therefore, it can be used for long-
distance communication.
 Category 5: It can support up to 200Mbps.
Advantages of Unshielded Twisted Pair:
 It is cheap.
 Installation of the unshielded twisted pair is easy.
 It can be used for high-speed LAN.
Disadvantage:
 This cable can only be used for shorter distances because of attenuation.

36
B. Shielded Twisted Pair
A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows
the higher transmission rate.
Characteristics of Shielded Twisted Pair:
 The cost of the shielded twisted pair cable is not very high and not very low.
 An installation of STP is easy.
 It has higher capacity as compared to unshielded twisted pair cable.
 It has a higher attenuation.
 It is shielded that provides the higher data transmission rate.
Disadvantages
 It is more expensive as compared to UTP and coaxial cable.
 It has a higher attenuation rate.

37
2. Coaxial Cable
 Coaxial cable is very commonly used transmission media, for example, TV wire
is usually a coaxial cable.
 The name of the cable is coaxial as it contains two conductors parallel to each
other.
 It has a higher frequency as compared to Twisted pair cable.
 The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-
conductive cover that separates the inner conductor from the outer conductor.
 The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI (Electromagnetic interference).

Coaxial cable is of two types:


1. Baseband transmission: It is defined as the process of transmitting a single signal at
high speed.
2. Broadband transmission: It is defined as the process of transmitting multiple signals
simultaneously.
Advantages of Coaxial cable:

38
 The data can be transmitted at high speed.
 It has better shielding as compared to twisted pair cable.
 It provides higher bandwidth.
Disadvantages of Coaxial cable:
 It is more expensive as compared to twisted pair cable.
 If any fault occurs in the cable causes the failure in the entire network.
3. Fiber Optic
 Fiber optic cable is a cable that uses electrical signals for communication.
 Fiber optic is a cable that holds the optical fibers coated in plastic that are used to
send the data by pulses of light.
 The plastic coating protects the optical fibers from heat, cold, electromagnetic
interference from other types of wiring.
 Fiber optics provide faster data transmission than copper wires.
Diagrammatic representation of fiber optic cable:

Basic elements of Fiber optic cable:


 Core: The optical fiber consists of a narrow strand of glass or plastic known as a
core. A core is a light transmission area of the fiber. The more the area of the core,
the lighter will be transmitted into the fiber.
 Cladding: The concentric layer of glass is known as cladding. The main
functionality of the cladding is to provide the lower refractive index at the core
interface as to cause the reflection within the core so that the light waves are
transmitted through the fiber.

39
 Jacket: The protective coating consisting of plastic is known as a jacket. The main
purpose of a jacket is to preserve the fiber strength, absorb shock and extra fiber
protection.
Following are the advantages of fiber optic cable over copper:
 Greater Bandwidth: The fiber optic cable provides more bandwidth as compared
copper. Therefore, the fiber optic carries more data as compared to copper cable.
 Faster speed: Fiber optic cable carries the data in the form of light. This allows the
fiber optic cable to carry the signals at a higher speed.
 Longer distances: The fiber optic cable carries the data at a longer distance as
compared to copper cable.
 Better reliability: The fiber optic cable is more reliable than the copper cable as it is
immune to any temperature changes while it can cause obstruct in the connectivity
of copper cable.
 Thinner and Sturdier: Fiber optic cable is thinner and lighter in weight so it can
withstand more pull pressure than copper cable.
Disadvantages of optical fiber
 Installation and maintenance: Fiber-optic cable is a relatively new technology. Its
installation and maintenance require expertise that is not yet available everywhere.
 Unidirectional light propagation: Propagation of light is unidirectional. If we
need bidirectional communication, two fibers are needed.
 Cost: The cable and the interfaces are relatively more expensive than those of other
guided media. If the demand for bandwidth is not high, often the use of optical fiber
cannot be justified.
1.9.2 Unguided Transmission
 An unguided transmission transmits the electromagnetic waves without using any
physical medium. Therefore it is also known as wireless transmission.
 In unguided media, air is the media through which the electromagnetic energy can
flow easily.
Unguided transmission is broadly classified into three categories:
1. Radio waves

40
 Radio waves are the electromagnetic waves that are transmitted in all the
directions of free space.
 Radio waves are omnidirectional, i.e., the signals are propagated in all the
directions.
 The range in frequencies of radio waves is from 3 KHz to 1 kHz.
 In the case of radio waves, the sending and receiving antenna are not aligned, i.e.,
the wave sent by the sending antenna can be received by any receiving antenna.
 An example of the radio wave is FM radio.

Applications of Radio waves:


 A Radio wave is useful for multicasting when there is one sender and many
receivers.
 An FM radio, television, cordless phones are examples of a radio wave.
Advantages of Radio transmission:
 Radio transmission is mainly used for wide area networks and mobile cellular
phones.
 Radio waves cover a large area, and they can penetrate the walls.
 Radio transmission provides a higher transmission rate.
2. Microwaves
Microwaves are of two types:

 Terrestrial microwave
 Satellite microwave communication.
Terrestrial Microwave Transmission

41
 Terrestrial Microwave transmission is a technology that transmits the focused
beam of a radio signal from one ground-based microwave transmission antenna
to another.
 Microwaves are the electromagnetic waves having the frequency in the range
from 1GHz to 1000 GHz.
 Microwaves are unidirectional as the sending and receiving antenna is to be
aligned, i.e., the waves sent by the sending antenna are narrowly focused.
 In this case, antennas are mounted on the towers to send a beam to another
antenna, which is km away.
 It works on the line of sight transmission, i.e., the antennas mounted on the
towers are the direct sight of each other.
Characteristics of Microwave:
 Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz
to 21-23 GHz.
 Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
 Short distance: It is inexpensive for short distance.
 Long distance: It is expensive as it requires a higher tower for a longer distance.
 Attenuation: Attenuation means loss of signal. It is affected by environmental
conditions and antenna size.
Advantages of Microwave:
 Microwave transmission is cheaper than using cables.
 It is free from land acquisition as it does not require any land for the installation of
cables.
 Microwave transmission provides an easy communication in terrains as the
installation of cable in terrain is quite a difficult task.
 Communication over oceans can be achieved by using microwave transmission.
Disadvantages of Microwave transmission:
 Eavesdropping: An eavesdropping creates insecure communication. Any malicious
user can catch the signal in the air by using its own antenna.
 Out of phase signal: A signal can be moved out of phase by using microwave
transmission.

42
 Susceptible to weather condition: A microwave transmission is susceptible to
weather condition. This means that any environmental change such as rain, wind can
distort the signal.
 Bandwidth limited: Allocation of bandwidth is limited in the case of microwave
transmission.
Satellite Microwave Communication
 A satellite is a physical object that revolves around the earth at a known height.
 Satellite communication is more reliable nowadays as it offers more flexibility
than cable and fiber optic systems.
 We can communicate with any point on the globe by using satellite
communication.
How Does Satellite work?
The satellite accepts the signal that is transmitted from the earth station, and it amplifies
the signal. The amplified signal is retransmitted to another earth station.
Advantages of Satellite Microwave Communication:
 The coverage area of a satellite microwave is more than the terrestrial microwave.
 The transmission cost of the satellite is independent of the distance from the
center of the coverage area.
 Satellite communication is used in mobile and wireless communication
applications.
 It is easy to install.
 It is used in a wide variety of applications such as weather forecasting, radio/TV
signal broadcasting, mobile communication, etc.
Disadvantages of Satellite Microwave Communication:
 Satellite designing and development requires more time and higher cost.
 The Satellite needs to be monitored and controlled on regular periods so that it
remains in orbit.
 The life of the satellite is about 12-15 years. Due to this reason, another launch of
the satellite has to be planned before it becomes non-functional.

43
Infrared
 An infrared transmission is a wireless technology used for communication over
short ranges.
 The frequency of the infrared transmission in the range from 300 GHz to 400
THz.
 It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone
resides in the same closed area.
Characteristics of Infrared transmission:
 It supports high bandwidth, and hence the data rate will be very high.
 Infrared waves cannot penetrate the walls. Therefore, the infrared communication
in one room cannot be interrupted by the nearby rooms.
 An infrared communication provides better security with minimum interference.

Infrared communication is unreliable outside the building because the sun rays will
interfere with the infrared waves.

Review Questions
 What is computer network?
 What is data communication means?
 What is the Purpose of Computer network?
 Discuss about the network topologies with its advantage and disadvantage
 Discuss and list some examples of transmission mode?
 Explain in details about parallel and serial data transmission mode?
 Discuss on the unguided transmission media using examples?
 Discus some common guided transmission medium with examples?

44
Chapter 2: LAYERED MODELS

2.1 Introduction

We use the concept of layers in our daily life. As an example, let us consider two friends
who communicate through postal mail. The process of sending a letter to a friend
would be complex if there were no services available from the post office.

Tasks involved in sending a letter:

Each layer at the sending site uses the services of the layer immediately below
it. The sender at the higher layer uses the services of the middle layer. The
middle layer uses the services of the lower layer. The lower layer uses the services of
the carrier.

45
2.2 The OSI model

Established in 1947, the International Standards Organization (ISO) is a


multinational body dedicated to worldwide agreement on international standards.
An ISO standard that covers all aspects of network communications is the Open
Systems Interconnection model. It was first introduced in the late 1970s. An open
system is a set of protocols that allows any two different systems to communicate
regardless of their underlying architecture. The purpose of the OSI model is to
show how to facilitate communication between different systems without requiring
changes to the logic of the underlying hardware and software. The OSI model is not
a protocol; it is a model for understanding and designing a network architecture
that is flexible, robust, and interoperable.
The OSI model is a layered framework for the design of network
systems that allows communication between all types of computer systems. It consists
of seven separate but related layers, each of which defines a part of the
process of moving information across a network. An understanding of the
fundamentals of the OSI model provides a solid basis for exploring data
communications.

46
Within a single machine, each layer calls upon the services of the layer
just below it. Layer 3, for example, uses the services provided by layer 2 and
provides services for layer 4. Between machines, layer x on one machine
communicates with layer x on another machine. This communication is governed
by an agreed-upon series of rules and conventions called protocols. The processes
on each machine that communicate at a given layer are called peer-to-peer
processes. Communication between machines is therefore a peer-to-peer process
using the protocols appropriate to a given layer.

 OSI stands for Open System Interconnection is a reference model that


describes how information from a software application in one computer moves
through a physical medium to the software application in another computer.
 OSI consists of seven layers, and each layer performs a particular network
function.

47
 OSI model was developed by the International Organization for Standardization
(ISO) in 1984, and it is now considered as an architectural model for the inter-
computer communications.
 OSI model divides the whole task into seven smaller and manageable tasks.
Each layer is assigned a particular task.

 Each layer is self-contained, so that task assigned to each layer can be


performed independently.

Organization of the Layers

 The OSI model is divided into two layers: upper layers and lower layers.
 The upper layer of the OSI model mainly deals with the application related
issues, and they are implemented only in the software.
 The application layer is closest to the end user. Both the end user and the
application layer interact with the software applications.
 An upper layer refers to the layer just above another layer.
 The lower layer of the OSI model deals with the data transport issues.
 The data link layer and the physical layer are implemented in hardware and
software.
 The physical layer is the lowest layer of the OSI model and is closest to the
physical medium.
 The physical layer is mainly responsible for placing the information on the
physical medium.
The seven layers can be thought of as belonging to three subgroups. Layers I, 2, and 3-
physical, data link, and network-are the network support layers; they deal with the
physical aspects of moving data from one device to another (such as electrical
specifications, physical connections, physical addressing, and transport timing and
reliability). Layers 5, 6, and 7-session, presentation, and application-can be thought
of as the user support layers; they allow interoperability among unrelated software
systems. Layer 4, the transport layer, links the two subgroups and ensures that what the
lower layers have transmitted is in a form that the upper layers can use. The upper OSI

48
layers are almost always implemented in software; lower layers are a combination of
hardware and software, except for the physical layer, which is mostly hardware.

In Figure below, which gives an overall view of the OSI layers, D7 means the data unit at
layer 7, D6 means the data unit at layer 6, and so on. The process starts at layer 7 (the
application layer), then moves from layer to layer in descending, sequential order. At
each layer, a header, or possibly a trailer, can be added to the data unit.

Commonly, the trailer is added only at layer 2. When the formatted data unit passes
through the physical layer (layer 1), it is changed into an electromagnetic signal and
transported along a physical link.

2.3 Layers in the OSI Model

There are the seven OSI layers. Each layer has different functions. A list of seven
layers are given below:
1. Physical Layer

2. Data-Link Layer

3. Network Layer

4. Transport Layer

49
5. Session Layer

6. Presentation Layer

7. Application Layer

2.3.1 Application, Session and Presentation Layers

Application layer is the top most layer in OSI and TCP/IP layered model. This layer
exists in both layered Models because of its significance, of interacting with user and user
applications. This layer is for applications, which are involved in communication system.
It provides the users access to the network resources.

A user may or may not directly interacts with the applications. Application layer is where
the actual communication is initiated and reflects. Because this layer is on the top of the
layer stack, it does not serve any other layers. Application layer takes the help of
Transport and all layers below it to communicate or transfer its data to the remote host.

When an application layer protocol wants to communicate with its peer application layer
protocol on remote host, it hands over the data or information to the Transport layer. The
transport layer does the rest with the help of all the layers below it.

50
There is an ambiguity in understanding Application Layer and its protocol. Not every
user application can be put into Application Layer. Except those applications which
interact with the communication system. For example, designing software or text-editor
cannot be considered as application layer programs.

On the other hand, when we use a Web Browser, which is actually using Hyper Text
Transfer Protocol (HTTP) to interact with the network. HTTP is Application Layer
protocol. Another example is File Transfer Protocol, which helps a user to transfer text
based or binary files across the network. A user can use this protocol in either GUI based
software like FileZilla or CuteFTP and the same user can use FTP in Command Line
mode. Hence, irrespective of which software you use, it is the protocol, which is
considered at Application Layer used by that software. DNS is a protocol, which helps
user application protocols such as HTTP to accomplish its work.

Client-Server Model

Two remote application processes can communicate mainly in two different fashions:
 Peer-to-peer: Both remote processes are executing at same level and they
exchange data using some shared resource.

 Client-Server: One remote process acts as a Client and requests some resource
from another application process acting as Server.

In client-server model, any process can act as Server or Client. It is not the type of
machine, size of the machine, or its computing power, which makes it server; it is the
ability of serving request that makes a machine a server.

51
A system can act as Server and Client simultaneously. That is, one process is acting as
Server and another is acting as a client. This may also happen that both client and server
processes reside on the same machine.

Communication
Two processes in client-server model can interact in various ways:
 Sockets

 Remote Procedure Calls (RPC)

Sockets
In this paradigm, the process acting as Server opens a socket using a well-known port and
waits until some client request comes. The second process acting as a Client also opens a
socket but instead of waiting for an incoming request, the client processes ‘requests first’.

52
When the request is reached to server, it is served. It can either be an information sharing
or resource request.
Remote Procedure Call
This is a mechanism where one process interacts with another by means of procedure
calls. One process (client) calls the procedure lying on remote host. The process on
remote host is said to be Server. Both processes are allocated stubs. This communication
happens in the following way:

 The client process calls the client stub. It passes all the parameters pertaining to
program local to it.

 All parameters are then packed (marshalled) and a system call is made to send
them to other side of the network.

 Kernel sends the data over the network and the other end receives it.

 The remote host passes data to the server stub where it is unmarshalled.

53
 The parameters are passed to the procedure and the procedure is then executed.

 The result is sent back to the client in the same manner.

Application Protocol

There are several protocols, which work for users in Application Layer. Application layer
protocols can be broadly divided into two categories:
• Protocols that are used by users. For email for example, Email.
• Protocols that help and support protocols used by users. For example DNS. Few
of Application layer protocols are described below:

Domain Name System

The Domain Name System (DNS) works on Client Server model. It uses UDP protocol
for transport layer communication. DNS uses hierarchical domain based naming scheme.
The DNS server is configured with Fully Qualified Domain Names (FQDN) and email
addresses mapped with their respective Internet Protocol addresses. A DNS server is
requested with FQDN and it responds back with the IP address mapped with it. DNS uses
UDP port 53.

Telnet

Telnet is a protocol used to log on to remote hosts using the TCP/IP protocol suite. Using
Telnet, a TCP connection is established and keystrokes on the user’s machine act like
keystrokes on the remotely connected machine. Often, Telnet is used to connect two
dissimilar systems (such as PCs and UNIX machines).

Through Telnet, you can control a remote host over LANs and WANs such as the
Internet. For example, network managers can use Telnet to log on to a router from a
computer elsewhere on their LAN and modify the router’s configuration.

Simple Mail Transfer Protocol

The Simple Mail Transfer Protocol (SMTP) is used to transfer electronic mail from one
user to another. This task is done by means of email client software (User Agents) the

54
user is using. User Agents help the user to type and format the email and store it until
internet is available. When an email is submitted to send, the sending process is handled
by Message Transfer Agent which is normally comes inbuilt in email client software.
Message Transfer Agent uses SMTP to forward the email to another Message Transfer
Agent (Server side). While SMTP is used by end user to only send the emails, the Servers
normally use SMTP to send as well as receive emails. SMTP uses TCP port number 25
and 587.
Client software uses Internet Message Access Protocol (IMAP) or POP protocols to
receive email.
File Transfer Protocol
 The File Transfer Protocol (FTP) is the most widely used protocol for file transfer
over the network.
 FTP uses TCP/IP for communication and it works on TCP port 21. FTP works on
Client/Server Model where a client requests file from Server and server sends
requested resource back to the client.
 FTP uses out-of-band controlling i.e. FTP uses TCP port 20 for exchanging
controlling information and the actual data is sent over TCP port 21.
The client requests the server for a file. When the server receives a request for a file, it
opens a TCP connection for the client and transfers the file. After the transfer is
complete, the server closes the connection. For a second file, client requests again and the
server reopens a new TCP connection.
Post Office Protocol (POP)
The Post Office Protocol version 3 (POP 3) is a simple mail retrieval protocol used by
User Agents (client email software) to retrieve mails from mail server.
When a client needs to retrieve mails from server, it opens a connection with the server
on TCP port 110. User can then access his mails and download them to the local
computer. POP3 works in two modes. The most common mode the delete mode, is to
delete the emails from remote server after they are downloaded to local machines. The
second mode, the keep mode, does not delete the email from mail server and gives the
user an option to access mails later on mail server.

55
Hypertext Transfer Protocol (HTTP)

The Hyper Text Transfer Protocol (HTTP) is the foundation of World Wide Web.
Hypertext is well organized documentation system which uses hyperlinks to link the
pages in the text documents. HTTP works on client server model. When a user wants to
access any HTTP page on the internet, the client machine at user end initiates a TCP
connection to server on port 80. When the server accepts the client request, the client is
authorized to access web pages.

To access the web pages, a client normally uses web browsers, who are responsible for
initiating, maintaining, and closing TCP connections. HTTP is a stateless protocol,
which means the Server maintains no information about earlier requests by clients.

HTTP versions

 HTTP 1.0 uses non persistent HTTP. At most one object can be sent over a
single TCP connection.

 HTTP 1.1 uses persistent HTTP. In this version, multiple objects can be
sent over a single TCP connection.

Dynamic Host Configuration Protocol (DHCP)


Dynamic Host Configuration Protocol (DHCP) assigns IP addresses to hosts
dynamically. It allows for easier administration and works well in small to very large
network environments. Many types of hardware can be used as a DHCP server, including
a Cisco router.

A DHCP address conflict occurs when two hosts use the same IP address. This sounds
bad, and it is. A lot of information a DHCP server can provide to a host when the host
is requesting an IP address from the DHCP server. Here’s a list of the most common
types of information a DHCP server can provide:
 IP address
 Subnet mask
 Domain name
 Default gateway (routers)

56
 DNS server address
This is the four-step process a client takes to receive an IP address from a DHCP server:
 The DHCP client broadcasts a DHCP Discover message looking for a DHCP
server (Port 67).
 The DHCP server that received the DHCP Discover message sends a layer 2
unicast DHCP Offer message back to the host.
 The client then broadcasts to the server a DHCP Request message asking for the
offered IP address and possibly other information.
 The server finalizes the exchange with a unicast DHCP Acknowledgment
message...Etc.
Network Services

Computer systems and computerized systems help human beings to work efficiently and
explore the unthinkable. When these devices are connected together to form a network,
the capabilities are enhanced multiple-times. Some basic services computer network can
offer are.
Directory Services
These services are mapping between name and its value, which can be variable value or
fixed. This software system helps to store the information, organize it, and provides
various means of accessing it.
 Accounting

In an organization, a number of users have their user names and passwords mapped to
them. Directory Services provide means of storing this information in cryptic form and
make available when requested.
 Authentication and Authorization

User credentials are checked to authenticate a user at the time of login and/or
periodically. User accounts can be set into hierarchical structure and their access to
resources can be controlled using authorization schemes.
 Domain Name Services

57
DNS is widely used and one of the essential services on which internet works. This
system maps IP addresses to domain names, which are easier to remember and recall than
IP addresses. Because network operates with the help of IP addresses and humans tend to
remember website names, the

DNS provides website’s IP address which is mapped to its name from the back-end on
the request of a website name from the user.
File Services
File services include sharing and transferring files over the network.
 File Sharing

One of the reason, which gave birth to networking was file sharing. File sharing enables
its users to share their data with other users. User can upload the file to a specific server,
which is accessible by all intended users. As an alternative, user can make its file shared
on its own computer and provides access to intended users.
 File Transfer

This is an activity to copy or move file from one computer to another computer or to
multiple computers, with help of underlying network. Network enables its user to locate
other users in the network and transfers files.
Communication Services
 Email

Electronic mail is a communication method and something a computer user cannot work
without internet. This is the basis of today’s internet features. Email system has one or
more email servers. All its users are provided with unique IDs. When a user sends email
to other user, it is actually transferred between users with help of email server.
 Social Networking

Recent technologies have made technical life social. The computer savvy peoples, can
find other known peoples or friends, can connect with them, and can share thoughts,
pictures, and videos.

58
 Internet Chat

Internet chat provides instant text transfer services between two hosts. Two or more
people can communicate with each other using text based Internet Relay Chat services.
These days, voice chat and video chat are very common.
 Discussion Boards

Discussion boards provide a mechanism to connect multiple peoples with same interests.
It enables the users to put queries, questions, suggestions etc. which can be seen by all
other users. Other may respond as well.
 Remote Access

This service enables user to access the data residing on the remote computer. This feature
is known as Remote desktop. This can be done via some remote device, e.g. mobile
phone or home computer.
Application Services
These are nothing but providing network based services to the users such as web services,
database managing, and resource sharing.
 Resource Sharing

To use resources efficiently and economically, network provides a mean to share them.
This may include Servers, Printers, and Storage Media etc.
 Databases

This application service is one of the most important services. It stores data and
information, processes it, and enables the users to retrieve it efficiently by using queries.
Databases help organizations to make decisions based on statistics.
 Web Services

World Wide Web has become the synonym for internet. It is used to connect to the
internet, and access files and information services provided by the internet servers.
2.4 Functions of Application layer

 File transfer, access, and management - allows a user to access files in a


remote host (to make changes or read data), to retrieve files from a remote

59
computer for use in the local computer, and to manage or control files in a remote
computer locally.

 Mail services- provides the basis for e-mail forwarding and storage.

 Addressing- to achieve communication between client and server system, there is


a need for addressing.

 Directory services- provides distributed database sources and access for global
information about various objects and services

 Network virtual terminal - it allows a user to log on to a remote host by creates a


software emulation of a terminal at the remote host

2.5 Function of presentation layer

 The presentation layer is concerned with the syntax and semantics of the
information exchanged between two systems.

 The presentation layer is responsible for translation, compression, and encryption

 It acts as a data translator for a network.

 This layer is a part of the operating system that converts the data from one
presentation format to another format.

 The Presentation layer is also known as the syntax layer

 Translation - Because different computers use different encoding systems, the


presentation layer is responsible for interoperability between these different
encoding methods.

 Encryption

 Compression- Data compression reduces the number of bits contained in the


information

2.6 Session Layer

The services provided by the first three layers (physical, data link, and
network) are not sufficient for some processes. The session layer is the

60
network dialog controller. It establishes, maintains, and synchronizes the
interaction among communicating systems. It establishes, manages, and terminates the
connections between the local and remote application.
Dialog control- The session layer allows two systems to enter into a dialog. It allows
the communication between two processes to take place in either half-duplex (one way
at a time) or full-duplex (two ways at a time) mode.
Synchronization- The session layer allows a process to add checkpoints, or
synchronization points, to a stream of data. For example, if a system is sending a file of
2000 pages, it is advisable to insert checkpoints after every 100 pages to ensure that
each 100-page unit is received and acknowledged independently. In this case, if a crash
happens during the transmission of page 523, the only pages that need to be resent after
system recovery are pages 501 to 523. Pages previous to 501 need not be resent.

Review Questions
 Discuss about layered models
 Discuss about the OSI reference models and TCP/IP models
 Discuss about the presentation layer in detail
 Discuss about th protocols of application layer
 Discuss about the functions of application layer
 Discuss about the application of presentation layer
 Discuss in detail about session layer and its function.

61
Chapter 3: Transport Layer

3.1 Introduction

Data networks and the Internet support the human network by supplying seamless,
reliable communication among people—both locally and around the globe. On a single
device, people can use multiple services, such as e-mail, the web, and instant messaging,
to send messages or retrieve information. Applications such as e-mail clients, web
browsers, and instant messaging clients allow people to use computers and networks to
send messages and find information. Data from each of these applications is packaged,
transported, and delivered to the appropriate server daemon or application on the
destination device. The processes described in the OSI transport layer accept data from
the application layer and prepare it for addressing at the network layer. The transport
layer is responsible for the overall end-to-end transfer of application data.

Roles of the Transport Layer

The transport layer provides transparent transfer of data between end users, providing
reliable data transfer services to the upper layers. The transport layer controls the
reliability of a given link through flow control, segmentation/desegmentation, and error
control. Some protocols are state and connection oriented. This means that the transport
layer can keep track of the segments and retransmit those that fail.

62
Purpose of the Transport Layer:

The following are the primary responsibilities of the transport layer:

 Tracking the individual communications between applications on the source and


destination hosts

 Segmenting data and managing each piece

 Reassembling the segments into streams of application data

 Identifying the different applications

 Performing flow control between end users

 Enabling error recovery

 Initiating a session

The transport layer enables applications on devices to communicate:

3.2. Segmentation

The transport layer converts the application layer messages it receives from a sending
application process into transport layer packets, known as transport layer segments. In

63
this conversion, application messages may need to be broken into smaller chunks. In this,
a message is divided into small pieces. Reassemble the message correctly upon arriving
at the destination. It delivers a message from a specific process of one computer to a
specific process in another computer. The transport layer adds a port address to the
header of the data packet. It divides a message into smaller segments such that each
segment contains a sequence number along with the port address.
To ensure process to process delivery the transport layer makes use of port address to
identify the data from the sending and receiving process. A Port Address is the name or
label given to a process. It is a 16 bit address. TELNET uses port address 23 and HTTP
uses port address 80. Port address is also called as Service Point Address

The transport layer attaches a header to each chunk, which typically contains information
such as, the sending and receiving application ports. It ensures that the segments arrive
correctly at the receiver’s end and then reassembles them.

Functions:
• This Layer 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.

Segmentation provides the means to both send and receive data when running multiple
applications concurrently on a computer. Without segmentation, only one application, the
streaming video, for example, would be able to receive data. You could not receive e-
mails, chat on instant messenger, or view web pages while also viewing the video.

64
3.3. Addressing

Transport Layer header includes service point address which is port address. This layer
gets the message to the correct process on the computer unlike Network Layer, which
gets each packet to the correct computer. To pass data streams to the proper
applications, the transport layer must identify the target application. To accomplish this,
the transport layer assigns an identifier to an application.
The TCP/IP protocols call this identifier a port number. Each software process that
needs to access the network is assigned a port number unique in that host. This port
number is used in the transport layer header to indicate to which application that piece
of data is associated. At the transport layer, each particular set of pieces flowing
between a source application and a destination application is known as a conversation.
Dividing data into small parts, and sending these parts from the source to the
destination, enables many different communications to be interleaved (multiplexed) on
the same network. The transport layer is the link between the application layer and the
lower layers that are responsible for network transmission. This layer accepts data from
different conversations and passes it down to the lower layers as manageable pieces that
can be eventually multiplexed over the media. Applications do not need to know the
operational details of the network in use. The applications generate data that is sent from
one application to another, without regard to the destination host type, the type of media

65
over which the data must travel, the path taken by the data, the congestion on a link, or
the size of the network. Additionally, the lower layers are not aware that multiple
applications are sending data on the network. Their responsibility is to deliver data to
the appropriate device. The transport layer then sorts these pieces before delivering them
to the appropriate application.
3.4. Multiplexing and DE-multiplexing

The technique to combine two or more data streams in one session is called Multiplexing.
When a TCP client initializes a connection with Server, it always refers to a well-defined
port number, which indicates the application process. The client itself uses a randomly
generated port number from private port number pools.
Using TCP Multiplexing, a client can communicate with a number of different
application process in a single session. For example, a client requests a web page, which
in turn contains different types of data (HTTP, SMTP, FTP etc.) the TCP session timeout
is increased and the session is kept open for longer time so that the three-way handshake
overhead can be avoided.
This enables the client system to receive multiple connection over single virtual
connection. These virtual connections are not good for Servers if the timeout is too long.
A host on the internet can have many Internet applications installed on it. All these
applications will depend on the transport layer to deliver messages to other hosts. The
transport layer at the sender side will receive messages from different applications, break
the message into segments and pass them on to the underlying network layer. This job of
the transport layer is known as Multiplexing (illustrated on the left side of below Figure).
De-multiplexing occurs at the receiver’s side. The transport layer gathers the segments
from the network layer, retrieve the port number from the segments and passes the
segments to the appropriate application process s (as shown in the right hand side of
below Figure).

66
Multiplexing is a process of accepting the data from different applications and forwarding
to the different applications on different computers. At the receiving end, the data is
forwarded to the correct application. This process is known as demultiplexing. TCP
transmits the packet to the correct application by using the logical channels known as
ports.
3.5. Connectionless/Connection-Oriented

Connectionless Transport Layer: Each segment is considered as an independent packet


and delivered to the transport layer at the destination machine. A process in which data is
transmitted without making a connection with the destination host. Connection Oriented
Transport Layer: Before delivering packets, connection is made with transport layer at
the destination machine.
3.6. Unreliable/ Reliable

Recall that the primary function of the transport layer is to manage the application data
for the conversations between hosts. However, different applications have different
requirements for their data, and therefore different transport protocols have been
developed to meet these requirements. TCP is a transport layer protocol that can be
implemented to ensure reliable delivery of the data. In networking terms, reliability
means ensuring that each piece of data that the source sends arrives at the destination. At
the transport layer, the three basic operations of reliability are
■ Tracking transmitted data

67
■ Acknowledging received data
■ Retransmitting any unacknowledged data
The transport layer of the sending host tracks all the data pieces for each conversation
and retransmits any data that the receiving host did not acknowledge. These reliability
processes place additional overhead on the network resources because of the
acknowledgment, tracking, and retransmission. To support these reliability operations,
more control data is exchanged between the sending and receiving hosts. This control
information is contained in the Layer 4 header. This creates a trade-off between the value
of reliability and the burden it places on the network. Application developers must choose
which transport protocol type is appropriate based on the requirements of their
applications, as shown in Figure below. At the transport layer, protocols specify methods
for either reliable, guaranteed delivery or best-effort delivery. In the context of
networking, best-effort delivery is referred to as unreliable, because the destination does
not acknowledge whether it received the data.

Applications, such as databases, web pages, and e-mail, require that all the sent data
arrive
at the destination in its original condition for the data to be useful. Any missing data
could

68
cause a corrupt communication that is either incomplete or unreadable. Therefore, these
applications are designed to use a transport layer protocol that implements reliability. The
additional network overhead is considered to be required for these applications.
3.7. Protocols in Transport Layer

The two most common transport layer protocols of the TCP/IP protocol suite are
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Both
protocols manage the communication of multiple applications. The differences between
the two are the specific functions that each protocol implements.
3.6.1. UDP

UDP is a simple, connectionless protocol. It has the advantage of providing low-overhead


data delivery. The segments of communication in UDP are called datagrams. UDP sends
datagrams as “best effort.”
Applications that use UDP include:
■ Domain Name System (DNS)
■ Video streaming
■ Voice over IP (VoIP)
3.6.2. TCP

TCP is a connection-oriented protocol. TCP incurs additional overhead to gain functions.


Additional functions specified by TCP are same-order delivery, reliable delivery, and
flow control. Each TCP segment has 20 bytes of overhead in the header encapsulating the
application layer data, whereas each UDP segment has only 8 bytes of overhead. The
following applications use TCP:

■ Web browsers

■ E-mail

■ File transfers

Port Addressing

Consider the earlier example of a computer simultaneously receiving and sending e-mail,
instant messages, web pages, and a VoIP phone call. The TCP- and UDP-based services

69
keep track of the various applications that are communicating. To differentiate the
segments and datagrams for each application, both TCP and UDP have header fields that
can uniquely identify these applications.

Identifying the Conversations

The header of each segment or datagram contains a source and destination port. The
source port number is the number for this communication associated with the originating
application on the local host. The destination port number is the number for this
communication associated with the destination application on the remote host. Port
numbers are assigned in various ways, depending on whether the message is a request or
a response. While server processes have static port numbers assigned to them, clients
dynamically choose a port number for each conversation. When a client application sends
a request to a server application, the destination port contained in the header is the port
number that is assigned to the service daemon running on the remote host. The following
sections describe the three types of port numbers and examples of when both TCP and
UDP might use the same port number. You also learn about the netstat network utility.
Well-Known Ports Well-known ports (numbers 0 to 1023) are reserved for services and
applications. They are commonly used for applications such as HTTP (web server),
POP3/SMTP (e-mail server), and Telnet. By defining these well-known ports for server
applications, client applications can be programmed to request a connection to that
specific port and its associated service.

70
The key distinction between TCP and UDP is reliability. The reliability of TCP
communication is performed using connection-oriented sessions. Before a host using
TCP sends data to another host, the transport layer initiates a process to create a
connection with the destination. This connection enables the tracking of a session, or
communication stream, between the hosts. This process ensures that each host is aware of
and prepared for the communication. A complete TCP conversation requires the
establishment of a session between the hosts in both directions. After a session has been
established, the destination sends acknowledgments to the source for the segments that it
receives. These acknowledgments form the basis of reliability within the TCP session. As
the source receives an acknowledgment, it knows that the data has been successfully
delivered and can quit tracking that data. If the source does not receive an
acknowledgment within a predetermined amount of time, it retransmits that data to the
destination.

Part of the additional overhead of using TCP is the network traffic generated by
acknowledgments and retransmissions. The establishment of the sessions creates
overhead in the form of additional segments being exchanged. Additional overhead is the
result of keeping track of acknowledgments and the retransmission process the host must

71
undertake if no acknowledgment is received. Reliability is achieved by having fields in
the TCP segment, each with a specific function.

3.6.2.1. Flow control

Flow control assists the reliability of TCP transmission by adjusting the effective rate of
data flow between the two services in the session. When the source is informed that the
specified amount of data in the segments is received, it can continue sending more data
for this session.
3.6.2.2. Error Control

Error control refers to mechanisms that detect and correct errors that occur in
transmission. The most common techniques for error control are based on the following
ingredients:
 Error detection

 Positive acknowledgement: The destination returns a positive acknowledgement


message if a packet is successfully received and error-free.

 Retransmission after timeout: The source retransmits a packet that has not been
acknowledged after a predetermined amount of time.

 Negative acknowledgement and retransmission: The destination returns a negative


acknowledgment to packets in which an error is detected. The source retransmits
such packets.

3.6.2.3. Congestion control

If the transport entities on many machines send too many packets into the network too
quickly, the network will become congested, with performance degraded as packets are
delayed and lost. Controlling congestion to avoid this problem is the combined
responsibility of the network and transport layers. Congestion occurs at routers, so it is
detected at the network layer. However, congestion is ultimately caused by traffic sent
into the network by the transport layer. The only effective way to control congestion is
for the transport protocols to send packets into the network more slowly.

72
We have saved one of the key functions of TCP for last: congestion control. When the
load offered to any network is more than it can handle, congestion builds up. The Internet
is no exception. The network layer detects congestion when queues grow large at routers
and tries to manage it, if only by dropping packets. It is up to the transport layer to
receive congestion feedback from the network layer and slow down the rate of traffic that
it is sending into the network. In the Internet, TCP plays the main role in controlling
congestion, as well as the main role in reliable transport. That is why it is such a special
protocol.

After describing the goals of congestion control, we will describe how hosts can regulate
the rate at which they send packets into the network. The Internet relies heavily on the
transport layer for congestion control, and specific algorithms are built into TCP and
other protocols.
Review Questions
 Discuss about transport layer from the OSI reference models
 Role of transport layer in networking
 Discuss about data segmentation in transport layer
 Discuss about addressing
 Discuss about multiplexing and demultiplexing
 Discuss about connection and connectionless oriented transport layer
 Discuss about the protocols of transport layer
 Discuss about flow control, error control and congestion control

73
Chapter 4: Network Layer Addressing and Routing

4.1 Introduction

 Network layer is a layer-3 in the OSI model.

 Network layer manages options pertaining to host and network addressing,


managing sub-networks, and internetworking.

Layer-3 Functionalities:

Devices that work on Network Layer mainly focus on routing. It manages the delivery of
individual data packets from source to destination through appropriate addressing and
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.

74
The data flow between the network layer and other layers in the OSI Model, i.e., to begin
with, the network layer will receive data from the transport layer of the OSI model.

4.2. NIC addressing

A NIC in networking, also known as network interface card is a piece of hardware, often
a circuit board or chip that is inserted on a computer to enable it to connect to a network.
Modern NICs enable computers to perform tasks such as I/O interrupt support, data
transfer, network traffic engineering, and partitioning. A NIC establishes a dedicated,
continuous connection between a computer and a network.

It is used to connect different networking devices such as computers and servers to share
data over the connected network. It provides functionality such as support for I/O
interrupt, Direct Memory Access (DMA) interfaces, partitioning, and data transmission.
NIC is important for us to establish a wired or wireless connection over the network.
Network Interface Card is also known as Network Interface Controller, Network Adapter,
Ethernet card, Connection card, and LAN (Local Area Network) Adapter.

Every NIC has a MAC address in the Ethernet or Token Ring topologies. This unique
hardware address defines how the NIC is identified to ensure that the data gets to the
correct system. The MAC address can usually be modified when needed, but all NICs
will have a preassigned MAC address associated with the NIC. Depending on the way,
that configuration management is handled in the enterprise, these MAC addresses may be
set following a specific standard, recorded for inventory purposes, or potentially used to
determine whether a specific system should be allowed on the network. This security
function is most typically associated with wireless networks where MAC address filtering
is a standard configuration option.

 NIC is used to convert data into a digital signal.

 In the OSI model, NIC uses the physical layer to transmit signals and the network
layer to transmit data packets.

75
 NIC offers both wired (using cables) and wireless (using Wi-Fi) data
communication techniques.

 NIC is a middleware between a computer/server and a data network.


4.3. Packetizing

The process of encapsulating the data received from the upper layers of the network (also
called payload) in a network layer packet at the source and decapsulating the payload
from the network layer packet at the destination is known as packetizing.

The source host adds a header that contains the source and destination address and some
other relevant information required by the network layer protocol to the payload received
from the upper layer protocol and delivers the packet to the data link layer. It handles the
data received from the upper layer and converts it into packets to reach the destination. If
the packet is segmented at the source, then the network layer must ensure that each
fragment reaches the destination properly and correctly.

The destination host receives the network layer packet from its data link layer,
decapsulates the packet, and delivers the payload to the corresponding upper layer
protocol. The routers in the path are not allowed to change either the source or the
destination address. The routers in the path are not allowed to decapsulate the packets
they receive unless they need to be fragmented.
4.4. IP addressing

Every device that connects to the internet requires an IP address. An IP (Internet


Protocol) address is a unique numerical identifier assigned to every device connected to a
network that uses the Internet Protocol for communication. It consists of four numbers
separated by periods (dots), such as 192.168.0.1. Each number can range from 0 to 255,
giving us over 4 billion possible combinations. Each device on a network has a unique IP
address that makes it possible for data packets to be sent and received effectively.

An IP address is made up of 32 bits for IPv4 or 128 bits for IPv6 that are grouped into
octets separated by dots. The binary representation of an IP address shows how each bit

76
within the address is either '0' or '1.' For example, the binary representation of an IPv4
address might look like this:

11000000. 10101000. 00000101. 00000001. This binary string corresponds to the


decimal representation: 192. 168. 5. 1.

Why is each number limited to 0 to 255? Well, IP addresses are limited to 32 bits in
length and the maximum number of combinations of binary numbers you could have in
an octet is 256 (mathematically calculated as 28). Hence, the largest IP address you could
have would be 255.255.255.255, given that any one octet could be from 0 to 255. The
decimal representation of an IP address makes it easier for humans to understand and
remember. It uses four numbers separated by dots where each number ranges from 0 to
255. The numbers represent the value of each octet in decimal notation. For instance,
using the same example as above, the decimal representation would be 192. 168. 5. 1

IP addressing provides mechanism to differentiate between hosts and network. Because


IP addresses are assigned in hierarchical manner, a host always resides under a specific

77
network. The host that needs to communicate outside its subnet needs to know
destination network address, where the packet/data is to be sent.

Generally, A logical numeric address that is assigned to every single computer, printer,
switch, router, or any other device that is part of a TCP/IP-based network. There are
classes to identify each networks, which are class A, B, C, D and E.

Each IP address belongs to a class of IP addresses depending on the number in the first
octet. These classes are:

Notice that the number 127 is not included. That’s because it is used in a special, self
reflecting number called a loopback address. Think of this as an address that says, “this
is my address.” Note that only the first three classes – A, B and C – are used by network
administrators. These are the commonly used classes. The other two, D and E, are
reserved.

You define the class of an IP address by looking at its first octet value, but the structure
of an IP address for any one class is different. Each IP address has a network address and

78
a host address. The network part of the address is the common address for any one
network, while the host address part is for each individual device on that network. So, if
your phone number is 711-612-1234, the area code (711) would be the common, or
network, component of the telephone system, while your individual phone number of
(612-1234) would be your host address. The network and host components of class IP
addresses are:

For this process to work, an IP address has two parts. The first part of an IP address is
used as a network address, the last part as a host address.

79
In class A network, since the first bit of the first octet, which is the network address the
first bit is 0. We subtract 1 from 8 and equals 7. Therefore, 27 = 128 which is the
maximum number of class A networks.

In class B network, we have two-byte long network address and two-byte long host
address. we have 216 -2= 65,534 nodes.

80
If you take the example 192.168.123.132 and divide it into these two parts, you get
192.168.123. Network .132 Host or 192.168.123.0 - network address. 0.0.0.132 - host
address. If you’re trying to determine the class of an IP address, you need to look at the
first number. If the first number is 1 through 127, it’ll be a class A address. If the first
number is 128 through 191, it’s a class B address. Finally, if it’s 192 through 223, it’s a
class C address.

For example, look at the figure below:

Computer 2 is a computer, which is found in the same network with computer 3 and 4
and computer 130 is found in the same network with 131 and 132. There is a router
between them that connects the two networks. Computer 2 can communicate with
computer 3 using physical address because they are in the same network but it cannot
communicate with computer 130 using physical address since they are not in the same
network. Therefore, computer 2 and computer 130 can communicate using IP address.

81
4.5. IPv4

IPv4 (Internet Protocol version four) was first introduced in the early days of the internet
and remains one of the most widely used protocols today. However, with so many
devices connected worldwide, IPv4 addresses are becoming scarce due to limitations in
its structure, which can only accommodate around four billion unique addresses. IPv6
(Internet Protocol version six), on the other hand, uses longer addresses consisting of
eight groups of hexadecimal digits separated by colons that can accommodate
approximately three hundred forty undecillion unique addresses.
All devices connected to Internet have a 32-bit IP address. Think of the IP address as a
logical address (possibly temporary), while the 48-bit address on every NIC is the
physical, or permanent address. Computers, networks and routers use the 32-bit binary
address, but a more readable form is the dotted decimal notation. For example, the 32-bit
binary address 10000000 10011100 00001110 00000111 translates to 128.156.14.7 in
dotted decimal notation.

Notations

There are two prevalent notations to show an IPv4 address: binary notation and dotted
decimal notation.

Binary Notation

In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to
as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-
byte address. The following is an example of an IPv4 address in binary notation:

01110101 10010101 00011101 00000010

82
Dotted-Decimal Notation

To make the IPv4 address more compact and easier to read, Internet addresses are usually
written in decimal form with a decimal point (dot) separating the bytes. The following is
the dotted decimal notation of the above address: 117.149.29.2

An IPv4 address in both binary and dotted-decimal notation. Note that because each byte
(octet) is 8 bits, each number in dotted-decimal notation is a value ranging from 0 to 255.

Example 1

Change the following IPv4 addresses from binary notation to dotted-decimal notation.

A. 10000001 00001011 00001011 11101111

B. 11000001 10000011 00011011 11111111

Solution

We replace each group of 8 bits with its equivalent decimal number (see Appendix B)
and add dots for separation.

A. 129.11.11.239

B. 193.131.27.255

Example 2

Change the following IPv4 addresses from dotted-decimal notation to binary notation.

A. 111.56.45.78

B. 221.34.7.82

Solution

We replace each decimal number with its binary equivalent

A. 01101111 00111000 00101101 01001110

83
B. 11011101 00100010 00000111 01010010

4.6. Internet Protocol Version 6 (IPv6)

Exhaustion of IPv4 addresses gave birth to a next generation Internet Protocol version 6.
IPv6 addresses its nodes with 128-bit wide address providing plenty of address space for
future to be used on entire planet or beyond.

IPv6 has introduced Anycast addressing but has removed the concept of broadcasting.
IPv6 enables devices to self-acquire an IPv6 address and communicate within that subnet.
This auto- configuration removes the dependability of Dynamic Host Configuration
Protocol (DHCP) servers. This way, even if the DHCP server on that subnet is down, the
hosts can communicate with each other.

IPv6 provides new feature of IPv6 mobility. Mobile IPv6-equipped machines can roam
around without the need of changing their IP addresses.

IPv6 is still in transition phase and is expected to replace IPv4 completely in coming
years. At present, there are few networks, which are running on IPv6. There are some
transition mechanisms available for IPv6-enabled networks to speak and roam around
different networks easily on IPv4. These are:

 Dual stack implementation


 Tunneling
 NAT-PT
4.7 Classfull Addressing

IPv4 addressing, at its inception, used the concept of classes. This architecture is called
Classfull addressing. Although this scheme is becoming obsolete, we briefly discuss it
here to show the rationale behind classless addressing. In Classfull addressing, the
address space is divided into five classes: A, B, C, D, and E. Each class occupies some
part of the address space.

In Classfull addressing, the address space is divided into five classes: A, B, C, D, and E.

84
We can find the class of an address when given the address in binary notation or dotted-
decimal notation. If the address is given in binary notation, the first few bits can
immediately tell us the class of the address. If the address is given in decimal-dotted
notation, the first byte defines the class.

Classes and Blocks


One problem with Classfull addressing is that each class is divided into a fixed number of
blocks with each block having a fixed size as shown in Table

Netid (Network Id) and Hostid

In Classfull addressing, an IP address in class A, B, or C is divided into netid and hostid.


These parts are of varying lengths, depending on the class of the address. Note that the
concept does not apply to classes D and E. In class A, one byte defines the netid and
three bytes define the hostid. In class B, two bytes define the netid and two bytes define
the hostid. In class C, three bytes define the netid and one byte defines the hostid.

Mask

Although the length of the netid and hostid (in bits) is predetermined in Classfull
addressing. we can also use a mask (also called the default mask), a 32-bit number.
The masks for classes A, B, and C are shown in Table below. The concept does not apply
to classes D and E.

85
The mask can help us to find the netid and the hostid. For example, the mask for a class
A address has eight 1s, which means the first 8 bits of any address in class A define the
netid; the next 24 bits define the hostid.
4.8. Sub-netting

We are dividing the IP network into two or more networks called subnet, which is
preferred to control network traffic. It is a smaller network inside a large network. This
technique makes the network routing an efficient one.
The main features of subnet are as follows −
 Reduce network congestion.
 Control network growth
 Ease administration
 Boost network security

For Subnetting, Subnet Masks are used. Subnets masks are 32 bit addresses like IP
Addresses. Subnet Masks are used with IP Addresses. The 1s represents the network
parts, and 0s represents the host parts. We can show Subnet Masks with four octets
like IP addresses (255.255.255.0) or we can show it like /X. Here, for the 255.255.255.0
Subnet Mask, we can use /24. This means that the first 24 bit is full of 1s and it is
network part.

86
Subnetting Process

The process of subnetting involves breaking down an IP address into smaller units that
can be assigned to individual network units within the original network. This is done by
using various techniques. Subnetting divides an IP address into two parts, namely
network address and host address. To create the sub network structure, host bits must be
reassigned as network bits which is often referred to as borrowing bits. The starting point
for this process is always the leftmost bit of the host. That is he one closest to the last
network octet.

Characteristics of Subnetting
To design a subnetwork, some features are required to be understood properly which are:
 Network ID: It is the first IP address in each Sub-Network in the main network
ID.
 Broadcast ID: This feature represents the last IP address in each Sub-Network in
the network ID.
 First Host ID: The next IP address after the Network ID is represented by the First
Host ID.
 Last Host ID: The IP address right before the Broadcast ID is represented as Last
Host ID.
 Next Network: This feature assigns the Network ID for the next sub-network.

87
 IP Addresses: This feature represents the total number of IP addresses in the sub-
network.

Subnetting applies to IP addresses because this is done by borrowing bits from the host
portion of the IP address. In a sense, the IP address then has three components – the
network part, the subnet part and, finally, the host part.
Subnetting Advantage
The subnet field and the host field are created from the original host portion of the major
IP address. This is done by assigning bits from the host portion to the original network
portion of the address. Subnets have sub network ID (subnet ID) just as networks have
network IDs. Subnet IDs are found by replacing all host fields with 0s.
Borrowing a bits

To determine the number of bits to be used, the network designer needs to calculate how
many hosts the largest sub network requires and the number of sub networks needed.
Large number of subnets means fewer hosts and a large number of hosts means fewer
subnets. Total number of subnets is 2^bits borrowed. Total number of hosts is
2^remaining host bits.

Example if three bits are borrowed from a class C address, total number of subnets is 8
(2^3) and total number of hosts is 32 (2^5)

Positional value of bits

88
Usable subnets & Usable Hosts

Among the available subnets, it is not advised to use the following two subnets:

 The subnet with all 0’s in the subnet field


 The subnet with all 1’s in the subnet field

If subnet zero (all 0’s in the subnet field) is used, it means that a network and a subnet
have the same address. If the last subnet (all 1’s in the subnet field) is used, it means that
the network broadcast address and a subnet have the same address. Hence usable subnets
will be 2^bits borrowed – 2. Example if three bits are borrowed from a class C address,
total number of usable subnets is 6 (2^3 - 2) and total number of usable hosts is 30 (2^5 -
2)

Subnet Masks

For the subnet address scheme to work, every machine on the network must know which
part of the host address will be used as the subnet address. This is accomplished by
assigning a subnet mask to each machine. A subnet mask is a 32-bit value that allows the
recipient of IP packets to distinguish the network portion of the IP address from the host
portion of the IP address

A subnet mask is composed of 1s and 0s where:

 The 1s in the subnet mask represent the positions that refer to the network or
subnet addresses
 The 0s in the subnet mask represent the positions that refer to the host address
Default subnet masks

Not all networks need subnets, meaning they use the default subnet mask.

89
This is basically the same as saying that a network doesn’t have a subnet address. Here is
default subnet mask for Classes A, B, and C
 Class A - network. Node .node. node Subnet mask: 255.0.0.0
 Class B network. network. node. node Subnet mask:255.255.0.0
 Class C - network. network. network. node Subnet mask:255.255.255.0

These default subnet masks show the minimum number of 1’s you can have in a subnet mask
for each class.

Specifying subnets
 Example if three bits are borrowed from a class C address, the subnet mask is
255.255.255.224
 Subnets may also be represented, in a slash format.
 For example, /24 indicates that the total bits that were used for the network and
sub network portion is 24
 The subnet mask 255.255.255.224 in slash format is /27. (224=11100000)

Number of bits borrowed from a class C address, positional value of each bit and
resulting mask (in number and slash format).

When calculating subnets, the following process should be used.

 Determine the assigned IP address space.


 Determine the number of subnets required based on the design of the existing
network, along with the structure of the organization. It is common to assign a
subnet to each department within the organization.

90
 Based on the class of the IP address space and the number of required subnets,
determine how many host bits need to be borrowed. Also determine how many
hosts each subnet can support.
 Calculate the decimal value and prefix value of the new subnet mask.
 Apply the subnet mask to the assigned IP address space to calculate the network
address of the new possible subnets, the broadcast address for each possible subnet,
and the range of usable IP addresses in each possible subnet.
 Assign IP addresses to all devices, including router interfaces that are connected to
that subnet.
Possible Number of Subnets
To calculate the number of possible subnets, use the formula 2n , where n equals the
number of host bits borrowed. For example, if three host bits are borrowed, then n=3. 23
= 8, so eight subnets are possible if three host bits are borrowed. The table below lists the
powers of 2.

To complete the third step of the subnetting process, determine how many host bits need
to be borrowed and rewrite the formula as 2n > (number of required subnets). For
example, if the number of required subnets is 18, then write the formula as 2n > 18. Solve
for n by getting as close to the number of required subnets as possible without going
under. In this example, n = 5 (25 = 32). This means that to create at least 18 subnets, 5
host bits must be borrowed.

91
Possible Number of Hosts per Subnet
To calculate the number of possible hosts per subnet, use the formula 2h - 2, where h
equals the number of host bits. The reason two addresses must be subtracted is because of
the network address and the broadcast address.
To determine the number of host bits:
 Determine the assigned IP address space.
 Determine number of host bits available.
 Determine number of host bits borrowed.
 Determine the number of remaining host bits by subtracting the number of host
bits borrowed from the default number of host bits. The difference is h in the
formula.
 Determine the number of possible hosts by using the formula 2h - 2. Use the table
above to determine the number of hosts available after a specific number of bits
have been borrowed from the host portion of the address.
 Calculate the new subnet mask and prefix
Examples for each class of IP address space are shown in the table below

Calculate New Subnet Mask

To complete the fourth step of the subnetting process—calculating the decimal and prefix
values of the new subnet mask—perform the following steps.

 Determine the class of IP network.


 Determine the default subnet mask or prefix for the class of address.
 Determine how many host bits were borrowed or given to the network.

92
 Calculate the new subnet mask and prefix. To calculate the new subnet mask, start
with the first binary 0 in the default subnet mask and change it to a binary 1.
Continue doing this, moving left to right, for the number of bits borrowed.

For example, if the default subnet mask is 255.255.0.0, and if the number of bits
borrowed is four, then the first four bits of the third octet must be changed from binary 0s
to binary 1s. In this example, the new subnet mask is 255.255.240.0. The table below
provides an example of these steps.

Calculate the New Subnets

Calculating the new subnets is part of the fifth step of the subnetting process. In the
subnet mask, the last bit borrowed is called the Least Significant Bit (LSB). The figure
below shows an example.

In the subnet mask 255.255.240.0, the LSB is the fourth bit of the third octet. This bit has
a value of 16. This is important to note, because the value of the LSB determines the
multiples of the new IP subnets. In other words, the network numbers of the new possible
subnets go in increments of 16 in the third octet. The table below shows the new possible
subnets.

93
Use the value of the LSB to determine the new possible subnets works for every class of
IP network with any subnet mask.

Calculate the Broadcast Address and Usable Range of the New Subnets

Once the network address of the new possible subnets is known, the broadcast address
and the usable range for the new subnets can be quickly calculated. To calculate the
broadcast address and each of the subnets, identify the next subnet, and then go back one
address. The table below shows the new subnets and their broadcast addresses.

To calculate the usable range of IP addresses—meaning, the range of IP addresses that


can be assigned to devices connected to the subnet—do the following:

1. Add one address to the subnet address to find the first usable IP address.

2. Subtract one address from the broadcast address to find the last usable IP address.

The following table shows all of the new possible subnets; the usable range of IP
addresses for each subnet; and the broadcast address for each subnet.

94
Example: Here is a class C IP address demonstrating everything. The given IP address
space is 209.44.33.0 /24. The required number of subnets is 6. The table below shows the
necessary step for subnetting process.

95
Subnetting Class C addresses

Example 1

Let us subnet the network address 192.168.10.0 with a subnet mask 255.255.255.192 or
in slash format /26

✓ (192 is 11000000)

Q- How many usable subnets do we have?

A- Since 192 is 2 bits on (11000000), the answer would be 2^2 – 2 = 2

Q- How many usable hosts per subnet do we have?

A. We have 6 host bits off (11000000), so the answer would be 2^6 – 2 = 62 hosts

Q-What are the subnet IDs?

A-We vary the borrowed bits (00, 01, 10, 11).

So the subnets are 192.168.10.0, 192.168.10.64, 192.168.10.128, 192.168.10.192

Q - What are the valid or usable subnets.

A - The ones which do not have all 0’s or all 1’s in the subnet field, namely
192.168.10.64 and 192.168.10.128

Q - What’s the broadcast address for the valid subnets?

A - The valid subnets start with 01 and 10. The broadcast address for these two addresses
will have 01111111 and 10111111. Which are 127 and 191. So the broadcast addresses
will be 192.168.10.127 and 192.168.10.191. As a shortcut you can follow this rule: The
number right before the value of the next subnet is all host bits turned on and equals the
broadcast address.

Q - What are the valid hosts?

A - These are the numbers between the subnet ID and broadcast address

The hosts for the first valid subnet are: 192.168.10.65, 192.168.10.66, …, 192.168.10.126

The hosts for the second valid subnet are: 192.168.10.129, 192.168.10.130, …,
192.168.10.190.

96
Example 2

Now let us subnet the network address 192.168.10.0, this time with a subnet mask
255.255.255.224 or in slash format /27

Q - How many subnets do we have?

A - Since 224 is 3 bits on (11100000), the answer would be 2^3 – 2 = 6

Q - How many hosts per subnet do we have?

A - We have 5 host bits off (11100000), so the answer would be 2^5 – 2 = 30 hosts

Q - What are the subnet IDs?

A- We vary the borrowed bits (000, 001, 010, 011, 100, 101, 110, 111). So the subnets
are

192.168.10.0, 192.168.10.32, 192.168.10.64, 192.168.10.96, 192.168.10.128,


192.168.10.160,

192.168.10.192, 192.168.10.224

Q - What are the valid or usable subnets?

A- 192.168.10.32, 192.168.10.64, 192.168.10.96, 192.168.10.128, 192.168.10.160,


192.168.10.192

Q - What is the broadcast address for the valid subnets?

A - The number right before the value of the next subnet is all host bits turned on and
equals the broadcast address – 192.168.10.63, 192.168.10.95, 192.168.10.127,
192.168.10.159,

192.168.10.191, 192.168.10.223

Q - What are the valid hosts?

97
Example 3

Subnet the network address 192.168.10.0, with a subnet mask 255.255.255.248 (/28)

Q - How many subnets do we have?

A - Since 248 is 4 bits on (11110000), 2^4 – 2 = 14

Q - How many hosts per subnet do we have?

A - We have 6 host bits off (11110000), 2^4 – 2 = 14

Q - What are the subnet IDs?

A - We vary the borrowed bits (0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000,
1001,

1010, 1011, 1100, 1101, 1110, 1111).

So the subnets ID’s are:

192.168.10.0, 192.168.10.16, 192.168.10.32, 192.168.10.48, 192.168.10.64,


192.168.10.80, 192.168.10.96, 192.168.10.112, 192.168.10.128, 192.168.10.144,
192.168.10.160, 192.168.10.176, 192.168.10.192, 192.168.10.208, 192.168.10.224,
192.168.10.240

Q - What’s the broadcast address for the valid subnets?

A- 192.168.10.31, 192.168.10.47, 192.168.10.63, 192.168.10.79, 192.168.10.95,


192.168.10.111, 192.168.10.127, 192.168.10.143, 192.168.10.159, 192.168.10.175,
192.168.10.191, 192.168.10.107, 192.168.10.223, 192.168.10.239

Q - What are the valid hosts?

192.168.10.17 – 192.168.10.30, 192.168.10.33 – 192.168.10.46, 192.168.10.49 –


192.168.10.62, 192.168.10.65–192.168.10.78, 192.168.10.81–192.168.10.94,
192.168.10.97–192.168.10.110, 192.168.10.113–192.168.10.126, 192.168.10.129–
192.168.10.142, 192.168.10.145–192.168.10.158,192.168.10.161–
192.168.10.174192.168.10.177–192.168.10.190, 192.168.10.193–192.168.10.106,
192.168.10.109–192.168.10.222, 192.168.10.225-192.168.10.238.

Calculating Class, A and B Network

The Class A and B sub netting procedure is identical to the process for Class C, except
there may be significantly more bits involved.

98
Assigning 12 bits of a Class B address to the subnet field creates a subnet mask of
255.255.255.240 or /28.

All eight bits were assigned in the third octet resulting in 255, the total value of all eight
bits. Four bits were assigned in the fourth octet resulting in 240.

Possible Class B subnet masks

255.255.128.0 (/17) 255.255.255.0 (/24)

255.255.192.0 (/18) 255.255.255.128 (/25)

255.255.224.0 (/19) 255.255.255.192 (/26)

255.255.240.0 (/20) 255.255.255.224 (/27)

255.255.248.0 (/21) 255.255.255.240 (/28)

255.255.252.0 (/22) 255.255.255.248 (/29)

255.255.254.0 (/23) 255.255.255.252 (/30)

Sub netting Class B addresses

Example 1

172.16.0.0 = Network address 255.255.192.0 = Subnet mask Q - How many Subnets?

A - 2^2 – 2 = 2.

Q - How many Hosts per subnet?

2^14 – 2 = 16,382. (6 bits in the third octet, and 8 in the fourth) Q - Subnet IDs of valid
subnets?

A - 172.16.64.0 and 172.16.128.0

Q Broadcast address for each subnet and valid hosts?

A Below is the two subnets available and the address of each:

Subnet 172.16.64.0 172.16.128.0

First host 172.16.64.1 172.16.128.1

Last host 172.16.127.254 172.16.191.254

Broadcast 172.16.127.255 172.16.191.255

99
172.16.0.0 = Network address 255.255.240.0 = Subnet mask Q How many Subnets?

A- 2^4 – 2 = 14

Q- How many Hosts per subnet? 2^12 – 2 = 4094

Q- Subnet IDs of valid subnets?

A- 172.16.16.0 and 172.16.32.0, …, 172.16.224.0

Q- Broadcast address for each subnet and valid hosts?

A- Below is the subnets available and the address of each:

Subnet 172.16.16.0 172.16.32.0 …

First host 172.16.16.1 172.16.32.1 …

Last host 172.16.31.254 172.16.47.254 …

Broadcast 172.16.31.255 172.16.47.255 …

Possible Class A subnet masks

255.128.0.0 (/9) 255.255.240.0 (/20)

255.192.0.0 (/10) 255.255.248.0 (/21)

255.224.0.0 (/11) 255.255.252.0 (/22)

255.240.0.0 (/12) 255.255.254.0 (/23)

255.248.0.0 (/13) 255.255.255.0 (/24)

255.252.0.0 (/14) 255.255.255.128 (/25)

255.254.0.0 (/15) 255.255.255.192 (/26)

255.255.0.0 (/16) 255.255.255.224 (/27)

255.255.128.0 (/17) 255.255.255.240 (/28)

255.255.192.0 (/18) 255.255.255.248 (/29)

255.255.224.0 (/19) 255.255.255.252 (/30)

Sub netting Class A addresses


Example 1
10.0.0.0 = Network address 255.255.0.0 (/16) = Subnet mask Q Subnets?

100
A 2^8 – 2 = 254
Q- Hosts?
A- 2^16 – 2 = 65,534
Q- Valid subnets?
A- 10.1.0.0, 10.2.0.0, 10.3.0.0, …, 10.254.0.0
Q- Broadcast address for each subnet and valid hosts?
Subnet 10.1.0.0 … 10.254.0.0
First host 10.1.0.1 … 10.254.0.1
Last host 10.1.255.254 … 10.254.255.254
Broadcast 10.1.255.255 … 10.254.255.255
Example 2
10.0.0.0 = Network address 255.255.240.0 (/20) = Subnet mask Q Subnets?
2^12 – 2 = 4094
Q-Hosts?
A- 2^12 – 2 = 4094
Q-Valid subnets?
A- Subnet 10.1.0.0, 10.1.16.0,…, 10.255.224.0
First host 10.1.0.1, 10.1.16.1,…, 10.255.224.1
Last host 10.1.15.254, 10.1.31.254,…, 10.255.239.254
Broadcast 10.1.15.255, 10.1.31.255,…, 10.255.239.255

ANDING with Default subnet masks

A subnet mask must accompany every IP address. By now, you should be able to look at
an IP address and tell what class it is. Unfortunately, your computer doesn’t think that
way. For your computer to determine the network and subnet portion of an IP address it
must

“AND” the IP address with the subnet mask.

Sample:

IP Address: 192 . 100 . 10 . 33


 Address Class: C

101
 Network Portion: 192. 100. 10. 33
 Host Portion: 192. 100. 10. 33
In order for you computer to get the same information it must AND the IP address with
the subnet mask in binary.

Decimal/Binary Subnet Ranges


Borrow 2 bits
SSHHHHHH
# of subnets = 22 = 4 = 00000100
Subnet mask = 2 bits = 128 + 64 = 192 = 11000000
Range of hosts = 26 = 64 = 01000000
[Range ……………………………] [Useable Range …………………...]
Network ID 0 – 63 00 000000 – 00 111111
64 – 127 01 000000 – 01 111111 65 - 126 01 000001 – 01 111110
128 – 191 10 000000 – 10 111111 129 – 190 10 000001 – 10 111110
Broadcast 192 – 255 11 000000 – 11 111111
Address
4.9 Types of IP Addresses

Internet Protocol (IP) addresses are used to identify devices on a network. There are two
types of IP addresses: public and private. In addition, there is dynamic and static IP
addressing.

Public IP Addresses
A Public IP address is an internet address that is assigned to any device that directly faces
the Internet. It is unique and identifies the device on the internet. It can be accessed from

102
anywhere on the internet, making it useful for hosting websites or other services. Public
IPs can be obtained from ISPs or purchased from companies that provide them.
How they are assigned
When you connect your device to the internet through an ISP, they assign you a public IP
address from their pool of available addresses. This assignment process can be done
either dynamically (automatic assignment) or manually (through a service request).

Examples
An example of a public IP address would be 216.58.194.174, which belongs to
Google.com.
Private IP Addresses
Private IPs, also known as local IPs, are used within private networks and do not route
over the Internet's backbone infrastructure like Public IPs do.

Definition
A Private IP address is a non−publicly registered internet protocol address assigned by
routers in private networks like LANs (Local Area Networks), Intranets or Wi−Fi
networks at home. Private IPs are usually allocated by the router through DHCP protocol
automatically when devices connect to it.

Examples
Some examples of private addresses include − 192.168.x.x − 172.x.x.x
Dynamic vs Static IP Addresses
A dynamical IP address is an address that changes every time you connect to the Internet.
This change happens automatically in most cases, making it hard to keep track of your
device's current IP. A static IP address, on the other hand, is an address that never
changes. It is permanently assigned to a device.
Advantages and Disadvantages of each type
Static IPs are useful when setting up servers because they allow for a permanent internet
address for remote access purposes. However, they can be more expensive than dynamic
IPs and require manual configuration. Dynamic IPs are cheaper and require little or no
configuration at all.

103
NAT: stands for network address translation. It's a way to map multiple private addresses
inside a local network to a public IP address before transferring the information onto the
internet. To access the Internet, one public IP address is needed, but we can use a private
IP address in our private network. The idea of NAT is to allow multiple devices to access
the Internet through a single public address. To achieve this, the translation of a private
IP address to a public IP address is required. Network Address Translation (NAT) is a
process in which one or more local IP address is translated into one or more Global IP
address and vice versa in order to provide Internet access to the local hosts.

PAT: Port Address Translation (PAT) is a feature of a network device that translates
communications made between hosts on a private network and hosts on a public network.
PAT allows a single public IP address to be used by many hosts on the private network,
which is usually a LAN.

4.10 Address Mapping

Address mapping is a process of determining a logical address knowing the physical


address of the device and determining the physical address by knowing the logical
address of the device. Address mapping is required when a packet is routed from source
host to destination host in the same or different network.
Why Address Mapping?
We know that the Internet is a collection of several physical networks that are
interconnected using routers. Now when in an Internet, a source node sends a packet to
the destination node the packet has to travel through different physical networks before it
is delivered to the destination node.
At the network level, any device connected to the network can be identified by its logical
address (IP address). However, the device at the physical level is identified by
its physical address.
Logical to Physical Address Mapping –ARP

In Address Resolution Protocol (ARP), Receiver’s MAC address is fetched. Through


ARP, (32-bit) IP address mapped into (48-bit) MAC address. Whereas, In Reverse

104
Address Resolution Protocol (RARP), IP address is fetched through server. Through
RARP, (48-bit) MAC address of 48 bits mapped into (32-bit) IP address.

4.5.2. Physical to Logical Address Mapping –RARP

ARP RARP

A protocol used to map an IP address to A protocol used to map a physical (MAC)


a physical (MAC) address address to an IP address

To obtain the IP address of a network


To obtain the MAC address of a network
device when only its MAC address is
device when only its IP address is known
known

Client broadcasts its IP address and


Client broadcasts its MAC address and
requests a MAC address, and the server
requests an IP address, and the server
responds with the corresponding MAC
responds with the corresponding IP address
address

IP addresses MAC addresses

Widely used in modern networks to Rarely used in modern networks as most


resolve IP addresses to MAC addresses devices have a pre-assigned IP address

ARP stands for Address Resolution Whereas RARP stands for Reverse Address
Protocol. Resolution Protocol.

Whereas through RARP, (48-bit) MAC


Through ARP, (32-bit) IP address
address of 48 bits mapped into (32-bit) IP
mapped into (48-bit) MAC address.
address.

While in RARP, broadcast IP address is


In ARP, broadcast MAC address is used.
used.

105
ARP RARP

In ARP, ARP table is managed or While in RARP, RARP table is managed or


maintained by local host. maintained by RARP server.

In Address Resolution Protocol,


While in RARP, IP address is fetched.
Receiver’s MAC address is fetched.

In ARP, ARP table uses ARP reply for While in RARP, RARP table uses RARP
its updation. reply for configuration of IP addresses .

Hosts and routers uses ARP for knowing


While RARP is used by small users having
the MAC address of other hosts
less facilities.
and routers in the networks.

ARP is used in sender’s side to map the RARP is used in receiver’s side to map the
receiver’s MAC address. sender’s IP.

4.11. ICMP

What is ICMP Used For? Internet Control Message Protocol (ICMP) is used for reporting
errors and performing network diagnostics. In the error reporting process, ICMP sends
messages from the receiver to the sender when data does not come though as it should.
The Internet Control Message Protocol (ICMP) is a network layer protocol used by
network devices to diagnose network communication issues. ICMP is mainly used to
determine whether or not data is reaching its intended destination in a timely manner.
Commonly, the ICMP protocol is used on network devices, such as routers. ICMP is
crucial for error reporting and testing, but it can also be used in distributed denial-of-
service (DDoS) attacks.
How Does ICMP Work?
ICMP is the primary and important protocol of the IP suite, but ICMP isn’t associated
with any transport layer protocol (TCP or UDP) as it doesn’t need to establish a
connection with the destination device before sending any message as it is a
connectionless protocol. The working of ICMP is just contrasting with TCP, as TCP is a
connection-oriented protocol whereas ICMP is a connectionless protocol. Whenever a
connection is established before the message sending, both devices must be ready

106
through a TCP Handshake. ICMP packets are transmitted in the form of datagrams that
contain an IP header with ICMP data. ICMP datagram is similar to a packet, which is an
independent data entity.
Netstat

A netstat command is a useful tool for displaying network statistics and the status of
network connections. It can be used to list all active TCP/IP connections, including the
ports they are using. It is used to find out the current state of active network connections
on a host.

Example: $ netstat –atn: This will display a list of all active TCP connections, along with
the local and remote addresses, the state of the connection, and the PID (process ID) of
the process using the connection.
4.12 Routing

When independent networks or links are connected to create internetworks (network of


networks) or a large network, the connecting devices (called routers or switches) route or
switch the packets to their final destination. One of the functions of the network layer is to
provide this mechanism.

Routing algorithms

 In order to transfer the packets from source to the destination, the network layer
must determine the best route through which packets can be transmitted.

 Whether the network layer provides datagram service or virtual circuit service, the
main job of the network layer is to provide the best route. The routing protocol
provides this job.

 The routing protocol is a routing algorithm that provides the best path from the
source to the destination. The best path is the path that has the "least-cost path"
from source to the destination.

 Routing is the process of forwarding the packets from source to the destination
but the best route to send the packets is determined by the routing algorithm.

Classification of a Routing algorithm

The Routing algorithm is divided into two categories:

107
 Adaptive Routing algorithm
 Non-adaptive Routing algorithm

Adaptive Routing algorithm

o An adaptive routing algorithm is also known as dynamic routing algorithm.

o This algorithm makes the routing decisions based on the topology and network
traffic.

o The main parameters related to this algorithm are hop count, distance and
estimated transit time.

An adaptive routing algorithm can be classified into three parts:

o Centralized algorithm: It is also known as global routing algorithm as it


computes the least-cost path between source and destination by using complete
and global knowledge about the network. This algorithm takes the connectivity
between the nodes and link cost as input, and this information is obtained before
actually performing any calculation. Link state algorithm is referred to as a
centralized algorithm since it is aware of the cost of each link in the network.

o Isolation algorithm: It is an algorithm that obtains the routing information by


using local information rather than gathering information from other nodes.

o Distributed algorithm: It is also known as decentralized algorithm as it


computes the least-cost path between source and destination in an iterative and
distributed manner. In the decentralized algorithm, no node has the knowledge
about the cost of all the network links. In the beginning, a node contains the
information only about its own directly attached links and through an iterative
process of calculation computes the least-cost path to the destination. A Distance
vector algorithm is a decentralized algorithm as it never knows the complete path
from source to the destination, instead it knows the direction through which the
packet is to be forwarded along with the least cost path.

Non-Adaptive Routing algorithm

 Non Adaptive routing algorithm is also known as a static routing algorithm.

108
 When booting up the network, the routing information stores to the routers.
 Non Adaptive routing algorithms do not take the routing decision based on the
network topology or network traffic.

The Non-Adaptive Routing algorithm is of two types:

Flooding: In case of flooding, every incoming packet is sent to all the outgoing links
except the one from it has been reached. The disadvantage of flooding is that node may
contain several copies of a particular packet.

Random walks: In case of random walks, a packet sent by the node to one of its
neighbors randomly. An advantage of using random walks is that it uses the alternative
routes very efficiently.

What are the main routing protocols?

In networking, a protocol is a standardized way of formatting data so that any connected


computer can understand the data. A routing protocol is a protocol used for identifying or
announcing network paths.

The following protocols help data packets find their way across the Internet:

IP: The Internet Protocol (IP) specifies the origin and destination for each data packet.
Routers inspect each packet's IP header to identify where to send them.

BGP: The Border Gateway Protocol (BGP) routing protocol is used to announce which
networks control which IP addresses, and which networks connect to each other. (The
large networks that make these BGP announcements are called autonomous systems.)
BGP is a dynamic routing protocol.

The below protocols route packets within an AS:

OSPF: The Open Shortest Path First (OSPF) protocol is commonly used by network
routers to dynamically identify the fastest and shortest available routes for sending
packets to their destination.

RIP: The Routing Information Protocol (RIP) uses "hop count" to find the shortest path
from one network to another, where "hop count" means number of routers a packet must
pass through on the way. (When a packet goes from one network to another, this is
known as a "hop.")

Other interior routing protocols include EIGRP (the Enhanced Interior Gateway Routing
Protocol, mainly for use with Cisco routers) and IS-IS (Intermediate System to
Intermediate System).

109
What is a router?

A router is a piece of network hardware responsible for forwarding packets to their


destinations. Routers connect to two or more IP networks or subnetworks and pass data
packets between them as needed. Routers are used in homes and offices for setting up
local network connections. More powerful routers operate all over the Internet, helping
data packets reach their destinations.

Unicast routing

Most of the traffic on the internet and intranets known as unicast data or unicast traffic is
sent with specified destination. Routing unicast data over the internet is called unicast
routing. It is the simplest form of routing because the destination is already known.
Hence the router just has to look up the routing table and forward the packet to next hop.

Broadcast routing
By default, the broadcast packets are not routed and forwarded by the routers on any
network. Routers create broadcast domains. But it can be configured to forward
broadcasts in some special cases. A broadcast message is destined to all network devices.
Broadcast routing can be done in two ways (algorithm):
 A router creates a data packet and then sends it to each host one by one. In this case,
the router creates multiple copies of single data packet with different destination
addresses. All packets are sent as unicast but because they are sent to all, it simulates as if router is
broadcasting.
 This method consumes lots of bandwidth and router must destination address of
each node.
 Secondly, when router receives a packet that is to be broadcasted, it simply floods
those packets out of all interfaces. All routers are configured in the same way.

Multicast Routing

Multicast routing is special case of broadcast routing with significance difference and
challenges. In broadcast routing, packets are sent to all nodes even if they do not want it.
But in Multicast routing, the data is sent to only nodes which wants to receive the

110
packets. The router must know that there are nodes, which wish to receive multicast
packets (or stream) then only it should forward. Multicast routing works spanning tree
protocol to avoid looping. Multicast routing also uses reverse path Forwarding technique,
to detect and discard duplicates and loops.

Review Questions

 Discuss about network layers


 Discuss about the role of network layer in OSI reference models
 Discuss about NIC address and packetizing
 Discuss about IP (Internet Protocols)
 Discuss about details of IPv4 and IPv6
 Discuss about Classfull addressing
 Discuss about subnetting
 Discuss about subnetting processes
 Discuss about subnet mask
 Discuss about how to subnet class A, B and C networks
 Discuss about types of IP address
 Discuss about address resolution protocol (ARP)
 Discuss about ICMP
 Discuss about Routing mechanisms

111
Chapter 5: Link Layer and Physical Layer

5.1. Link layer services

The data link layer has a number of specific functions it can carry out. These functions
include:

 Providing a well-defined service interface to the network layer.


 Framing
 Dealing with transmission errors.
 Regulating the flow of data so that slow receivers are not swamped by fast
senders.

5.1.1. Framing

The data link layer receives a raw bit stream from the physical layer that may not be error
free. To ensure a reliable transfer of bit streams to the network layer, the data link layer
breaks the bit stream into frames. It then computes the checksum for each frame, which is
transmitted with the frame itself. The destination host receives a frame and computes
another checksum from its data to compare it with the transmitted frame. This ensures
that the data link layer of the receiver detects as well as correct frames.
Different framing methods:
1. Character Count
2. Flag bytes with byte stuffing
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations

5.1.2. Multiple Access Protocols

Multiple access protocols are a set of protocols operating in the Medium Access Control
sublayer (MAC sublayer) of the Open Systems Interconnection (OSI) model. These
protocols allow a number of nodes or users to access a shared network channel. Multiple
access protocol is used to coordinate access to the link, and nodes can regulate their
transmission onto the shared broadcast channel by using it. It is used both wired and
wireless local area network and satellite network.

112
5.1.2.1. CSMA/CD and CSMA/CA

CSMA/CD stands for Carrier Sense Multiple Access / Collision Detection is a network
protocol for carrier transmission. It is operated in the medium access control layer. It
senses of the shared channel is busy for broadcasting and interrupts the broadcast until
the channel is free. In CSMA/CD collision is detected by broadcast sensing from the
other stations. Upon collision detection in CSMA/CD, the transmission is stopped, and a
jam signal is sent by the stations and then the station waits for a random time context
before retransmission.
CSMA is a mechanism that senses the state of the shared channel to prevent or recover
data packets from a collision. It is also used to control the flow of data packets over the
network so that the packets are not get lost, and data integrity is maintained.
CSMA/CA stands for Carrier Sense Multiple Access / Collision Avoidance is a network
protocol for carrier transmission. Like CSMA/CD it is also operated in the medium
access control layer. Unlike CSMA/CD (that is effective after a collision) CSMA / CA is
effective before a collision.

S.NO CSMA/CD CSMA/CA

CSMA / CD is effective after a Whereas CSMA / CA is effective


1.
collision. before a collision.

CSMA / CD is used in wired Whereas CSMA / CA is commonly


2.
networks. used in wireless networks.

Whereas CSMA/ CA minimizes the


3. It only reduces the recovery time.
possibility of collision.

Whereas CSMA / CA will first


CSMA / CD resends the data frame
4. transmit the intent to send for data
whenever a conflict occurs.
transmission.

CSMA / CD is used in 802.3 While CSMA / CA is used in 802.11


5.
standard. standard.

113
S.NO CSMA/CD CSMA/CA

It is more efficient than simple While it is similar to simple


6. CSMA(Carrier Sense Multiple CSMA(Carrier Sense Multiple
Access). Access).

It is the type of CSMA to detect the It is the type of CSMA to avoid


7
collision on a shared channel. collision on a shared channel.

8. It is work in MAC layer. It is also work in MAC layer.

5.1.3. Link layer addressing

The data link layer, which resides as the second layer in the OSI (Open System
Interconnection) network architecture model, plays a crucial role in ensuring reliable
communication between nodes. Let’s delve into the specifics of link layer addressing:
A link-layer address is called a link address, called a physical address, and sometimes a
MAC address. Since a link is controlled at the data-link layer, the addresses need to
belong to the data-link layer. When a datagram passes from the network layer to the data-
link layer, the datagram will be encapsulated in a frame and two data-link addresses are
added to the frame header. These two addresses are changed every time the frame moves
from one link to another.

5.1.3.1. MAC address

To communicate or transfer data from one computer to another, we need an address. In


computer networks, various types of addresses are introduced; each works at a different
layer. A MAC address, which stands for Media Access Control Address, is a physical
address that works at the Data Link Layer. In this article, we will discuss addressing a
DLL, which is the MAC Address.
MAC Addresses are unique 48-bit hardware numbers of a computer that are embedded
into a network card (known as a Network Interface Card) during manufacturing. The
MAC Address is also known as the Physical Address of a network device.

Format of MAC Address:

114
 A MAC address consists of a 12-digit hexadecimal number (equivalent to a 6-
bit binary number).
 It is typically represented using Colon-Hexadecimal notation (e.g., 00:40:96).
 The first 6 digits indicate the manufacturer (known as the OUI or
Organizational Unique Identifier), assigned by the IEEE Registration Authority
Committee.
 The remaining 6 digits represent the Network Interface Controller, assigned by
the manufacturer .
 Notably, different formats (such as Period-separated Hexadecimal notation)
can also be used .
Types of MAC Addresses:
 Unicast: Sent to a specific network interface card (NIC) and intended for only
one receiving NIC.
 Multicast: Allows sending frames to a group of devices within the LAN.

5.1.4. Data Link Sub Layers

The data link layer is the second layer from the bottom in the OSI (Open System
Interconnection) network architecture model. It is responsible for the node-to-node
delivery of data and ensures error-free transmission of information. The data link layer is
further divided into two sub-layers: Logical Link Control (LLC) and Media Access
Control (MAC). The LLC sublayer deals with multiplexing, the flow of data among
applications and other services, and provides error messages and acknowledgments. The
MAC sublayer manages the device’s interaction, is responsible for addressing frames,
and also controls physical media access. The data link layer receives the information in
the form of packets from the Network layer, it divides packets into frames and sends
those frames bit-by-bit to the underlying physical layer. The data link layer provides
various benefits such as framing, addressing, error control, flow control, and access
control1. The data link layer protocols are Ethernet, token ring, FDDI, and PPP.

5.1.4.1. Logical Link Control (LLC) and Data Link Control

LLC is responsible for establishing, maintaining, and then terminating logical links
between network devices.

115
It provides a reliable and error-free transmission of data across the network. The LLC
layer handles framing, flow control, error control, and synchronization of data. It also
helps in multiplexing different protocols over the same physical link.
DLC is responsible for the actual transmission of data frames between two network nodes
connected over a physical link. It takes the packets from the network layer and divides
them into data frames for transmission. The DLC layer adds necessary control
information to the frames, including addresses of the sender and receiver, error detection,
and flow control. LLC establishes and manages logical links between devices, while DLC
takes care of the actual transmission of data frames over the physical link. They work
together to ensure reliable and efficient communication between network devices.
5.1.5. Data Link and its responsibilities

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.

5.1.5.1. Data Link Control

Data Link Control is the service provided by the Data Link Layer to provide reliable data
transfer over the physical medium. For example, In the half-duplex transmission mode,
one device can only transmit the data at a time. If both the devices at the end of the links
transmit the data simultaneously, they will collide and leads to the loss of the
information. The Data link layer provides the coordination among the devices so that no
collision occurs.

5.1.5.2. Error detection and correction

Errors in the received frames are detected by means of Parity Check and Cyclic
Redundancy Check (CRC). In both cases, few extra bits are sent along with actual data to
confirm that bits received at other end are same as they were sent. If the counter-check at
receiver’ end fails, the bits are considered corrupted.
Error Correction
In the digital world, error correction can be done in two ways:

116
 Backward Error Correction When the receiver detects an error in the data
received, it requests back the sender to retransmit the data unit.
 Forward Error Correction When the receiver detects some error in the data
received, it executes error-correcting code, which helps it to auto-recover and to
correct some kinds of errors.
5.1.5.3. Data Link Layer Protocols

Data Link Layer protocols are generally responsible to simply ensure and confirm that
the bits and bytes that are received are identical to the bits and bytes being transferred. It
is basically a set of specifications that are used for implementation of data link layer just
above the physical layer of the Open System Interconnections (OSI) Model. The “Data-
Link layer,” is responsible for maintaining and terminating the established connection
between the network devices over the network channel. The Data-Link Layer has two
sublayers: The first is the “medium access control,” which uses the MAC addresses from
the network devices to transmit data between them.
1. Synchronous Data Link Protocol (SDLC) –SDLC is basically a communication
protocol of computer. It usually supports multipoint links even error recovery or error
correction also. It is also used to connect all of the remote devices to mainframe
computers at central locations may be in point-to-point (one-to-one) or point-to-
multipoint (one-to-many) connections. It is also used to make sure that the data units
should arrive correctly and with right flow from one network point to next network point
2. High-Level Data Link Protocol (HDLC) –HDLC is basically a protocol that is now
assumed to be an umbrella under which many Wide Area protocols sit. It is also adopted
as a part of X.25 network. It was originally created and developed by ISO in 1979. This
protocol is generally based on SDLC. It also provides best-effort unreliable service and
also reliable service. HDLC
is a bit-oriented protocol that is applicable for point-to-point and multipoint
communications both.
3. Serial Line Interface Protocol (SLIP) –SLIP is generally an older protocol that is just
used to add a framing byte at end of IP packet. It is basically a data link control facility
that is required for transferring IP packets usually among Internet Service Providers (ISP)
and a home user over a dial-up link. It is an encapsulation of the TCP/IP especially

117
designed to work with over serial ports and several router connections simply for
communication. It is some limitations like it does not provide mechanisms such as error
correction or error detection.
4. Point to Point Protocol (PPP) –PPP is a protocol that is basically used to provide
same functionality as SLIP. It is most robust protocol that is used to transport other types
of packets also along with IP Packets. It can also be required for dial-up and leased
router-router lines. It basically provides framing method to describe frames. It is a
character-oriented protocol that is also used for error detection. It is also used to provides
two protocols i.e. NCP and LCP. LCP is used for bringing lines up, negotiation of
options, bringing them down whereas NCP is used for negotiating network-layer
protocols. It is required for same serial interfaces like that of HDLC.
5. Link Control Protocol (LCP) –It was originally developed and created by IEEE
802.2. It is also used to provide HDLC style services on LAN (Local Area Network).
LCP is basically a PPP protocol that is used for establishing, configuring, testing,
maintenance, and ending or terminating links for transmission of data frames.
6. Link Access Procedure (LAP) –LAP protocols are a data link layer protocols that are
required for framing and transferring data across point-to-point links. It also includes
some reliability service features. There are three types of LAP i.e. LAPB (Link Access
Procedure Balanced), LAPD (Link Access Procedure D-Channel), and LAPF (Link
Access Procedure Frame-Mode Bearer Services). It is actually originated from IBM
SDLC, which is being submitted by IBM to the ISP simply for standardization.
7. Network Control Protocol (NCP) –NCP was also an older protocol that was
implemented by ARPANET. It allows users to have access to use computers and some of
the devices at remote locations and also to transfer files among two or more computers. It
is generally a set of protocols that is forming a part of PPP. NCP is always available for
each and every higher-layer protocol that is supported by PPP. NCP was replaced by
TCP/IP in the 1980s.
5.2. Physical Layer Services

The main functionality of the physical layer is to transmit the individual bits from one
node to another node. It is the lowest layer of the OSI model. It establishes, maintains and

118
deactivates the physical connection. It specifies the mechanical, electrical and procedural
network interface specifications.

Functions of a Physical layer:

 Line Configuration: It defines the way how two or more devices can be
connected physically.
 Data Transmission: It defines the transmission mode whether it is simplex, half-
duplex or full-duplex mode between the two devices on the network.
 Topology: It defines the way how network devices are arranged.
 Signals: It determines the type of the signal used for transmitting the information.
 Representation of Bits: The physical layer data includes a flow of bits without
any perception. It represents the encoding (how 0's and 1's is modified to signals).
 Data rate: It represents the transmission rate, i.e., the several bits communicated
per second.
 Transmission Medium: It represents the types of transmission medium.
 Synchronization of Bits: The sender and receiver should be integrated at the bit
method, i.e., the sender sends data simultaneously in which the receiver is ready to
receive.
 Line Configuration: Physical layer is concerned with connecting tools to the
channel, whether point to point or multipoint.
 Physical topology: It is defined in what way the devices are linked to create a
network.
 Transmission mode: It also defines the mode of transmission, i.e., the services of
a message between the two computers. In half-duplex, two computers can send and
get the data but not at a similar time. In full-duplex mode, the two devices can send
and get data at an equal time.

5.2.1. Bits

A bit is a basic unit of information or is the smallest unit of data in the computer and
digital communications, which stands for binary digit. Either 1 or a 0 (off or on, low or
high, false or true) is used to represent each bit. A byte is made up of eight bits, if you

119
had three bytes (word), it would be 24 bits (3 x 8=24), and 12 bytes will be 96 bits (12 x
8=96).

5.2.2. Ethernet

Ethernet is a type of communication protocol, which connects computers on a network


over a wired connection. It is a widely used LAN protocol, it connects computers within
the local area network and wide area network
It offers a simple user interface that helps to connect various devices easily, such as
switches, routers, and computers. A local area network (LAN) can be created with the
help of a single router and a few Ethernet cables, which enable communication between
all linked devices. Ethernet ports are slightly wider, and they look similar to telephone
jacks.
Different Types of Ethernet Networks

Fast Ethernet: supported by a twisted pair or CAT5 cable. The potential to transfer or
receive data at around100 Mbps. We use fiber optic cable and twisted pair cable to create
communication. The 100BASE-TX, 100BASE-FX, and 100BASE-T4 are the three
categories of Fast Ethernet.
Gigabit Ethernet: This type of Ethernet network is an upgrade from Fast Ethernet. Uses
fiber optic cable and twisted pair cable to create communication. It can transfer data at a
rate of 1000 Mbps or 1Gbps
10-Gigabit Ethernet: This type of network can transmit data at a rate of 10
Gigabit/second, considered a more advanced and high-speed network. It makes use of
CAT6a or CAT7 twisted-pair cables and fiber optic cables as well. This network can be
expended up to nearly 10,000 meters with the help of using a fiber optic cable.
Switch Ethernet: This type of network involves adding switches or hubs, which helps to
improve network throughput as each workstation in this network can have its own
dedicated 10 Mbps connection instead of sharing the medium. For the latest Ethernet, it
supports 1000Mbps to 10Gbps and 10Mbps to 100Mbps for fast Ethernet.
Advantages of Ethernet

 It is relatively inexpensive.
 provides high security

120
 The quality of the data transfer does maintain.
 Administration and maintenance are easier.
Disadvantages of Ethernet

 It needs deterministic service; therefore, it is not considered the best for real-time
applications.
 The wired Ethernet network restricts you in terms of distances, and it is best for
using in short distances.
 If you create a wired Ethernet network that needs cables, hubs, switches, routers,
they increase the cost of installation.
 In Ethernet network, any acknowledge is not sent by receiver after accepting a
packet.
 Comparing with the wired Ethernet network, wireless network is not more secure.

5.2.3. Point-to-Point Protocol

It is the most commonly used protocol for point-to-point access. Suppose the user wants
to access the internet from the home, the PPP protocol will be used.
It is a data link layer protocol that resides in the layer 2 of the OSI model. It is used to
encapsulate the layer 3 protocols and all the information available in the payload in order
to be transmitted across the serial links. The PPP protocol can be used on synchronous
link like ISDN as well as asynchronous link like dial-up. It is mainly used for the
communication between the two devices. It can be used over many types of physical
networks such as serial cable, phone line, trunk line, cellular telephone, and fiber optic
links such as SONET.

5.2.4. LAN Devices: Repeaters, Hubs, Bridges and switches

Repeaters: A repeater operates at the physical layer. Its job is to regenerate the signal
over the same network before the signal becomes too weak or corrupted so as to extend
the length to which the signal can be transmitted over the same network. An important
point to be noted about repeaters is that they do not amplify the signal. When the signal
becomes weak, they copy the signal bit by bit and regenerate it at the original strength. It
is a 2-port device.

121
Hubs: Hubs connect multiple computer networking devices together. A hub also acts as a
repeater in that it amplifies signals that deteriorate after traveling long distances over
connecting cables. A hub is the simplest in the family of network connecting devices
because it connects LAN components with identical protocols. A hub can be used with
both digital and analog data, provided its settings have been configured to prepare for the
formatting of the incoming data. For example, if the incoming data is in digital format,
the hub must pass it on as packets; however, if the incoming data is analog, then the hub
passes it on in signal form. Hubs do not perform packet filtering or addressing functions;
they just send data packets to all connected devices. Hubs operate at the Physical layer of
the Open Systems Interconnection (OSI) model. There are two types of hubs: simple and
multiple port. A hub is basically a multiport repeater. A hub connects multiple wires
coming from different branches, for example, the connector in star topology which
connects different stations. Hubs cannot filter data, so data packets are sent to all
connected devices. In other words, the collision domain of all hosts connected through
Hub remains one. Also, they do not have the intelligence to find out the best path for data
packets which leads to inefficiencies and Wastage.
 Active Hub: – These are the hubs that have their own power supply and can clean,
boost, and relay the signal along with the network. It serves both as a repeater as
well as a wiring center. These are used to extend the maximum distance between
nodes.
 Passive Hub:- These are the hubs that collect wiring from nodes and power supply
from the active hub. These hubs relay signals onto the network without cleaning
and boosting them and can’t be used to extend the distance between nodes.
 Intelligent Hub:- It works like active hubs and includes remote management
capabilities. They also provide flexible data rates to network devices. It also enables
an administrator to monitor the traffic passing through the hub and to configure
each port in the hub.
Bridge – A bridge operates at the data link layer. A bridge is a repeater with add on the
functionality of filtering content by reading the MAC addresses of source and destination.
It is also used for interconnecting two LANs working on the same protocol. It has a
single input and single output port, thus making it a 2 port device.

122
Types of Bridges
Transparent Bridges:- These are the bridge in which the stations are completely
unaware of the bridge’s existence i.e. whether or not a bridge is added or deleted from the
network, reconfiguration of the stations is unnecessary. These bridges make use of two
processes i.e. bridge forwarding and bridge learning.
Source Routing Bridges:- In these bridges, routing operation is performed by the source
station and the frame specifies which route to follow. The host can discover the frame by
sending a special frame called the discovery frame, which spreads through the entire
network using all possible paths to the destination.
Switch – A switch is a multiport bridge with a buffer and a design that can boost its
efficiency (a large number of ports imply less traffic) and performance. A switch is a data
link layer device. The switch can perform error checking before forwarding data, which
makes it very efficient as it does not forward packets that have errors and forward good
packets selectively to the correct port only. In other words, the switch divides the
collision domain of hosts, but broadcast domain remains the same. Switches generally
have a more intelligent role than hubs. A switch is a multiport device that improves
network efficiency. The switch maintains limited routing information about nodes in the
internal network, and it allows connections to systems like hubs or routers. Strands of
LANs are usually connected using switches. Generally, switches can read the hardware
addresses of incoming packets to transmit them to the appropriate destination.
Using switches improves network efficiency over hubs or routers because of the virtual
circuit capability. Switches also improve network security because the virtual circuits are
more difficult to examine with network monitors.
 You can think of a switch as a device that has some of the best capabilities of routers
and hubs combined.
 A switch can work at either the Data Link layer or the Network layer of the OSI
model.
 A multilayer switch is one that can operate at both layers, which means that it can
operate as both a switch and a router.

123
 A multilayer switch is a high performance device that supports the same routing
protocols as routers.
 Switches can be subject to distributed denial of service (DDoS) attacks; flood guards
are used to prevent malicious traffic from bringing the switch to a halt.
 Switch port security is important so be sure to secure switches: Disable all unused
ports and use DHCP snooping, ARP inspection and MAC address filtering.

5.2.5. WAN Devices Routers, Layer 3 Switches and Gateways

Routers: Routers help transmit packets to their destinations by charting a path through
the sea of interconnected networking devices using different network topologies. Routers
are intelligent devices, and they store information about the networks they’re connected
to. Routers are general-purpose devices that interconnect two or more heterogeneous
networks. They are usually dedicated to special-purpose computers, with separate input
and output network interfaces for each connected network. Because routers and gateways
are the backbone of large computer networks like the internet, they have special features
that give them the flexibility and the ability to cope with varying network addressing
schemes and frame sizes through segmentation of big packets into smaller sizes that fit
the new network components.
Each router interface has its own Address Resolution Protocol (ARP) module, its own
LAN address (network card address) and its own Internet Protocol (IP) address. The
router, with the help of a routing table, has knowledge of routes a packet could take from
its source to its destination. The routing table, like in the bridge and switch, grows
dynamically. Upon receipt of a packet, the router removes the packet headers and trailers
and analyzes the IP header by determining the source and destination addresses and data
type, and noting the arrival time. It also updates the router table with new addresses not
already in the table.
The IP header and arrival time information is entered in the routing table. Routers
normally work at the Network layer of the OSI model. A router is a device like a switch
that routes data packets based on their IP addresses. The router is mainly a Network
Layer device. Routers normally connect LANs and WANs together and have a

124
dynamically updating routing table based on which they make decisions on routing the
data packets. Router divide broadcast domains of hosts connected through it.
Layer 3 switch: A Layer 3 switch is a special network device that has the functionality
of a router and a switch combined into one chassis. It works in our network by simply
allowing connected devices that are on the same subnet or virtual LAN (VLAN) to
exchange information at lightning speed, just like a switch that operates in the data link
layer of the OSI model, but it also has the IP routing intelligence of a router built into it.
A layer 3 switch is a device that forwards traffic (frames) based on layer 3 information
(mainly through mac-address). Layer 3 switch supports all switching features, while also
has some basic routing functions to route between the VLANs. Layer 3 switch is
conceived as a technology to improve network routing performance on large LANs.

A Layer 3 switch is a special network device that has the functionality of a router and a
switch combined into one chassis. It works in our network by simply allowing connected
devices that are on the same subnet or virtual LAN (VLAN) to exchange information at
lightning speed, just like a switch that operates in the data link layer of the OSI model,
but it also has the IP routing intelligence of a router built into it.
It can inspect incoming packets in the network layer, support routing protocols, and even
make routing decisions based on the source and destination IP addresses.

Gateway: A gateway, as the name suggests, is a passage to connect two networks that
may work upon different networking models. They work as messenger agents that take
data from one system, interpret it, and transfer it to another system. Gateways are also
called protocol converters and can operate at any network layer. Gateways are generally
more complex than switches or routers. A gateway is also called a protocol converter.

5.2.7. Physical Layer and its responsibilities

The physical layer is the first and, therefore, the bottommost layer of the OSI model. It
allows for physical connections to be created, monitored and deactivated.
Responsibilities of the physical layer have

 The main task of the physical layer is to allow for a physical connection between
two units within a network.

125
 It ensures that connections can be created and terminated.
 It facilitates the monitoring of connections while data is being transferred. The
most important elements are bits, which are the smallest units of information that
are transferred.
 It regulates the bit structure, their meaning, and the individual methods used to
transfer them.
 The physical layer only creates the physical connection, transferring all data as
energy in the form of bits. Once it has completed this task, it deactivates the
connection. The physical layer also takes on a few management functions
 Provides information about how the binary digits should be physically
represented. This can, for example, be electrical, electromagnetic, optical or
acoustic.
 Checks the direction of the transfer. Directions can be simplex (in one
direction), half duplex (changing between both directions but not at the same
time) or full duplex (occurring at the same time in both directions).
 It transfers data bit by bit or symbol by symbol.
 It performs bit synchronization, which means that only one bit needs to be
transferred from one system to another at a time. There should be no overlapping
of bits during transmission.
 The physical layer is responsible for knowing the arrangements made between
devices in networks called physical topologies, such as mesh, ring, bus, and star.
 It is responsible for point-to-multipoint, point-to-point, or multipoint line
configurations.
 It is responsible for flow control and start-stop signaling in asynchronous serial
communication.
 Signal processing of physical signals such as training sequence, pulse shaping,
equalization filtering, and others.
 It provides bit-interleaving and another channel coding.
 It is responsible for serial or parallel communication.

126
Review Questions
 Discuss about the data link layer and its responsibilities in OSI reference model
 Discuss about physical layer and its responsibilities in OSI reference model
 Discuss about link layer addresses
 Discuss about data link layer protocols
 Discuss about LAN devices in detail
 Discuss about WAN technology devices in detail

127
Multiple-choice questions

1. One of the following is correct about transmission mode.


A. In simplex mode, data transmitted from the source to the receiver in both directions.
B. Data can be transmitted in both directions simultaneous in half duplex.
C. Data is transmitted in both directions alternatively in full duplex.
D. Telephone communication is a typical example of full duplex.
2. What does a Network Protocol define?
A. It defines the Syntax of a Message
B. It defines the Semantics of a Message
C. It defines the actions to take on receipt of a message
D. All
3. One of the following is the Default Mask of Class B.
A. 255.0.0.0 B. 255.248.0.0 C. 255.255.255.0 D. 255.255.0.0
4. What is the Class of the IP Address 132.21.34.78?
A. Class A B. Class B C. Class C D. Class D
5. Select the incorrect statement about network connectivity.
A. Every client computer is equal in the client/server architecture.
B. There is high security in peer-to-peer network than client /server.
C. In peer-to-peer connectivity, there is no dedicated Server.
D. Client /Server network is more expensive than peer-to- peer.
6. Which one of the following pair of IP Addresses are within the same Block (Network)?
A. 189.34.455.25 and 189.34.455.24 B. 246.22.31.66 and 246.22.32.254 C.
191.23.16.55 and 192.23.16.56 D. 221.22.45.66 and 221.22.45.189
7. Which one of the following is an advantages of computer Networks?
A. Information Hacking B. Resource Sharing C. Rapid Spread of Computer Viruses D.
Vulnerability to remote exploits
8. One of the following statements is a valid MAC Address.
A. AB-34-SD-44-00-FK B. B0-EE-H9-D0-90-00 C. F0-EE-09-D0-90-AB
D. CC-EE-09-D0-90-FZ
9. One of the following is the most popular LAN Architecture (Technology)?

128
A. Ethernet B. Token Ring C. FDDI D. DNS
10. Which one of the following statements is not true?
A. MAC Address is used at the Data link layer.
B. Transport layer uses IP address.
C. IP address is a logical address
D. MAC address is a physical address.
11. The Application Layer Protocol that dynamically assigns IP addresses to hosts is
called:
A. HTTP B. DNS C. DHCP D. SNMP
12. The standard connector used by UTP cables is _______.
A. BNC B. RJ-45 C. ST D. SC
13. One of the following is wrong about internetworking devices?
A. Repeaters are dedicated to extend the length of cable segments
B. Hub is a multi-port signal regenerator.
C. Router provides connectivity between two different LANs.
D. Both Switch and Hub Assigns IP address to Computers
14. One of the following is a parameter used to select either a Peer-to-Peer or Server
based network:
A. Size of the organization B. Network budget C. Level of Network Security required
D. All
15. Which one of the following is true?
A. LAN has no geographic area limitations.
B. CSMA/CD is a type of Random-Access protocol.
C. Logical Topology refers to the way cables and computers are arranged
D. Physical topology refers to the data flow in a computer network
16. A Network Device that has two ports and used only to regenerate a weak signal is:
A. Hub B. Switch C. Router D. Repeater
17. One of the following is not true?
A. the OSI Reference Model divides communication functions into Seven Layers.
B. the OSI Reference model is developed by the standard organization called ISO.
C. It discourages competition and innovation

129
D. the OSI Reference Model was developed for Interoperability purpose.
18. As data units are encapsulated down the OSI reference model, which one of the
following is the correct order?
A. User Data → Packet → Frame → Bits → Segment
B. Bits → Frame → Packet → Segment → User Data
C. User Data → Segment → Frame → Bits → Packet
D. User Data → Segment → Packet → Frame → Bits
19. The layer in the OSI Reference model responsible for Data format conversion, Data
compression and Encryption (Decryption) is ______.
A. Presentation B. Session C. Data Link D. Application
20. What is the purpose of flow control?
A. To ensure that data is retransmitted if an acknowledgment is not received
B. To reassemble segments in the correct order at the destination device
C. To provide a means for the receiver to govern the amount of data sent by the sender
D. To regulate the size of each segment
21. The Technique that converts digital data to analogue signal is called
A. Encoding B. Demodulation C. Modulation D. Decoding
22. Communication between a radio station and its listeners involves
________transmission.
A. Simplex B. full-duplex C. half-duplex D. automatic
23. How does a host on an Ethernet LAN know when to transmit after a collision has
occurred?
A. In a CSMA/CD collision domain, multiple stations can successfully transmit data
simultaneously.
B. You can improve the CSMA/CD network by adding more hubs.
C. After a collision, the station that detected the collision has first priority to resend the
lost data.
D. After a collision, all stations run a random backoff algorithm. When the backoff delay
period has expired, all stations have equal priority to transmit data.
24. Which one of the following lists are not component of an analogue signals
A. Discrete pulse B. Amplitude C. phase D. Wavelength

130
25. Which of the following does not describe router functions
A. Packet switching B. Packet filtering C. Broadcast forwarding D. Internetwork
communication
26. Routers operate at layer __. LAN switches operate at layer __.
A. 3, 2 B. 2, 3 C. 3, 4 D. 2, 1
27. Acknowledgments, sequencing, and flow control are characteristics of which OSI
layer?
A. Layer 3 B. Layer 5 C. Layer 4 D. Layer 7
28. Which two of the following are private IP addresses?
A. 12.0.0.1 B. 172.40.14.36 C. 192.172.19.39 D.192.168.24.43
29. What is the maximum number of IP addresses that can be assigned to hosts on a local
subnet that uses the 255.255.255.224 subnet mask?
A. 14 B. 15 C. 31 D. 30
30. You want to implement a network medium that is not susceptible to EMI. Which type
of cabling should you use?
A. coaxial B. Microwave C. Category 6 UTP D. Fiber-optic

1. A 11. C 21. C
2. D 12. B 22. A
3. D 13. D 23. D
4. C 14. D 24. A
5. B 15. B 25. C
6. D 16. D 26. A
7. B 17. C 27. B
8. C 18. D 28. D
9. A 19. A 29. D
10. B 20. C 30. D

131

You might also like