100% found this document useful (1 vote)
274 views43 pages

Data Communication & Networking Basics

1. The document is an introduction to a course on data communications and networking. It discusses the goals of the course, which are to teach networking principles using a bottom-up approach and the layered protocol model of the Internet and TCP/IP. 2. The course will cover topics such as data representation, the components of a data communication system, different types of data flow (simplex, half-duplex, full-duplex), and the layers of the TCP/IP protocol suite. 3. The goal is for students to understand how data is transmitted at the physical layer and how applications exchange messages at the higher layers by learning each layer in sequence from the bottom up.

Uploaded by

NETHRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
274 views43 pages

Data Communication & Networking Basics

1. The document is an introduction to a course on data communications and networking. It discusses the goals of the course, which are to teach networking principles using a bottom-up approach and the layered protocol model of the Internet and TCP/IP. 2. The course will cover topics such as data representation, the components of a data communication system, different types of data flow (simplex, half-duplex, full-duplex), and the layers of the TCP/IP protocol suite. 3. The goal is for students to understand how data is transmitted at the physical layer and how applications exchange messages at the higher layers by learning each layer in sequence from the bottom up.

Uploaded by

NETHRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

18CS46 N C NETHRA

Asst. Prof. Csedept

Introduction to data communication & networking

What is in the syllabus?


People use the Internet more and more every day.
They use the Internet for research, shopping, airline reservations, checking the latest news and
weather, and so on.
In this Internet-oriented society, specialists need be trained to run and manage the Internet, part
of the Internet, or an organization’s network that is connected to the Internet.
This book is designed to help students understand the basics of data communications and
networking in general and the protocols used in the Internet in particular.
Features
Although the main goal of the book is to teach the principles of networking, it is designed to
teach these principles using the following goals:
Protocol Layering
The book is designed to teach the principles of networking by using the protocol layering of the
Internet and the TCP/IP protocol suite.
Bottom-Up Approach
This book uses a bottom-up approach. Each layer in the TCP/IP protocol suite is built on the
services provided by the layer below.
We learn how bits are moving at the physical layer before learning how some programs
exchange messages at the application layer.

1.1 DATA COMMUNICATIONS


Introduction
• When we communicate, we are sharing information.
• This sharing can be local or remote. Between individuals, local communication usually
occurs face to face, while remote communication takes place over distance.
• The term telecommunication, which includes telephony, telegraphy, and television,
means communication at a distance (tele is Greek for “far”).
• The word data refers to information presented in whatever form is agreed upon by the
parties creating and using the data.
• 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.
1. 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.
2. Accuracy. The system must deliver the data accurately. Data that have been altered in
transmission and left uncorrected are unusable.
3. 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.

KNSIT Page 1
18CS46 N C NETHRA
Asst. Prof. Csedept

4. Jitter. Jitter refers to the variation in the packet arrival time. It is the uneven delay in the
delivery of audio or video packets. For example, let us assume that video packets are sent every
30 ms. If some of the packets arrive with 30-ms delay and others with 40-ms delay, an uneven
quality in the video is the result.

1.1.1 Components
A data communications system has five components (see Figure 1.1).

1 Message. The message is the information (data) to be communicated. Popular forms of


information include text, numbers, pictures, audio, and video.
2. Sender. The sender is the device that sends the data message. It can be a computer,
workstation, telephone handset, video camera, and so on.
3. Receiver. The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message
travels from sender to receiver. Some examples of transmission media include twisted-pair wire,
coaxial cable, fiber-optic cable, and radio waves.
5. Protocol. A protocol is a set of rules that govern data communications. It represents an
agreement between the communicating devices. Without a protocol, two devices may be
connected but not communicating, just as a person speaking French cannot be understood by a
person who speaks only Japanese.

1.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 (0s or 1s).
• 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 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), the first 127
characters in Unicode. It is a code for representing 128 English characters as numbers,
with each letter assigned a number from 0 to 127. For example, the ASCII code for
uppercase A is 65,a is 97.
• Numbers
• Numbers are also represented by bit patterns.

KNSIT Page 2
18CS46 N C NETHRA
Asst. Prof. Csedept

• 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. For example, an image can be divided
into 1000 pixels or 10,000 pixels.
• In the second case, there is a better representation of the image.
• After an image is divided into pixels, each pixel is assigned a bit pattern.
• a 1-bit pattern is enough to represent a pixel(black and white).
• If an image is not made of pure white and pure black pixels, we can increase the size of
the bit pattern to include gray scale, we can use 2-bit patterns.
• A black pixel can be represented by 00, a dark gray pixel by 01, a light gray pixel by 10,
and a white pixel by 11.
• There are several methods to represent color images. One method is called RGB, so
called because each color is made of a combination of three primary colors: red, green,
and blue. The intensity of each color is measured, and a bit pattern is assigned to it.
• Another method is called YCM, in which a color is made of a combination of three other
primary colors: yellow, cyan, and magenta.
• 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. Even when we use a microphone to change voice or music
to an electric signal, we create a continuous signal(Chapter 26).
• 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(Chapter 26).

1.1.3 Data Flow


• Communication between two devices can be simplex, half-duplex, or full-duplex as

shown in Figure 1.2.


Simplex
KNSIT Page 3
18CS46 N C NETHRA
Asst. Prof. Csedept

• In simplex mode, the communication is unidirectional, as on a one-way street.


• Only one of the two devices on a link can transmit; the other can only receive (see Figure
1.2a).
• Keyboards and traditional monitors are examples of simplex devices.
• The keyboard can only introduce input; the monitor can only accept output.
• The simplex mode can use the entire capacity of the channel to send data in one direction.
Half-Duplex
• In half-duplex mode, each station can both transmit and receive, but not at the same
time.
• When one device is sending, the other can only receive, and vice versa (see Figure 1.2b).
• The half-duplex mode is like a one-lane road with traffic allowed in both directions.
• When cars are traveling in one direction, cars going the other way must wait, Walkie-
talkies
• The half-duplex mode is used in cases where there is no need for communication in both
directions at the same time.
Full-Duplex
• In full-duplex mode (also called duplex), both stations can transmit and receive
simultaneously (see Figure 1.2c).
• The full-duplex mode is like a two-way street with traffic flowing in both directions at
the same time.
• In full-duplex mode, signals going in one direction share the capacity of the link with
signals going in the other direction.
• This sharing can occur in two ways: Either the link must contain two physically separate
transmission paths, one for sending and the other for receiving; or the capacity of the
channel is divided between signals traveling in both directions.
• One common example of full-duplex communication is the telephone network.
• When two people are communicating by a telephone line, both can talk and listen at the
same time.
• The full-duplex mode is used when communication in both directions is required all the
time.

1.2 NETWORKS
• A network is the interconnection of a set of devices capable of communication.
• a device can be a host (or an end system as it is sometimes called) such as a large
computer, desktop, laptop, workstation, cellular phone, or security system.
• A device in this definition can also be a connecting device such as a router, which
connects the network to other networks, a switch, which connects devices together, a
modem (modulator-demodulator), which changes the form of data, and so on.
• These devices in a network are connected using wired or wireless transmission media
such as cable or air.
1.2.1 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.

KNSIT Page 4
18CS46 N C NETHRA
Asst. Prof. Csedept

• 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.
• 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.

1.2.2 Physical Structures


• Before discussing networks, we need to define some network attributes.
• Type of Connection
• A network is two or more devices connected through links.
• A link is a communications pathway that transfers data from one device to another.
• For communication to occur, two devices must be connected in some way to the same
link at the same time.
• There are two possible types of connections: point-to-point and multipoint.
• Point-to-Point
• A point-to-point connection provides a dedicated link between two devices.
• The entire capacity of the link is reserved for transmission between those two
devices.
• Most point-to-point connections use an actual length of wire or cable to connect
the two ends(see Figure 1.3a).

• Multipoint
• A multipoint (also called multidrop) connection is one in which more than two
specific devices share a single link (see Figure 1.3b).

KNSIT Page 5
18CS46 N C NETHRA
Asst. Prof. Csedept

Physical Topology
• The term physical topology refers to the way in which a network is laid out physically.
• Two or more devices connect to a link; two or more links form a topology.
• The topology of a network is the geometric representation of the relationship of all the
links and linking devices (usually called nodes) to one another.
• There are four basic topologies possible: mesh, star, bus, and ring.
• Mesh Topology
• In a mesh topology, every device has a dedicated point-to-point link to every other
device.
• The term dedicated means that the link carries traffic only between the two devices it
connects.
• To find the number of physical links in a fully connected mesh network with n nodes, we
first consider that each node must be connected to every other node.
• Node 1 must be connected to n – 1 nodes, node 2 must be connected to n – 1 nodes, and
finally node n must be connected to n – 1 nodes.
• We need n (n – 1) physical links. However, if each physical link allows communication
in both directions (duplex mode), we can divide the number of links by 2.
• In other words, we can say that in a mesh topology, we need n (n – 1) / 2 duplex-mode
links.
• To accommodate that many links, every device on the network must have n – 1
input/output (I/O) ports (see Figure 1.4) to be connected to the other n – 1 stations.
• A mesh of advantages over other network topologies.
• First, the use of dedicated links guarantees that each connection can carry its own
data load, thus eliminating the traffic problems that can occur when links must be
shared by multiple devices.
• Second, a mesh topology is robust. If one link becomes unusable, it does not
incapacitate the entire system.
• Third, there is the advantage of privacy or security. When every message travels
along a dedicated line, only the intended recipient sees it.

KNSIT Page 6
18CS46 N C NETHRA
Asst. Prof. Csedept

• The main disadvantages of a mesh are related to the amount of cabling and the number
of I/O ports required.
• First, because every device must be connected to every other device, installation
and reconnection are difficult.
• Second, the sheer bulk of the wiring can be greater than the available space (in
walls, ceilings, or floors) can accommodate.
• Finally, the hardware required to connect each link (I/O ports and cable) can be
prohibitively expensive. For these reasons a mesh topology is usually
implemented in a limited fashion.

• Example of Mesh Topology in Real Life


• One practical example of a mesh topology is the connection of telephone regional
• offices in which each regional office needs to be connected to every other
regional office.
• Due to high cost, we normally don`t prefer to use it. However, you can use it in a
scenario where cost is not a problem and your main focus is towards the reliability
and performance.
• But one of the finest Examples of Mesh Network Topology is Zigbee.
• Zigbee is basically a Wireless Sensor Network.
• Moreover, devices in such a Network don`t require higher data transfer
rates. Usually this type of Networks perform in a limited geographical
area. So, it can be classified as Wireless Personal Area Network.
• What is Zigbee and why is it important for your smart home(home
automation/IOT)?

Simplex Mesh Topology Link Calculation


Mesh Topology Number of Links = N×(N–1)

KNSIT Page 7
18CS46 N C NETHRA
Asst. Prof. Csedept

Example: Suppose we have three (3) computers and we want to configure these in Simplex
Configuration of Mesh Topology
Well in this case N will be 3 i.e. N = 3. So according to the equation formula:
Mesh Topology Number of Links = 3×(3–1) = 3 × 2 = 6
In this scenario, we will require a total of six (6) cables for configuring the Mesh Computer
Network.

Simplex Mesh Topology Link Calculation


Mesh Topology Number of Cables = N×(N–1)2
Example: Suppose we have four (4) computers and we want to configure these in Duplex
Configuration of Mesh Topology
Well in this case N will be 4 i.e. N = 4. So according to the equation formula:
Mesh Topology Number of Cables = N×(N–1)2 = 4×(4–1)2=4×32=6
In this scenario, we will require a total of six (6) cables for configuring the Mesh Network of
Computers.

Star Topology
• In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub.
• The devices are not directly linked to one another.
• Unlike a mesh topology, a star topology does not allow direct traffic between devices.
• The controller acts as an exchange: If one device wants to send data to another, it sends
the data to the controller, which then relays the data to the other connected device (see
Figure 1.5) .

advantages over mesh topology


• A star topology is less expensive than a mesh topology. In a star, each device needs only
one link and one I/O port to connect it to any number of others.
• This factor also makes it easy to install and reconfigure.

KNSIT Page 8
18CS46 N C NETHRA
Asst. Prof. Csedept

• Far less cabling needs to be housed, and additions, moves, and deletions involve only one
connection: between that device and the hub.
• If one link fails, only that link is affected. All other links remain active. This factor also
lends itself to easy fault identification and fault isolation.
• As long as the hub is working, it can be used to monitor link problems and bypass
defective links.
disadvantage of a star topology
• the dependency of the whole topology on one single point, the hub. If the hub goes down,
the whole system is dead.
• Although a star requires far less cable than a mesh, each node must be linked to a central
hub. For this reason, often more cabling is required in a star than in some other topologies
(such as ring or bus).
Examples
• The star topology is used in local-area networks (LANs)
• High-speed LANs often use a star topology with a central hub.
• You can find this Network Topology in different organizations including Banks, Schools,
Computer Labs, Libraries, Bus Terminals and Departmental Stores.
• Most of you have Internet connection at your home or offices. In most of the cases
today, we like to use it with the help of WiFi. Internet Service Providers (ISPs) provide
us with Wireless Modem. Due to this fact, we have Wireless Modem at our home or
office. When anybody wants to connect to the Internet there is no restriction on him/her
in terms of location. Moreover, a Wireless Modem can spread signals throughout a room
or group of rooms or even a building. So, we connect our laptops, tablet PCs and
Smartphones to the Wireless Modem for accessing the Internet. Hence, all our devices
connect to a single central device known as Hub.

Bus Topology
• point-to-point connections.
• A bus topology, on the other hand, is multipoint.
• One long cable acts as a backbone to link all the devices in a network (see Figure 1.6).

• Nodes are connected to the bus cable by drop lines and taps.
• A drop line is a connection running between the device and the main cable.
• A tap is a connector that either splices into the main cable or punctures the sheathing of a
cable to create a contact with the metallic core.
• As a signal travels along the backbone, some of its energy is transformed into heat.
Therefore, it becomes weaker and weaker as it travels farther and farther.
• For this reason there is a limit on the number of taps a bus can support and on the
distance between those taps.

KNSIT Page 9
18CS46 N C NETHRA
Asst. Prof. Csedept

Advantages of a bus topology


• ease of installation.
• Backbone cable can be laid along the most efficient path, then connected to the nodes by
drop lines of various lengths. In this way,
• a bus uses less cabling than mesh or star topologies.
• In a star, for example, four network devices in the same room require four lengths of
cable reaching all the way to the hub.
• In a bus, this redundancy is eliminated. Only the backbone cable stretches through the
entire facility.
• Each drop line has to reach only as far as the nearest point on the backbone.

Disadvantages
• difficult reconnection and fault isolation.
• A bus is usually designed to be optimally efficient at installation. It can therefore be
difficult to add new devices.
• Signal reflection at the taps can cause degradation in quality. This degradation can be
controlled by limiting the number and spacing of devices connected to a given length of
cable.
• Adding new devices may therefore require modification or replacement of the backbone.
• In addition, a fault or break in the bus cable stops all transmission, even between devices
on the same side of the problem.
• The damaged area reflects signals back in the direction of origin, creating noise in both
directions.
• Bus topology was the one of the first topologies used in the design of early local area
networks. Traditional Ethernet LANs can use a bus topology.

Examples
A bus topology is a topology for a Local Area Network (LAN) in which all the nodes are
connected to a single cable. The cable to which the nodes connect is called a "backbone". If the
backbone is broken, the entire segment fails. Bus topologies are relatively easy to install and
don't require much cabling compared to the alternatives.

Bus topology
The bus topology is e.g. used by Ethernet networks.

KNSIT Page 10
18CS46 N C NETHRA
Asst. Prof. Csedept

Ring Topology
• In Ring Topology connects the Network Devices in a completely closed path. This closed
path can be in any form like circle, triangle, square or whatever else. You can easily
identify the closed path. A closed path starting point and ending point is always the same
• In a ring topology, each device has a dedicated point-to-point connection with only the
two devices on either side of it.
• A signal is passed along the ring in one direction, from device to device, until it reaches
its destination. Each device in the ring incorporates a repeater. When a device receives a
signal intended for another device, its repeater regenerates the bits and passes them along
(see Figure 1.7).

• Advantage
• A ring is relatively easy to install and reconfigure.
• Each device is linked to only its immediate neighbors (either physically or
logically).
• To add or delete a device requires changing only two connections.
• The only constraints are media and traffic considerations (maximum ring length
and number of devices). In addition, fault isolation is simplified.
• Generally, in a ring a signal is circulating at all times. If one device does not
receive a signal within a specified period, it can issue an alarm.
• The alarm alerts the network operator to the problem and its location.

• disadvantage
• However, unidirectional traffic can be a disadvantage.
• In a simple ring, a break in the ring (such as a disabled station) can disable the
entire network. This weakness can be solved by using a dual ring or a switch
capable of closing off the break.
• Ring topology was prevalent when IBM introduced its local-area network, Token
Ring.

• Examples
• one of the common example that still exists is SONET Rings. SONET stands
for Synchronous Optical Networking. It uses Fiber Optic Cables for heavy
load data transfers for long distances. Due to the use of Fiber Optic Cable, it
provides the best data transfer speeds. SONET is one of the most
popular Applications of Ring Topology.

KNSIT Page 11
18CS46 N C NETHRA
Asst. Prof. Csedept

1.3 NETWORK TYPES


• Network refers to the set of devices (nodes) connected by communication links. A node
can be a computer, printer, or any other device capable of sending and/or receiving data
generated by other devices on the network.
• A network is categories into three types such as Local Area Network (LAN),
Metropolitan Area Network (MAN) and Wide Area Networks (WAN).
• The criteria of distinguishing one type of network from another is difficult and sometimes
confusing.
• We use a few criteria such as size, geographical coverage, and ownership to make this
distinction.

1.3.1 Local Area Network


• A local area network (LAN) connects some hosts in a single office, building, or
campus.
• Depending on the needs of an organization, a LAN can be as simple as two PCs and a
printer in someone’s home office, or it can extend throughout a company and include
audio and video devices. Each host in a LAN has an identifier, an address, that uniquely
defines the host in the LAN.
• A packet sent by a host o another host carries both the source host’s and the destination
host’s addresses.
• Today, most LANs use a smart connecting switch, which is able to recognize the
destination address of the packet and guide the packet to its destination without sending it
to all other hosts.
• The switch alleviates he traffic in the LAN and allows more than one pair to
communicate with each
• other at the same time if there is no common source and destination among them.
Figure1.8 hows a LAN using either a common cable or a switch.

KNSIT Page 12
18CS46 N C NETHRA
Asst. Prof. Csedept

Local Area Network (LAN)


• Local area network is the computer network that connects computers within the limited
area such as schools, colleges or universities.
• Local area networks, generally called LANs, are privately-owned networks. They provide
a useful way of sharing resources between end users. The resources such as printers, file
servers, scanners, and internet are easily sharable among other connected computers in a
network.
• local area networks use either Wi-Fi or Ethernet to connect computer and devices in a
network.
• A typical Wi-Fi LAN operates one or more wireless access points that devices within
coverage area connect to. These access points, manage network traffic which is flowing
to and from the connected devices. In our home, school, office’s LAN, wireless
broadband routers perform the functions of an access point.

• A typical Ethernet LAN consisting of an ethernet cable to which all the machines are
attached, like in our school labs, number of computers connected to each other through
the common ethernet cable.
• Topologies used in LANs:Bus topology,ing topology,tar topology

Characteristics of Local Area Network


• LANs are private owned-network, can be extended up to a few kilometers.
• LANs operate at relatively high speed as compared to the typical WAN
• It connects computers within a single office, building, block or campus, i.e. they work in
a relatively small geographical area.

Advantages of LAN
• Resource Sharing: LAN provides resource sharing such as computer resources like
printers, scanners, modems, DVD-ROM drives, and hard disks can be shared within the
connected devices. This reduces cost and hardware purchases.
• Software Applications Sharing: In a Local Area Network, it is easy to use the same
software in a number of computers connected to a network instead of purchasing the
separately licensed software for each client a network.
• Easy and Cheap Communication: Data and messages can easily be shared with the other
computer connected to the network.

KNSIT Page 13
18CS46 N C NETHRA
Asst. Prof. Csedept

• Centralized Data: The data of all network users can be stored on a hard disk of the
central/server computer. This help users to use any computer in a network to access the
required data.
• Data Security: Since data is stored on the server computer, it will be easy to manage data
at only one place and the data will be more secure too.
• Internet Sharing: Local Area Network provides the facility to share a single internet
connection among all the LAN users. In school labs and internet Cafes, single internet
connection is used to provide internet to all connected computers.

Disadvantages of LAN
• High Setup Cost: The initial setup costs of installing Local Area Networks is high
because there is special software required to make a server. Also, communication devices
like an ethernet cable, switches, hubs, routers, cables are costly.
• Privacy Violations: The LAN administrator can see and check personal data files of each
and every LAN user. Moreover, he can view the computer and internet history of the
LAN user.
• Data Security Threat: Unauthorised users can access important data of an office or
campus if a server hard disk is not properly secured by the LAN administrator.
• LAN Maintenance Job: Local Area Network requires a LAN Administrator because there
are problems such as software installations, program faults or hardware failures or cable
disturbances in Local Area Network. A LAN Administrator is required to maintain these
issues.
• Covers Limited Area: LANs are restricted in size they cover a small area like a single
office, single building or a group of nearby buildings.

1.3.2 Wide Area Network


• A wide area network (WAN) is also an interconnection of devices capable of
communication.
• However, there are some differences between a LAN and a WAN.
• A LAN is normally imited in size, spanning an office, a building, or a campus; a
WAN has a wider geographical pan, spanning a town, a state, a country, or even the
world.
• A LAN interconnects hosts; WAN interconnects connecting devices such as
switches, routers, or modems.
• A LAN is ormally privately owned by the organization that uses it; a WAN is
normally created and run by communication companies and leased by an organization
that uses it.
• We see twodistinct examples of WANs today: point-to-point WANs and switched
WANs.
Point-to-Point WAN
• A point-to-point WAN is a network that connects two communicating devices through a
transmission
• media (cable or air). We will see examples of these WANs when we discuss how to
• connect the networks to one another. Figure 1.9 shows an example of a point-to-point
WAN.

KNSIT Page 14
18CS46 N C NETHRA
Asst. Prof. Csedept

Switched WAN
• A switched WAN is a network with more than two ends. A switched WAN, as we willsee
shortly, is used in the backbone of global communication today.
• We can say that aswitched WAN is a combination of several point-to-point WANs that
are connected byswitches. Figure 1.10 shows an example of a switched WAN.

Internetwork
• Today, it is very rare to see a LAN or a WAN in isolation; they are connected to one
another.
• When two or more networks are connected, they make an internetwork, or internet.
• As an example, assume that an organization has two offices, one on the east coast and the
other on the west coast.
• Each office has a LAN that allows all employees in the office to communicate with each
other.
• To make the communication between employees at different offices possible, the
management leases a point-to-point dedicated WAN from a service provider, such as a
telephone company, and connects the two LANs.
• Now the company has an internetwork, or a private internet (with lowercase i).
• Communication between offices is now possible. Figure 1.11 shows this internet.

KNSIT Page 15
18CS46 N C NETHRA
Asst. Prof. Csedept

• When a host in the west coast office sends a message to another host in the same office,
the router blocks the message, but the switch directs the message to the destination.
• On the other hand, when a host on the west coast sends a message to a host on the east
coast, router R1 routes the packet to router R2, and the packet reaches the destination.
• Figure 1.12 (see next page) shows another internet with several LANs and WANs
connected. One of the WANs is a switched WAN with four switches.

Features of Wide Area Network:


• Covers large geographical area: Wide area network covers a large geographical
area of more than 1000km. If your office is in different cities or countries then you
can connect your office branches through Wide Area Network.
• Centralized data: Wide area networks also provide you the facility of sharing the
data to all of your connected devices in a network.
• Get updated files and data: Wide Area Networks provide you the facility of getting
updated files and data from the server. If a server is updated with new data then all
connecting devices receive that updated data within seconds.
• Sharing of software and resources: Like LANs, we can share software applications
and other resources with other users on the internet.
• High bandwidth: WANs covers a large geographical area of more than 1000km.
therefore WANs have high bandwidth compared to LANs and MANs.

Disadvantages of a wide area network (WAN)


• Security problems: Wide Area Networks faces more security problem as compare to
LANs and MANs.
• One of the key disadvantages of WANs is a security issue when many different
people have the ability to use information from other computers.
• Needs firewall and antivirus software: As it faces security issue, therefore it is a basic
need of WANs to use firewalls and antivirus software to protect data transfer on the
internet which can be accessed and changed by hackers.
• The setup cost is high: A WAN network covers a large geographical area, it is very
expensive to setup in the initial stage. It may involve purchasing different networking
devices, i.e routers, switches, and extra security software.
• Troubleshooting problems: A WAN network covers large geographical areas, so
fixing the problem in a network is a very difficult job. Most of WANs wires go into
the sea and if those wires get broken. It involves a lot of hard work to fix those lines
under the sea.
• Maintenance Issues: Once set up, maintaining a WAN network is a full-time job
which requires high tech skills of network supervisors and technicians.

Examples of wide area network (WAN):


• Internet
• Large telecommunications companies like Airtel store IT department
• Satellite systems
• Cable companies
• Network providers

KNSIT Page 16
18CS46 N C NETHRA
Asst. Prof. Csedept

Types of WAN Connections


A WAN (Wide Area Network) network can be established in many ways but there are two
main types of WAN connections.
1. Dedicated Connection
2. Switched Connection

Dedicated Connections
A dedicated connection is a communications medium or other facility dedicated to a
particular application such as telephony operation or internet service providing.

Switched Connections
There are two basic types of switched connections:
1. Circuit Switched Network. [Link] Switched Network
• Circuit Switched Networks − Circuit switched networks are connection-oriented
networks. Here, a dedicated route is established between the source and the destination
and the entire message is transferred through it.
• Packet Switched Networks − Packet switched networks are connectionless networks.
Here, the message is divided and grouped into a number of units called packets that are
individually routed from the source to the destination.

1.3.3 Switching
• An internet is a switched network in which a switch connects at least two links together.
• A switch needs to forward data from a network to another network when required.
• The two most common types of switched networks are circuit-switched and packet-
switched networks. We discuss both next.
Circuit-Switched Network
• In a circuit-switched network, a dedicated connection, called a circuit, is always
available between the two end systems; the switch can only make it active or inactive.
• Figure 1.13 shows a very simple switched network that connects four telephones to each
end.
• We have used telephone sets instead of computers as an end system because circuit
switching was very common in telephone networks in the past, although part of the
telephone network today is a packet-switched network.
• In Figure 1.13, the four telephones at each side are connected to a switch. The switch
connects a telephone set at one side to a telephone set at the other side.
• The thick line connecting two switches is a high-capacity communication line that can
handle four voice communications at the same time; the capacity can be shared between
all pairs of telephone sets. The switches used in this example have forwarding tasks but
no storing capability.

KNSIT Page 17
18CS46 N C NETHRA
Asst. Prof. Csedept

• Let us look at two cases.


• In the first case, all telephone sets are busy; four people at one site are talking with four
people at the other site; the capacity of the thick line is fully used.
• In the second case, only one telephone set at one side is connected to a telephone set at
the other side; only one-fourth of the capacity of the thick line is used.
• This means that a circuit-switched network is efficient only when it is working at its full
capacity; most of the time, it is inefficient because it is working at partial capacity.
• The reason that we need to make the capacity of the thick line four times the capacity of
each voice line is that we do not want communication to fail when all telephone sets at
one side want to be connected with all telephone sets at the other side.
Packet-Switched Network
• In a computer network, the communication between the two ends is done in blocks of
data called packets.
• In other words, instead of the continuous communication we see between two telephone
sets when they are being used, we see the exchange of individual data packets between
the two computers.
• This allows us to make the switches function for both storing and forwarding because a
packet is an independent entity that can be stored and sent later. Figure 1.14 shows a
small packet-switched network that connects four computers at one site to four computers
at the other site.

KNSIT Page 18
18CS46 N C NETHRA
Asst. Prof. Csedept

• A router in a packet-switched network has a queue that can store and forward the packet.
• Now assume that the capacity of the thick line is only twice the capacity of the data line
connecting the computers to the routers.
• If only two computers (one at each site) need to communicate with each other, there is no
waiting for the packets.
• However, if packets arrive at one router when the thick line is already working at its full
capacity, the packets should be stored and forwarded in the order they arrived.
• The two simple examples show that a packet-switched network is more efficient than a
circuitswitched network, but the packets may encounter some delays(discuss In Chapter
18).
Circuit – Switching Packet – Switching
1 It is a connection oriented network switching technique. It is a connectionless network
switching technique.
2 A dedicated path has to be established between
the source and the destination before transfer of data commences.
Once, the data is transmitted, the path is relinquished. There is no need to establish a
dedicated path from the source to
the destination.
3 It is inflexible in nature since data packets are routed
along the same dedicated path. Each packet is routed separately.
Consequently, it is flexible in
nature where the different data
packets follow different paths.

4 The entire message is received in the order sent by the source. The individual packets of the
message are received out of
order and so need to be
reassembled at the destination.
5 It is implemented at Physical Layer. It is implemented at Network
Layer.
6 It has two approaches −
Space division switching, and
Time division switching
It has two approaches − Datagram, and
Virtual Circuit
7 It is not a store and forward transmission. It is store and forward
transmission.
8 Data is processed and transmitted at the source only. Data is processed and
transmitted, not only at the source
but at each switching station.

KNSIT Page 19
18CS46 N C NETHRA
Asst. Prof. Csedept

1.3.5 Accessing the Internet


• The User needs to be physically connected to an ISP. The physical connection is
normally done through a point-to-point WAN.
Using Telephone Networks
• Today most residences and small businesses have telephone service, which means they
are connected to a telephone network.
• A pc is connected to a telephone, telephone to local telephone company, a company to
stations tower , tower to satellite.

• a point-to-point WAN.
• This can be done in two ways.
• The Battle of Internet Connections: Dial-Up vs. DSL
• Dial-up
This is the grandpappy of internet connections and just as slow. However, for the
most basic uses such as sending mails with small- to medium-sized files attached,
dial-up should do.
• The first solution is to add to the telephone line a modem that converts data to
voice. The software installed on the computer dials the ISP and imitates making a
telephone connection.
• very slow, and when the line is used for Internet connection, it cannot be used for
telephone (voice) connection.
• So It is only useful for small residences.
• DSL
• DSL stands for Digital Subscriber Line.
• It is a type of broadband connection and considerably much faster than dial-up.
• The DSL service also allows the line to be used simultaneously for voice and data
communication.
• A DSL connection will not tie up a phone line. It’s always available so there is no
need to dial an ISP.
• speed allows high volume data use, loads websites quickly and is quite efficient to
use with live chats, viewing videos in real time and playing online games.

KNSIT Page 20
18CS46 N C NETHRA
Asst. Prof. Csedept

Using Cable Networks


• Cable internet connection is faster than a dial-up but sometimes slower than DSL.
• using cable TV services instead of antennas to receive TV broadcasting.
• The cable companies have been upgrading their cable networks and connecting to the
Internet.
Using Wireless Networks
• Wireless connectivity has recently become increasingly popular.
• A household or a small business can use a combination of wireless and wired connections
to access the Internet.
• With the growing wireless WAN access, a household or a small business can be
connected to the Internet through a wireless WAN.

• Satellite
a satellite to handle data transmissions.
• satellite internet allows for smoother, uninterrupted connections.
• It also allows even large files to download or upload much faster.

Direct Connection to the Internet


• A large organization or a large corporation can itself become a local ISP and be
connected to the Internet.
• connect the internetwork to the Internet.

1.4.2 Birth of the Internet


• In 1967, presented ideas for the Advanced Research Projects Agency Network
(ARPANET), a small network of connected computers.
• The idea was that each host computer (not necessarily from the same manufacturer)
would be attached to a specialized computer, called an interface message processor
(IMP).
• The IMPs, in turn, would be connected to each other. Each IMP had to be able to
communicate with other IMPs as well as with its own attached host.
• By 1969, ARPANET was a reality. Four nodes were connected via the IMPs to form a
network. Software called the Network Control Protocol (NCP) provided communication.

• In 1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANET group,
collaborated on what they called the Internetting Project.
• There were many problems to overcome: diverse packet sizes, diverse interfaces, and
diverse transmission rates.
• Cerf and Kahn devised the idea of a device called a gateway to serve as the intermediary
hardware to transfer data from one network to another.

TCP/IP
• Cerf and Kahn’s landmark 1973 paper outlined the protocols to achieve end-to-end
delivery of data.
• This paper on transmission control protocol (TCP) included concepts such as
encapsulation, the datagram, and the functions of a gateway.

KNSIT Page 21
18CS46 N C NETHRA
Asst. Prof. Csedept

• A radical idea was the transfer of responsibility for error correction from the IMP to the
host machine.
• then, authorities made a decision to split TCP into two protocols:
• Transmission Control Protocol (TCP) and Internet Protocol (IP).
• IP would handle datagram routing
• while TCP would be responsible for higher level functions such as segmentation,
reassembly, and error detection.
• The new combination became known as TCP/IP.
• who wanted to use the Internet to access a computer on a different network had to
be running TCP/IP.

MILNET
• In 1983, ARPANET split into two networks: Military Network (MILNET) for military
users and ARPANET for nonmilitary users

CSNET
• Another milestone in Internet history was the creation of CSNET in 1981.
• Computer Science Network (CSNET) was a less expensive network; there were no
redundant links and the transmission rate was slower.

NSFNET
• With the success of CSNET, the NSF in 1986 sponsored the National Science
Foundation Network (NSFNET), a backbone that connected five supercomputer centers
located throughout the United States, with a 1.544-Mbps data rate, thus providing
connectivity throughout the United States.
• In 1990, ARPANET was officially retired and replaced by NSFNET.

ANSNET
• In 1991, the U.S. government decided that NSFNET was not capable of supporting the
rapidly increasing Internet traffic.
• Three companies, IBM, Merit, and Verizon, filled the build a new, high-speed Internet
backbone called Advanced Network Services Network (ANSNET).

1.4.3 Internet Today


The Internet today that provide services to the whole world.
World Wide Web
The 1990s saw the explosion of Internet applications due to the emergence of the World Wide
Web (WWW).
The Web was invented at CERN by Tim Berners-Lee.
Multimedia
Recent developments in the multimedia applications such as voice over IP (telephony), video
over IP (Skype), view sharing (YouTube), and television over IP (PPLive) has increased the
number of users and the amount of time each user spends on the network.
Peer-to-Peer Applications
Peer-to-peer networking is also a new area of communication with a lot of potential(Chapter 29).

KNSIT Page 22
18CS46 N C NETHRA
Asst. Prof. Csedept

Questions

1. Identify the five components of a data communications system.


2. What are the three criteria necessary for an effective and efficient network?
3. Categorize the four basic topologies in terms of line configuration.
4. What is the difference between half-duplex and full-duplex transmission modes?
5. Name the four basic network topologies, and cite an advantage of each type.
6. For n devices in a network, what is the number of cable links required for a mesh, ring,
bus, and star topology?
7. How many point-to-point WANs are needed to connect n LANs if each LAN should be
able to directly communicate with any other LAN?
8. In a LAN with a link-layer switch (Figure 1.8b), Host 1 wants to send a message to Host
3. Since communication is through the link-layer switch, does the switch need to have an
address? Explain.
9. When we use local telephones to talk to a friend, are we using a circuitswitched network
or a packet-switched network?
10. When a resident uses a dial-up or DLS service to connect to the Internet, what is the role
of the telephone company?
11. What is the maximum number of characters or symbols that can be represented by
Unicode?
ASCII
ASCII uses 8 bits to represent a character.
However, one of the bits is a parity bit. This is used to perform a parity check (a form of error checking).
This uses up one bit, so ASCII represents 128 characters (the equivalent of 7 bits) with 8 bits rather than
256.
For example, the ASCII code for lower case z is 122 and is shown below:
Parity Bit 64 32 16 8 4 2 1
0 1 1 1 1 0 1 0
Extended ASCII
It is possible to disregard the use of a parity bit to allow ASCII to
represent 256 characters. This is known as extended ASCII. There are
different versions of extended ASCII in use.

 ASCII uses 8 bits to represent a character


 ASCII can represent 128 characters
 ASCII sets the most significant bit as a parity bit
 Extended ASCII can allow for the representation of 256 characters and
disregards that use of a parity bit
 ASCII is less demanding on memory use than Unicode

Unicode
Unicode was created to allow more character sets than [Link] uses 16 bits to represent each character. This
means that Unicode is capable of representing 65,536 different characters and a much wider range of character sets.

 Unicode can represent 65,536 charaters


 Unicode uses 16 bits to represent each character

KNSIT Page 23
18CS46 N C NETHRA
Asst. Prof. Csedept

 Unicode can represent a greater range of character sets than ASCII


 There are adapted forms of the original Unicode standard capable of representing millions of characters

12 A color image uses 16 bits to represent a pixel. What is the maximum number of different
colors that can be represented?
With 16 bits, we can represent up to 216different colors.

13 Assume six devices are arranged in a mesh topology. How many cables are needed? How
many ports are needed for each device?
Cable links: n(n– 1) / 2 = (6 ×5) / 2 = 15
Number of ports: (n– 1) = 5 ports needed per device.
For each of the following four networks, discuss the consequences If a connection fails.
a. Five devices arranged in a mesh topology
b. Five devices arranged in a star topology (not counting the hub)
c. Five devices arranged in a bus topology
d. Five devices arranged in a ring topology.
[Link] topology: If one connection fails, the other connections will still be working.
[Link] topology: The other devices will still be able to send data through the hub; there will
beno access to the device which has the failed connection to the hub.
[Link] Topology: All transmission stops if the failure is in the bus. If the dropline fails, only
thecorresponding device cannot operate.

1. For n devices in a network, what is the number of cable links required for a mesh, ring, bus, and star
topology?
Ans: n(n-1)/2 cable link are required for mesh, n for ring, n-1 cable link for bus, and n cable link for star
topology.

2. What is the difference between half-duplex and full-duplex transmission modes?


Ans: In half-duplex mode, each station can both transmit and receive, but not at the same [Link] one
device is sending, the other can only receive,and vice versa. Like walkie-talkies.
In full-duplex mode, both station can transmit and receive simultaneously. Like telephone network.

3. What are some of the factors that determine whether a communication system is a LAN or WAN?
Ans: Size and Coverage of area determine whether a communication system is LAN or WAN. A LAN
normally covers an area less than 2 mile, a WAN can be worldwide

4. Identify the five components of a data communications system?


Ans: A data communications system has five components-(i) Message, (ii) Sender, (iii) Receiver,
(iv)Transmission medium, (v) Protocol.

5. What are the advantages of a multipoint connection over point-to-point connection?


Ans: In a multipoint environment, the capacity of the channel is shared, either spatially or temporally. If
several devices can use the link simultaneously, it is a spatially shared connection. If users must take turns,
it is a timeshared connection.

6. Why are standard needed?


Ans: Standard are essential in creating and maintaining an open and competitive market for equipment
manufacturers and in guaranteeing national and international interoperability of data and
telecommunications technology and processes. Standard provide guidelines to manufacturers, vendors,
government agencies, and other service providers to ensure the kind of interconnectivity necessary in
today's marketplace and in international communications.

KNSIT Page 24
18CS46 N C NETHRA
Asst. Prof. Csedept

7. What are the advantages of distributed processing?


Ans: Most networks use distributed processing, in which a task is divided among multiple computers.
Instead of one single large machine being responsible for all aspects of a process,separate computers
(usually a personal computer or workstation) handle a subset.

8. Name the four basic network topologies, and cite advantage of each type.
Ans:
Bus Topology: Easy installation, less cabling, easy expandation etc.
Ring Topology: Less effort in adding or removing devices, simple fault isolation.
Star Topology: Less expensive than mesh, robustness etc.
Mesh Topology: Robustness, present of privacy and security.

9. What is an internet? What is the Internet?


Ans: When two or more networks are connected, they become an internetwork, or internet.
The most notable internet is called the Internet, a collaboration of more than hundreds of thousands of interconnected
networks. Private individuals as well as various organizations such as government agencies, schools, research
facilities, corporation, and libraries in more than 100 countries use the internet.

10. What are the two types of line configuration?


Ans: Point to point and Multipoint.

11. What are the three criteria necessary for an effective and efficient network?
Ans: Performance, Reliability, Security.

12. Why are protocols needed?


Ans: In computer networks, communication occurs between entities in different systems. An entity is anything
capable of sending or receiving information. However, two entities can not simply send bit streams to each other and
expect to be understood. For communication to occur, the entities must agree on a protocol.

13. Categorize the four basic topologies in terms of line configuration.


Ans:
Point to point- mesh and star.
Multi point- bus and ring.

Exercises

14. What is the maximum number of characters or symbols that can be represented by Unicode?
Ans: The code can define up to 2^(32) (4,294,967,296) characters or symbols.

15. A color image uses 16 bits to represent a pixel. What is the maximum number of different colors that can be
represented?
Ans: The number of different colors you can represent with 16 bits is 2 16, or about 65k colors.

16. Assume six devices are arranged in a mesh topology. How many cables are needed? How many ports are needed
for each device?
Ans: Cables needed (6*5)/2 = 15 and,
Each device needs to be connected to 5 other devices. So, each device needs to have 5 ports. Six devices times five
ports equals 30 total ports.

17. For each of the following four networks, discuss the consequences if a connection fails.
a. Five devices arranged in a mesh topology,
Ans: Mesh is high redundancy. Only one device would be disconnected if all the connections were to fail for that
device. You can have many connections to other devices thats why its less likely to fail. The only cause for failure at
this point is really the power and if you just don't have any. Even if one of the connections between two devices fail
there is no effect on network and they can still communicate through other channels.

KNSIT Page 25
18CS46 N C NETHRA
Asst. Prof. Csedept

b. Five devices arranged in a star topology (not counting the hub),


Ans: Star runs to a central device like a switch, so if the switch itself fails then the whole network will be
disconnected.
c. Five devices arranged in a bus topology,
Ans: Bus runs in a straight line from one network device to another. So if one gets disconnect then the all the
devices connected down the line get disconnect.
d. Five devices arranged in a ring topology.
Ans. Ring is like a bus except it connects back onto itself. So if one device fails they all fail. The exception is if
there is a redundant inside ring like that used in FDDI (fiber ring) then if both get disconnect from one device then
they all do.

18. You have two computers connected by an Ethernet hub at home. Is this a LAN, a MAN, or a WAN? Explain
your reason.
Ans: This is a LAN (Local Area Network). A WAN is a Wide Area Network that typically connects machines that
are geographically remote. A Man is a Metropolitan Area Network - that connects together all machines in an
enterprise, campus or town.

19. In the ring topology in Figure 1.8, what happens if one of the stations is unplugged?
Ans: The network would stop functioning because the token has to pass through each station in the ring.

20. In the bus topology in Figure 1.7, what happens if one of the stations is unplugged?
Ans: From that station rest all will stop functioning.

21. Draw a hybrid topology with a star backbone and three ring networks.
Ans: [Link]

22. Draw a hybrid topology with a ring backbone and two bus networks.
Ans: [Link]

23. Performance is inversely related to delay. When you use the Internet, which of the following applications are
more sensitive to delay?
a. Sending an e-mail
b. Copying a file
c. Surfing the Internet
Ans: It is true that performance is inversely proportional to delay.
Sending an email is more sensitive to delay than copying a file and surfing the [Link] E-mailing may be
interrupted due to high latency, but can always assume as soon as the server is performing again, without user
interaction.
Copying a file is less sensitive to delay than surfing the web and sending an e-mail.
Surfing the web is not so much affected by delay because due to effect of latency on surfing the net.

24. When a party makes a local telephone call to another party, is this a point-to-point or multipoint connection?
Explain your answer.
Ans: It is Point-to-Point connection because multipoint connection needs more than two end points.

25. Compare the telephone network and the Internet. What are the similarities? What are the differences?
Ans: Both are the ways of Communications, Both can be make by wires/wireless. Both are capable to two way
traffic of [Link] allows us to share our files with our Friends while telephone don't. Video chat is being
used by people who has the access to internet, but it isn't possible through telephone.

KNSIT Page 26
18CS46 N C NETHRA
Asst. Prof. Csedept

Chapter 2
Network Models

 In this chapter, we first discuss the idea of network models in general and the TCP/IP
protocol suite in particular.
 Two models have been devised to define computer network operations: the TCP/IP
protocol suite and the OSI model.
 In this chapter, we first discuss a general subject, protocol layering, which is used in both
models. We then concentrate on the TCP/IP protocol suite, on which the book is based.
The OSI model is briefly discuss for comparison with the TCP/IP protocol suite.

2.1 PROTOCOL LAYERING


 We defined the term protocol in Chapter 1.
 In data communication and networking, a protocol defines the rules that both the sender
and receiver and all intermediate devices need to follow to be able to communicate
effectively.
 When communication is simple, we may need only one simple protocol; when the
communication is complex, we may need to divide the task between different layers, in
which case we need a protocol at each layer, or protocol layering.
2.1.1 Scenarios
Let us develop a simple scenarios to better understand the need for protocol layering.
First Scenario
 In the first scenario, communication is so simple that it can occur in only one layer.
 Assume Maria and Ann are neighbors with a lot of common ideas.
 Communication between Maria and Ann takes place in one layer, face to face, in the
same language, as shown in Figure 2.1.

 Even in this simple scenario, we can see that a set of rules needs to be followed.
 First, Maria and Ann know that they should greet each other when they meet.
 Second, they know that they should confine their vocabulary to the level of their
friendship.
 Third, each party knows that she should refrain from speaking when the other party is
speaking.
 Fourth, each party knows that the conversation should be a dialog, not a monolog: both
should have the opportunity to talk about the issue.
 Fifth, they should exchange some nice words when they leave.
 We can see that the protocol used by Maria and Ann is different from the communication
between a professor and the students in a lecture hall.

KNSIT Page 27
18CS46 N C NETHRA
Asst. Prof. Csedept

 The communication in the second case is mostly monolog; the professor talks most of the
time unless a student has a question, a situation in which the protocol dictates that she
should raise her hand and wait for permission to speak. In this case, the communication is
normally very formal and limited to the subject being taught.

2.1.2 Principles of Protocol Layering


Let us discuss two principles of protocol layering.
First Principle
The first principle dictates that if we want bidirectional communication, we need to make each
layer so that it is able to perform two opposite tasks, one in each direction. For example, the third
layer task is to listen (in one direction) and talk (in the other direction). The second layer needs
to be able to encrypt and decrypt. The first layer needs to send and receive mail.
Second Principle
The second principle that we need to follow in protocol layering is that the two objects under
each layer at both sites should be identical. For example, the object under layer 3 at both sites
should be a plaintext letter. The object under layer 2 at both sites should be a ciphertext letter.
The object under layer 1 at both sites should be a piece of mail.
2.1.3 Logical Connections
After following the above two principles, we can think about logical connection between each
layer as shown in Figure 2.3. This means that we have layer-to-layer communication. Maria and
Ann can think that there is a logical (imaginary) connection at each layer through which they can
send the object created from that layer. We will see that the concept of logical connection will
help us better understand the task of layering we encounter in data communication and
networking.

KNSIT Page 28
18CS46 N C NETHRA
Asst. Prof. Csedept

2.2 TCP/IP PROTOCOL SUITE


 TCP/IP is a protocol suite (a set of protocols organized in different layers) used in the
Internet today.
 It is a hierarchical protocol made up of interactive modules, each of which provides a
specific functionality.
 The term hierarchical means that each upper level protocol is supported by the services
provided by one or more lower level protocols.
 The original TCP/IP protocol suite was defined as four software layers built upon the
hardware.
 Today, however, TCP/IP is thought of as a five-layer model. Figure 2.4 shows both
configurations.

KNSIT Page 29
18CS46 N C NETHRA
Asst. Prof. Csedept

2.2.1 Layered Architecture


 To show how the layers in the TCP/IP protocol suite are involved in communication
between two hosts, we assume that we want to use the suite in a small internet made up
of three LANs (links), each with a link-layer switch.
 We also assume that the links are connected by one router, as shown in Figure 2.5.
 Let us assume that computer A communicates with computer B. As the figure shows, we
have five communicating devices in this communication: source host (computer A), the
link-layer switch in link 1, the router, the link-layer switch in link 2, and the destination
host (computer B).
 Each device is involved with a set of layers depending on the role of the device in the
internet.
 The two hosts are involved in all five layers; the source host needs to create a message in
the application layer and send it down the layers so that it is physically sent to the
destination host.
 The destination host needs to receive the communication at the physical layer and then
deliver it through the other layers to the application layer.
 The router is involved in only three layers; there is no transport or application layer in
a router as long as the router is used only for routing.

2.2.2 Layers in the TCP/IP Protocol Suite


 After the above introduction, we briefly discuss the functions and duties of layers in the
TCP/IP protocol suite.
 Each layer is discussed in detail in the next five parts of the book. To better understand
the duties of each layer, we need to think about the logical connections between layers.
Figure 2.6 shows logical connections in our simple internet.

 Using logical connections makes it easier for us to think about the duty of each layer.
 As the figure shows, the duty of the application, transport, and network layers is end-to-
end.
 However, the duty of the data-link and physical layers is hop-to-hop, in which a hop is a
host or router.

KNSIT Page 30
18CS46 N C NETHRA
Asst. Prof. Csedept

 In other words, the domain of duty of the top three layers is the internet, and the domain
of duty of the two lower layers is the link.
 Another way of thinking of the logical connections is to think about the data unit created
from each layer.
 In the top three layers, the data unit (packets) should not be changed by any router or
link-layer switch.
 In the bottom two layers, the packet created by the host is changed only by the routers,
not by the link-layer switches. Figure 2.7 shows the second principle discussed
previously for protocol layering.
 We show the identical objects below each layer related to each device.

 Note that, although the logical connection at the network layer is between the two hosts,
we can only say that identical objects exist between two hops in this case because a router
may fragment the packet at the network layer and send more packets than received (see
fragmentation in Chapter 19). Note that the link between two hops does not change the
object.

2.2.3 Description of Each Layer


briefly discuss the duty of each layer.

Physical Layer
 We can say that the physical layer is responsible for carrying individual bits in a frame
across the link.
 Although the physical layer is the lowest level in the TCP/IP protocol suite, the
communication between two devices at the physical layer is still a logical communication
because there is another, hidden layer, the transmission media, under the physical layer.
 Two devices are connected by a transmission medium (cable or air).
 We need to know that the transmission medium does not carry bits; it carries electrical or
optical signals.

KNSIT Page 31
18CS46 N C NETHRA
Asst. Prof. Csedept

 So the bits received in a frame from the data-link layer are transformed and sent through
the transmission media, but we can think that the logical unit between two physical layers
in two devices is a bit.
 There are several protocols that transform a bit to a signal.

Data-link Layer
 We have seen that an internet is made up of several links (LANs and WANs) connected
by routers.
 There may be several overlapping sets of links that a datagram can travel from the host to
the destination.
 The routers are responsible for choosing the best links.
 However, when the next link to travel is determined by the router, the data-link layer is
responsible for taking the datagram and moving it across the link.
 The link can be a wired LAN with a link-layer switch, a wireless LAN, a wired WAN, or
a wireless WAN.
 In each case, the data-link layer is responsible for moving the packet through the link.
 The data-link layer takes a datagram and encapsulates it in a packet called a frame.
 Each link-layer protocol may provide a different service.
 Some link-layer protocols provide complete error detection and correction, some
provide only error correction.

Network Layer
 The network layer is responsible for creating a connection between the source computer
and the destination computer.
 The communication at the network layer is host-to-host.
 the routers in the path are responsible for choosing the best route for each packet.
 We can say that the network layer is responsible for host-to-host communication and
routing the packet through possible routes.
 The network layer in the Internet includes the main protocol, Internet Protocol (IP), that
defines the format of the packet, called a datagram at the network layer.
o IP also defines the format and the structure of addresses used in this layer.
o IP is also responsible for routing a packet from its source to its destination, which
is achieved by each router forwarding the datagram to the next router in its path.
o IP is a connectionless protocol that provides no flow control, no error control,
and no congestion control services. This means that if any of theses services is
required for an application, the application should rely only on the transport-layer
protocol.
 The network layer also includes unicast (one-to-one) and multicast (one-to-many) routing
protocols.
 A routing protocol does not take part in routing (it is the responsibility of IP), but it
creates forwarding tables for routers to help them in the routing process.
 The Internet Control Message Protocol (ICMP) helps IP to report some problems when
routing a packet.
 The Internet Group Management Protocol (IGMP) is another protocol that helps IP in
multitasking.

KNSIT Page 32
18CS46 N C NETHRA
Asst. Prof. Csedept

 The Dynamic Host Configuration Protocol (DHCP) helps IP to get the network-layer
address for a host.
 The Address Resolution Protocol (ARP) is a protocol that helps IP to find the link-layer
address of a host or a router when its network-layer address is given.

Transport Layer
 The logical connection at the transport layer is also end-to-end.
 The transport layer at the source host gets the message from the application layer,
encapsulates it in a transport layer packet (called a segment or a user datagram in
different protocols) and sends it, through the logical (imaginary) connection, to the
transport layer at the destination host.
 In other words, the transport layer is responsible for giving services to the application
layer: to get a message from an application program running on the source host and
deliver it to the corresponding application program on the destination host.
 There are a few transport-layer protocols in the Internet, each designed for some specific
task.
o Transmission Control Protocol (TCP),
 is a connection-oriented protocol that first establishes a logical
connection between transport layers at two hosts before transferring data.
 It creates a logical pipe between two TCPs for transferring a stream of
bytes.
 TCP provides flow control (matching the sending data rate of the source
host with the receiving data rate of the destination host to prevent
overwhelming the destination),
 error control (to guarantee that the segments arrive at the destination
without error and resending the corrupted ones), and
 congestion control to reduce the loss of segments due to congestion in the
network.

o User Datagram Protocol (UDP),


 is a connectionless protocol that transmits user datagrams without first
creating a logical connection.
 In UDP, each user datagram is an independent entity without being related
to the previous or the next one (the meaning of the term connectionless).
 UDP is a simple protocol that does not provide flow, error, or congestion
control.
 Its simplicity, which means small overhead, is attractive to an application
program that needs to send short messages and cannot afford the
retransmission of the packets involved in TCP, when a packet is corrupted
or lost.
 A new protocol, Stream Control Transmission Protocol (SCTP) is
designed to respond to new applications that are emerging in the
multimedia(discuss Chapter 24).

KNSIT Page 33
18CS46 N C NETHRA
Asst. Prof. Csedept

Application Layer
 As Figure 2.6 shows, the logical connection between the two application layers is end-to-
end.
 The two application layers exchange messages between each other as though there were a
bridge between the two layers.
 However, we should know that the communication is done through all the layers.
 Communication at the application layer is between two processes (two programs running
at this layer).
 To communicate, a process sends a request to the other process and receives a response.
 Process-to-process communication is the duty of the application layer.
 The application layer in the Internet includes many predefined protocols, but a user can
also create a pair of processes to be run at the two hosts.
 The Hypertext Transfer Protocol (HTTP) is a vehicle for accessing the World Wide Web
(WWW).
 The Simple Mail Transfer Protocol (SMTP) is the main protocol used in electronic mail
(e-mail) service.
 The File Transfer Protocol (FTP) is used for transferring files from one host to another.
 The Terminal Network (TELNET) and Secure Shell (SSH) are used for accessing a site
remotely.
 The Simple Network Management Protocol (SNMP) is used by an administrator to
manage the Internet at global and local levels.
 The Domain Name System (DNS) is used by other protocols to find the network-layer
address of a computer.
 The Internet Group Management Protocol (IGMP) is used to collect membership in a
group. (discuss in Chapter 26 ).

Encapsulation and Decapsulation


 One of the important concepts in protocol layering in the Internet is
encapsulation/decapsulation.
 Figure 2.8 shows this concept for the small internet in Figure 2.5.
 We have not shown the layers for the link-layer switches because no encapsulation/
decapsulation occurs in this device.
 In Figure 2.8, we show the encapsulation in the source host, decapsulation in the
destination host, and encapsulation and decapsulation in the router.

KNSIT Page 34
18CS46 N C NETHRA
Asst. Prof. Csedept

Encapsulation at the Source Host


At the source, we have only encapsulation.
1. At the application layer, the data to be exchanged is referred to as a message. A message
normally does not contain any header or trailer. The message is passed to the transport
layer.

2. The transport layer takes the message as the payload, the load that the transport layer
should take care of. It adds the transport layer header to the payload, which contains the
identifiers of the source and destination application programs that want to communicate
plus some more information that is needed for the end-to-end delivery of the message,
such as information needed for flow, error control, or congestion control. The result is the
transport-layer packet, which is called the segment (in TCP) and the user datagram (in
UDP). The transport layer then passes the packet to the network layer.

3. The network layer takes the transport-layer packet as data or payload and adds its own
header to the payload. The header contains the addresses of the source and destination
hosts and some more information used for error checking of the header, fragmentation
information, and so on. The result is the network-layer packet, called a datagram. The
network layer then passes the packet to the data-link layer.

4. The data-link layer takes the network-layer packet as data or payload and adds its own
header, which contains the link-layer addresses of the host or the next hop (the router).
The result is the link-layer packet, which is called a frame. The frame is passed to the
physical layer for transmission.

KNSIT Page 35
18CS46 N C NETHRA
Asst. Prof. Csedept

Decapsulation and Encapsulation at the Router


At the router, we have both decapsulation and encapsulation because the router is connected to
two or more links.

1. After the set of bits are delivered to the data-link layer, this layer decapsulates the
datagram from the frame and passes it to the network layer.

2. The network layer only inspects the source and destination addresses in the datagram
header and consults its forwarding table to find the next hop to which the datagram is to
be delivered. The contents of the datagram should not be changed by the network layer in
the router unless there is a need to fragment the datagram if it is too big to be passed
through the next link. The datagram is then passed to the data-link layer of the next link.

3. The data-link layer of the next link encapsulates the datagram in a frame and passes it to
the physical layer for transmission.

Decapsulation at the Destination Host


At the destination host, each layer only decapsulates the packet received, removes the payload,
and delivers the payload to the next-higher layer protocol until the message reaches the
application layer. It is necessary to say that decapsulation in the host involves error checking.

2.2.5 Addressing
 Any communication that involves two parties needs two addresses: source address and
destination address. Although it looks as if we need five pairs of addresses, one pair per
layer, we normally have only four because the physical layer does not need addresses; the
unit of data exchange at the physical layer is a bit, which definitely cannot have an
address.
 Figure 2.9 shows the addressing at each layer.
 As the figure shows, there is a relationship between the layer, the address used in that
layer, and the packet name at that layer.
 At the application layer, we normally use names to define the site that provides services,
such as [Link], or the e-mail address, such as somebody@[Link].

KNSIT Page 36
18CS46 N C NETHRA
Asst. Prof. Csedept

 At the transport layer, addresses are called port numbers, and these define the
application-layer programs at the source and destination. Port numbers are local
addresses that distinguish between several programs running at the same time.
 At the network-layer, the addresses are global, with the whole Internet as the scope. A
network-layer address uniquely defines the connection of a device to the Internet.
 The link-layer addresses, sometimes called MAC addresses, are locally defined
addresses, each of which defines a specific host or router in a network (LAN or WAN).

2.2.6 Multiplexing and Demultiplexing


 Since the TCP/IP protocol suite uses several protocols at some layers, we can say that we
have multiplexing at the source and demultiplexing at the destination.
 Multiplexing in this case means that a protocol at a layer can encapsulate a packet from
several next-higher layer protocols (one at a time);
 demultiplexing means that a protocol can decapsulate and deliver a packet to several
next-higher layer protocols (one at a time).
 Figure 2.10 shows the concept of multiplexing and demultiplexing at the three upper
layers.

 To be able to multiplex and demultiplex, a protocol needs to have a field in its header to
identify to which protocol the encapsulated packets belong.
 At the transport layer, either UDP or TCP can accept a message from several application-
layer protocols.
 At the network layer, IP can accept a segment from TCP or a user datagram from UDP.
 IP can also accept a packet from other protocols such as ICMP, IGMP, and so on.
 At the data-link layer, a frame may carry the payload coming from IP or other protocols
such as ARP (see Chapter 9).

KNSIT Page 37
18CS46 N C NETHRA
Asst. Prof. Csedept

THE OSI MODEL


 The International Organization for Standardization (ISO) is a multinational body
dedicated to worldwide agreement on international standards.
 Almost three-fourths of the countries in the world are represented in the ISO.
 An ISO standard that covers all aspects of network communications is the Open Systems
Interconnection (OSI) 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 was intended to be the basis for the creation of the protocols in the OSI
stack.
 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 (see Figure 2.11).

2.3.1 OSI versus TCP/IP


 When we compare the two models, we find that two layers, session and presentation, are
missing from the TCP/IP protocol suite.
 These two layers were not added to the TCP/IP protocol suite after the publication of the
OSI model.
 The application layer in the suite is usually considered to be the combination of three
layers in the OSI model, as shown in Figure 2.12.

KNSIT Page 38
18CS46 N C NETHRA
Asst. Prof. Csedept

Two reasons were mentioned for this decision.


1. First, TCP/IP has more than one transport-layer protocol. Some of the functionalities of
the session layer are available in some of the transport-layer protocols.
2. Second, the application layer is not only one piece of software. Many applications can be
developed at this layer. If some of the functionalities mentioned in the session and
presentation layers are needed for a particular application, they can be included in the
development of that piece of software.

2.3.2 Lack of OSI Model’s Success


 The OSI model appeared after the TCP/IP protocol suite.
 Most experts were at first excited and thought that the TCP/IP protocol would be fully
replaced by the OSI model. This did not happen for several reasons, but we describe only
three, which are agreed upon by all experts in the field.
1. First, OSI was completed when TCP/IP was fully in place and a lot of time and money
had been spent on the suite; changing it would cost a lot.
2. Second, some layers in the OSI model were never fully defined. For example, although
the services provided by the presentation and the session layers were listed in the
document, actual protocols for these two layers were not fully defined, nor were they
fully described, and the corresponding software was not fully developed.
3. Third, when OSI was implemented by an organization in a different application, it did not
show a high enough level of performance to entice the Internet authority to switch from
the TCP/IP protocol suite to the OSI model.

KNSIT Page 39
18CS46 N C NETHRA
Asst. Prof. Csedept

The TCP/IP Model and Protocol Suite Explained for Beginners


What is a Protocol ?
A protocol is a set of rules that govern how systems communicate. For networking they govern
how data is transferred from one system to another.

What is a Protocol Suite ?


A protocol suite is a collection of protocols that are designed to work together.

Protocol Stacks
 It is possible to write a single protocol that takes data from one computer
application and sends it to an application on another computer.- A Single stack Protocol
 The problem with this approach is that it very inflexible, as any changes require changing
the entire application and protocol software.
 The approach used in networking is to create layered protocol stacks.
 Each level of the stack performs a particular function and communicates with the
levels above and below it.
 This layered arrangement is not confined to networking, and how it works is probably
best understood if you compare it to real life example.
 Lets take an example of a parcel service between two offices.
 The task is simple – send parcels between people in each office.

We will divide the task into two distinct processes as follows:


1. Take a package, wrap it and address it.
2. Send it to the destination
at the receiving end
1. Receive the package
2. Deliver it to the recipient

Typically you would have an internal mail man that:


1. Collects the parcels from the senders and takes then to a mail dispatch room.
2. The parcels are placed in a van by the dispatcher and then driven to the remote office.

At the remote office


1. The parcels are received by the dispatcher and placed into a tray for the mail man
2. The mail man collects the parcels and delivers them to the recipients,
Here is a simple diagram to illustrate the process:

KNSIT Page 40
18CS46 N C NETHRA
Asst. Prof. Csedept

The question really is what is the advantage of splitting the task into different layers/tasks?
 The answer is that any of the layers/tasks can be changed without affecting the other
layers.
 So if for example, if we decide to use a train instead of a van to transport the messages
between the offices we could do so without affecting the mail man.
 In fact the mail man doesn’t know, and doesn’t care, how the parcels are transported
between the offices, as all he does is collect them, and pass them to the delivery man.
 Although this appears very simple, and maybe trivial, it does illustrate some very
important points that are crucial when it comes to understanding networking
protocols and how they are organised.

The OSI and TCP/IP Networking Models


 All networking courses teach the 7 layer OSI model.
 It is important to understand that this model provides for a conceptual framework, and no
modern protocols implement this model fully.
 The TCP/IP protocol suite uses a 4 layer model.
 Note: The OSI model is an idealised networking model, whereas the TCP/IP model is a
practical implementation.
 The diagram shows how the TCP/IP and OSI models compare

KNSIT Page 41
18CS46 N C NETHRA
Asst. Prof. Csedept

 This article has a good overview of the OSI protocol layers and their functions
 What is important to understand is that the interfaces between the interfaces are well
defined so that it is theoretically possible to replace a particular protocol with another one
that operates at that level.
 For example you should theoretically be able to replace the IP networking protocol with
the IPX networking protocol without affecting how the application e.g. POP3 works.
 Although this doesn’t always apply the application protocols like SMTP ,POP3 etc will
work Okay across different data link protocols like Ethernet,Token ring etc.
 End to End Connections- Routers,Switches and OSI
 When two computers communicate across a network the data must travel through various
items of networking equipment.
 You will often hear the terms level 2 and level 3 equipment used. These terms refer to
the OSI levels of the protocol stack that the device operates at.
 A router for example works at the networking layer and is a level 3 device.
 A switch operates at the Ethernet level and is a level 2 device.

 Because a router operates at the networking layer it doesn’t need to support the upper
layer application protocols like HTTP,FTP etc.
 The router works on network address which are part of the networking protocol (IP or
IPX).
 A router can route many different protocols at the same time, but it doesn’t do protocol
conversion.
 An IP packet coming in will be an IP packet going out and an IPX packet coming in
will be an IPX packet going out.
 To do protocol conversion you will need a Gateway.
 Likewise a switch doesn’t have level 3,4,5,6 or 7 protocol stacks as it doesn’t need them,
and so it doesn’t care about the routing protocol IP,IPX etc or the
application FTP,HTTP etc that passes through it.
 Because the switch operates at level 2 (data link layer) it only needs to understand
the MAC addresses that are part of the Ethernet protocol.
 The TCP/IP Protocol Suite
 The TCP/IP protocol suite consists of many protocols that operate at one of 4 layers.
 The protocol suite is named after two of the most common protocols –
TCP (transmission Control Protocol) and IP (internet Protocol).

KNSIT Page 42
18CS46 N C NETHRA
Asst. Prof. Csedept

 TCP/IP was designed to be independent of networking Hardware and should run across
any connection media.
 The earliest use, and the most common use is over Ethernet networks.
 Ethernet is a 2 layer protocol/standard covering the physical and data link layer,
shown in the diagram above.
 Important Notes:
 HTTP (hypertext transfer protocol) -This is the workhorse of the Web.
 SMTP,POP3,IMap4 – These are email protocols
 TCP (Transmission control protocol) is a connection orientated protocol and is used to
provides a reliable end to end connection.
 UDP (used datagram protocol) is connection less protocol and doesn’t guarantee
delivery. See UDP vs TCP- what is the Difference?
 Applications will choose which transmission protocol to use based on their
function. HTTP, POP3, IMAP4, SMTP and many more use TCP.
 UDP is used more in utility applications like DNS, RIP (routing information
protocol), DHCP.
 IP (Internet Protocol) – This is the main networking protocol. There are two version of
IP (IPv4 and IPV6).
 ARP (address resolution Protocol) -Translates an IP address to a MAC or physical
address.(IP4 networks)

Summary
 The TCP/IP protocol suite is a collection of protocols that are used on the Internet.
 It is named after two of the main protocols (TCP and IP) and uses a 4 layer networking
model.

KNSIT Page 43

You might also like