0% found this document useful (0 votes)
3 views51 pages

Module 1

Module 1 of the Computer Networks course covers the fundamentals of data communications, network types, and the physical layer of networking. It discusses key concepts such as data delivery, accuracy, and timeliness, as well as various network topologies including mesh, star, bus, and ring. The module also highlights the importance of protocols, transmission media, and the criteria for evaluating network performance, reliability, and security.

Uploaded by

1mp22ai024
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views51 pages

Module 1

Module 1 of the Computer Networks course covers the fundamentals of data communications, network types, and the physical layer of networking. It discusses key concepts such as data delivery, accuracy, and timeliness, as well as various network topologies including mesh, star, bus, and ring. The module also highlights the importance of protocols, transmission media, and the criteria for evaluating network performance, reliability, and security.

Uploaded by

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

Computer Networks Module 1

Module 1

1. Introduction:

1.1 Data Communications


1.2 Networks, Network Types
1.3 Networks Models: Protocol Layering
1.4 TCP/IP Protocol suite
1.5 The OSI model

2 Introduction to Physical Layer:

2.1 Transmission media


2.2 Guided Media
2.3 Unguided Media: Wireless.
2.4 Switching: Packet Switching and its types.

Textbook:
Textbook: 1. Behrouz A. Forouzan, Data Communications and Networking, 5th Edition,
Tata McGraw-Hill,2013.
Ch. 1.1 - 1.3, 2.1 - 2.3, 7.1 – 7.3, 8.3.

Manjula L, AIML dept., BGSCET P a g e 1 | 51


Computer Networks Module 1

Chapter 1- Introduction

1.1 Data Communications:


Data communication is exchange of data between two devices via some form of transmission
medium. 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.
a. 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.
b. Accuracy: The system must deliver the data accurately. Data that have been altered in
transmission and left uncorrected are unusable.
c. 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.
d. 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. Protocol Rule 1: Rule 2: ... Rule n:
3. Receiver: The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.

Manjula L, AIML dept., BGSCET P a g e 2 | 51


Computer Networks Module 1

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
Data can be represented in various forms to suit the type of communication. Common types of
data representation include:
o Text: Represented as a sequence of bits using encoding systems like ASCII or Unicode.
o Numbers: Represented directly in binary form, which allows for efficient computation
and transmission.
o Images: Represented as a matrix of pixels, where each pixel is assigned a bit pattern
based on the image's colour or intensity. Colour images often use RGB (Red, Green,
Blue) or YCM (Yellow, Cyan, Magenta) encoding.
o Audio: Audio data is captured as a continuous signal, which can be sampled and
digitized for transmission.
o Video: A sequence of images or frames is used to convey motion, with each frame
represented as individual bit patterns.
1.1.3 Data Flow
Communication between two devices can be simplex, half-duplex, or full-duplex as shown in
Figure 1.2.

Simplex: In simplex mode, the communication is unidirectional. 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 key board 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.

Manjula L, AIML dept., BGSCET P a g e 3 | 51


Computer Networks Module 1

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). In a half-duplex transmission, the entire capacity of a channel is taken over by whichever
of the two devices is transmitting at the time. Walkie-talkies and CB (citizens band) radios are
both half-duplex systems. The half-duplex mode is used in cases where there is no need for
communication in both directions at the same time; the entire capacity of the channel can be
utilized for each direction.
Full-Duplex: In full-duplex mode (also called duplex), both stations can transmit and receive
simultaneously (see Figure 1.2c). 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.
The capacity of the channel, however, must be divided between the two directions.

1.2 Networks, Network Types:


A network is the interconnection of a set of devices capable of communication. A device
can be a
o Host (or an end system as it is sometimes called) such as a large computer, desktop,
laptop, workstation, cellular phone, or security system.
o 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: measured in many ways, including transit time (amount of time required
for a message to travel from one device to another) and response time (elapsed time
between an inquiry and a response)

Manjula L, AIML dept., BGSCET P a g e 4 | 51


Computer Networks Module 1

◦ Depends on a number of factors


◦ The number of users
◦ The type of transmission medium
◦ The capabilities of the connected hardware
◦ The efficiency of the software
◦ Evaluated by two networking metrics: throughput and delay.
• Reliability: measured in terms of
◦ Accuracy of delivery
◦ Frequency of failure
◦ The time it takes a link to recover from a failure
◦ The network’s robustness in a catastrophe
• Security
◦ Protecting data from unauthorized access
◦ Protecting data from damage and development
◦ Implementing policies and procedures for recovery from breaches and data
losses

1.2.2 Physical Structures


Networks can be categorized by their connection types and topologies:
o Type of Connection:

1. Point-to-Point: A direct link between two devices, Only two devices share the
medium, providing the full capacity of the link for communication (e.g., remote control
to TV).

2. Multipoint: Multiple devices share a single link, either spatially (simultaneous use) or
temporally (taking turns).

Manjula L, AIML dept., BGSCET P a g e 5 | 51


Computer Networks Module 1

o Physical Topologies:
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.

Physical Topology

1. Mesh Topology - point-to-point


a. Every device has a dedicated point-to-point link to every other device.
b. Number of physical links in a fully connected mesh network with n nodes: n
(n – 1) physical links or n (n – 1) / 2 duplex-mode links.
c. Every device on the network must have n – 1 input/output (I/O) ports to be
connected to the other n – 1 station.
Advantages
a. They use the dedicated links so each link can only carry its own data load –
traffic problem can be avoided
b. It is robust – if one link gets damaged, it cannot affect others.
c. It gives privacy and security (message travels along a dedicated link)
d. Fault identification and fault isolation are easy
Disadvantages

Manjula L, AIML dept., BGSCET P a g e 6 | 51


Computer Networks Module 1

a. The amount of cabling and the number of I/O ports required are very large.
b. Because every device must be connected to every other device, installation and
reconnection are difficult
c. The sheer bulk of wiring is larger than the available space
d. Hardware required to connect each device is highly expensive.

Applications
a. Connection of telephone regional offices - each regional office needs to be
connected to every other regional office.
b. Wan – wide area network.

2. Star Topology - point-to-point

• Each device has a dedicated point to point link to the central controller called “Hub” –
act as an exchange.
• There is no direct traffic between devices.
• The transmission is occurred only through the central hub.
• When device 1 wants to send data to device 2 –first sends the data to hub which then
relays the data to the other connected device.

• Advantages:

◦ Less expensive than mesh since each device is connected only to the hub
◦ Each device needs only one link and one I/O port to connect it to any
number of others
◦ Installation and configuration are easy.
◦ Less cabling is needed than mesh.
◦ Additions, moves, and deletions involve only one connection:
between that device and the hub.
◦ Robustness - if one link fails only that link is affected – all other links remain
active
◦ Easy to fault identification and to remove parts.
◦ No disruptions to the network when connecting or removing the devices.
• Disadvantage
◦ Dependency of the whole topology on one single point, the hub. If the hub
goes down, the whole system is dead.
◦ Often more cabling is required in a star than in some other topologies (such as
ring or bus).
• Applications

Manjula L, AIML dept., BGSCET P a g e 7 | 51


Computer Networks Module 1

◦ Local-area networks (LAN)


◦ High-speed LAN’s.

3. Bus Topology – multipoint

o One long cable act as a backbone to link all the devices in a network
o Nodes are connected to the bus cable by drop lines and taps
a. Drop line - a connection running between the device and the main cable
b. Tap – splitter that cut the main link to create a contact with the metallic core
o Allows only one device to transmit at a time

• A device wants to communicate with other device on the network sends a broadcast
message onto the wire and all other devices see
• But only the intended device accepts and process the message
• As a signal travels along the backbone, some of its energy is transformed into heat - 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
• Advantages
◦ Ease of installation
◦ Less cabling than mesh or star topologies
• 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 - difficult to
add new devices
• Adding new devices may therefore require modification or
replacement of the backbone
◦ Signal reflection at the taps can cause degradation in quality
• Controlled by limiting the number and spacing of devices connected to
a given length of cable
◦ A fault or break in the bus cable stops all transmission -the damaged area
reflects signals back in the direction of origin, creating noise in both directions
• Applications
◦ Design of early local area networks
◦ Most of computer motherboards.

4. Ring Topology – point-to-point

Manjula L, AIML dept., BGSCET P a g e 8 | 51


Computer Networks Module 1

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

• Advantages
◦ Relatively easy to install and reconfigure
◦ To add or delete a device requires changing only two connections - only
constraints are media and traffic considerations (maximum ring length and
number of devices
◦ Fault isolation is simplified
◦ As a signal is circulating at all times, non reception of a signal at a
node within a specified period issue an alarm from that node - alerts
the network operator to the problem and its location
• Disadvantage
◦ Unidirectional traffic.
◦ A break in the ring (such as a disabled station) can disable the entire network -
solved by using a dual ring or a switch capable of closing off the break.
• Applications
◦ Prevalent when IBM introduced its local-area network, Token Ring.
◦ Some office buildings and School premises higher-speed LAN’s has made this
topology less popular.

1.2.3 Network Types

A computer network is a group of computers that use a set of common communication


protocols over digital interconnections for the purpose of sharing resources located on or
provided by the network nodes.

1. Local Area Network (LAN) :


A LAN is a network that connects computers and devices within a small geographical area,
such as a home, office, or campus.
Characteristics:
• Covers a limited area.

Manjula L, AIML dept., BGSCET P a g e 9 | 51


Computer Networks Module 1

• High data transfer rates (up to 10 Gbps).


• Typically owned and managed by a single organization.

Examples: Ethernet networks, Wi-Fi networks in homes and small offices.

LAN Setup:

o Common Cable Connection: In the past, all hosts within a Local Area Network
(LAN) were connected via a single common cable.
o Packet Transmission: When one host sent a packet to another, it was
broadcast to all hosts on the network.
o Packet Filtering: The intended recipient would accept the packet, while all
other hosts would drop it.
o Drawback: This method created significant network congestion, as every
packet was visible to all hosts, even when they weren't the intended recipient.

Modern LAN Setup:

o Switch-Based LAN: Today, most LANs use smart switches to handle packet delivery.
o Address Recognition: A switch is intelligent enough to recognize the
destination address of each packet.
o Selective Packet Forwarding: Instead of broadcasting packets to all hosts,
the switch sends the packet directly to the destination host.
o Benefits:
▪ Reduced Traffic: Since packets are only sent to the intended recipient,
overall network traffic is significantly reduced.

Manjula L, AIML dept., BGSCET P a g e 10 | 51


Computer Networks Module 1

▪ Simultaneous Communication: More than one pair of hosts can


communicate simultaneously as long as they have different source and
destination addresses. This improves network efficiency.
LAN Capacity:
o Flexibility: The term "LAN" does not specify any constraints on the number of hosts.
A LAN can accommodate a wide range of host numbers, depending on the network’s
size and structure.

2. WAN (Wide Area Network)

A WAN covers a large geographical area, such as a city, country, or even globally. It
connects multiple LANs.

Characteristics:

• Slower data transfer rates than LANs.


• Often managed by multiple entities (e.g., ISPs, governments).
• Utilizes routers and public or private communication links.

Examples: The Internet itself is a WAN, Private networks connecting different company
branches.

A point-to-point WAN:

Figure 1.9: A point-to-point WAN

A Point-to-Point WAN is a network that connects two communication devices directly via
transmission media, such as cables or wireless links. This type of network allows data
transmission between just two endpoints, ensuring a dedicated and private communication
link. Used by businesses to link branch offices or remote locations.

Transmission Media:

• Cable: Examples include fiber optic, coaxial, or twisted-pair cables.


• Air: Wireless links like microwave or satellite connections.

Advantages:

• Dedicated Line: Since only two devices share the link, there is minimal
congestion and consistent bandwidth.

Manjula L, AIML dept., BGSCET P a g e 11 | 51


Computer Networks Module 1

• Security: Limited exposure to external devices reduces the risk of unauthorized


access.

A switched WAN:

A switched Wide Area Network (WAN) is a network infrastructure with multiple endpoints
that are interconnected. Unlike traditional point-to-point WANs, which only connect two
endpoints, a switched WAN allows for dynamic routing between several nodes through
switches.
Role in Global Communication: Switched WANs are fundamental in the backbone of
modern global communication systems, facilitating data transfer across vast geographical
areas.

• A switched WAN is scalable and can connect many endpoints.


• The switches in the network are responsible for choosing the best path for data to
travel.
• It is commonly used in large-scale, high-traffic networks like the internet.

Internetwork :

In modern networks, it's uncommon to find a LAN (Local Area Network) or WAN (Wide
Area Network) operating independently. Instead, they are often connected. When two or
more networks connect, they form an internetwork, or internet.
For example, imagine a company with offices on the east and west coasts. Each office has a
LAN where employees can communicate within the office. To allow communication between
employees at both locations, the company leases a dedicated WAN connection from a service
provider. This WAN links the two LANs, creating an internetwork, or a private internet.
Now, employees from both offices can communicate with each other

Manjula L, AIML dept., BGSCET P a g e 12 | 51


Computer Networks Module 1

1.2.4 Switching

• switched network - a switch connects at least two links together


• A switch forward data from a network to another network when required
• The two most common types of switched networks
◦ circuit-switched
◦ packet-switched networks.

• 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. circuit switching
was very common in telephone networks in the past, although part of the telephone network
today is a packet-switched network.
• a dedicated connection, called a circuit,
◦ always available between the two end systems
◦ the switch can only make it active or inactive
• simple switched network that connects four telephones to each end
• Telephone sets are shown instead of computers as an end system because circuit
switching was very common in telephone networks in the past
◦ part of the telephone network today is a packet-switched network.

• Case1: all telephone sets are busy


◦ 4-people at one site are talking with 4-people at the other site
◦ the capacity of the thick line is fully used
• Case 2: only one telephone set at one side is connected to a telephone set at the other
side
Manjula L, AIML dept., BGSCET P a g e 13 | 51
Computer Networks Module 1

◦ only one-fourth of the capacity of the thick line is used


• 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
• Capacity of the thick line four times the capacity of each voice line so the
communication not fail when all telephone sets at one side want to be connected with
all telephone sets at the other side

• Advantages
• Dedicated channel: Circuit switching provides users with a dedicated channel
for data transfer, which can improve communication quality.
• Low latency: Circuit switching can offer low latency transfers because it uses
the full link bandwidth.
• No waiting time: There is no delay in receiving data, and once a connection is
made, data is transmitted at a constant rate.
• Security: Circuit-switched networks are more secure than packet-switched
networks because only two parties communicate on a dedicated circuit.
• Disadvantages
• Fixed bandwidth: Circuit switching allocates a fixed bandwidth for the entire
communication session, which can be inefficient if traffic patterns are variable.
• Resource wastage: Reserved bandwidth and resources are dedicated to a
specific communication, even when there is no data being transferred.
• Cost: Circuit switching can be expensive to implement and maintain due to the
need for dedicated infrastructure and resources.

Packet-Switched Network
• In a computer network, the communication between the two ends is done in blocks of
data called packets. Switches function for both storing and forwarding because a packet
is an independent entity that can be stored and sent later
• Small packet-switched network that connects four computers at one site to four
computers at the other site.
• A router in a packet-switched network has a queue that can store and forward the packet
• 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.

Manjula L, AIML dept., BGSCET P a g e 14 | 51


Computer Networks Module 1

• 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
• Packet-switched network is more efficient than a circuit switched network, but the
packets may encounter some delays.

• Advantages
• Efficiency: Packet switching is more efficient than circuit-switched networks,
which were less efficient for small messages.
• Scalability: Packet-switched networks can easily accommodate new users and
devices without requiring major network infrastructure changes.
• Fault tolerance: Packet switching is resilient and can reroute packets around
failed network links or routers to ensure data continuity.
• Cost-effective: Packet switching is cost-effective and easier to implement than
other methods.
• Disadvantages
• Sequence numbers: Each packet needs a sequence number because packets are
not ordered.
• Complexity: Packet switching can be more complex than other methods.
• Rerouting delays: Rerouting packets can cause transmission delays.
• Latency: Packet switching can cause latency issues because data packets can
sometimes take longer routes.
• Packet loss or corruption: Packet loss or corruption can occur during
transmission, which can complicate network design and maintenance.
• Not suitable for high-quality voice calls: Packet switching is not suitable for
high-quality voice calls because of the delays involved.
• Not suitable for applications that can't tolerate delays: Packet switching is
not suitable for applications that can't tolerate delays in communication.
• Circuit switching

Manjula L, AIML dept., BGSCET P a g e 15 | 51


Computer Networks Module 1

• A circuit is established for the two parties

telephone
switch

• Packet switching
• Data are put into packets, each stamped with source and destination addresses
• Routers know where to forward packets

Packet Router

Aspect Circuit Switching Packet Switching

Data path Dedicated single route Different shared routes

Message Bypass Temporarily stored at each node

End point's
Both must be ready Only sender is ready
status

Utilization Poor Good

Data rate Fixed Varied

Prioritization Not support Support

The Internet

Manjula L, AIML dept., BGSCET P a g e 16 | 51


Computer Networks Module 1

An internet (note the lowercase i) is two or more networks that can communicate with each
other. The most notable internet is called the Internet (uppercase I), and is composed of
thousands of interconnected networks. Figure 1.15 shows a conceptual (not geographical) view
of the Internet. The figure shows the Internet as several backbones, provider networks, and cus
tomer networks. At the top level, the backbones are large networks owned by some
communication companies such as Sprint, Verizon (MCI), AT&T, and NTT. The back bone
networks are connected through some complex switching systems, called peering points. At
the second level, there are smaller networks, called provider networks, that use the services of
the backbones for a fee. The provider networks are connected to backbones and sometimes to
other provider networks. The customer networks are networks at the edge of the Internet that
actually use the services provided by the Internet. They pay fees to provider networks for
receiving services. Backbones and provider networks are also called Internet Service Providers
(ISPs). The backbones are often referred to as international ISPs; the provider networks are
often referred to as national or regional ISPs.

1.3 Protocol Layering


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.
1.3.1 Scenarios
First Scenario - In the first scenario, communication is so simple that it can occur in only one
layer. Assume Maria and Ann are neighbours 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.

Manjula L, AIML dept., BGSCET P a g e 17 | 51


Computer Networks Module 1

In the second scenario, we assume that Ann is offered a higher-level position in her company,
but needs to move to another branch located in a city very far from Maria. The two friends still
want to continue their communication and exchange ideas.
However, they do not want their ideas to be revealed by other people if the letters are
intercepted. They agree on an encryption/decryption technique. The sender of the letter
encrypts it to make it unreadable by an intruder; the receiver of the letter decrypts it to get the
original letter. Maria and Ann use one technique that makes it hard to decrypt the letter if one
does not have the key for doing so. Now we can say that the communication between Maria
and Ann takes place in three layers, as shown in Figure 2.2. We assume that Ann and Maria
each have three machines (or robots) that can perform the task at each layer.

Let us assume that Maria sends the first letter to Ann. Maria talks to the machine at the third
layer as though the machine is Ann and is listening to her. The third layer machine listens to
what Maria says and creates the plaintext (a letter in English), which is passed to the second
layer machine. The second layer machine takes the plaintext, encrypts it, and creates the
ciphertext, which is passed to the first layer machine. The first layer machine, presumably a
robot, takes the ciphertext, puts it in an envelope, adds the sender and receiver addresses, and
mails it. At Ann’s side, the first layer machine picks up the letter from Ann’s mail box,
recognizing the letter from Maria by the sender address. The machine takes out the cipher text
from the envelope and delivers it to the second layer machine. The second layer machine
decrypts the message, creates the plaintext, and passes the plaintext to the third-layer machine.
Manjula L, AIML dept., BGSCET P a g e 18 | 51
Computer Networks Module 1

The third layer machine takes the plaintext and reads it as though Maria is speaking. Protocol
layering enables us to divide a complex task into several smaller and simpler tasks. For
example, in Figure 2.2, we could have used only one machine to do the job of all three
machines. However, if Maria and Ann decide that the encryption/ decryption done by the
machine is not enough to protect their secrecy, they would have to change the whole machine.
Need for Layering
1. Simplicity: Internet is a very complex and heterogeneous system, composed of many
network protocols, several network equipment, and different transmission medium. Splitting
network protocols into layers where each level deals only with a specific service/functionality
is the best way to reduce complexity and facilitate implementations. When implementing
network protocols, developers need to focus only on the functionality of that layer without
worrying about the functionality performed by the other layers.
2. Modularity: Layered protocols allow for the separation of concerns, making it easier to
design, implement, and maintain each layer independently. This modularity also allows for
easier upgrades and replacements of individual layers without affecting the entire system.
3. Interoperability: Layered protocols enable different systems to communicate with each other
by adhering to the same standards at each layer. This ensures that devices and software from
different manufacturers can work together seamlessly.

Principles of Protocol Layering


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. 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 3 both sites should be a
ciphertext letter. The object under layer 1 at both sites should be a piece of mail.
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.

Manjula L, AIML dept., BGSCET P a g e 19 | 51


Computer Networks Module 1

1.4 TCP/IP PROTOCOL SUITE

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

Manjula L, AIML dept., BGSCET P a g e 20 | 51


Computer Networks Module 1

application layer in a router as long as the router is used only for routing. Although a router is
always involved in one network layer, it is involved in n combinations of link and physical lay
ers in which n is the number of links the router is connected to. The reason is that each link
may use its own data-link or physical protocol. For example, in the above figure, the router is
involved in three links, but the message sent from source A to destination B is involved in two
links. Each link may be using different link-layer and physical-layer protocols; the router needs
to receive a packet from link 1 based on one pair of proto cols and deliver it to link 2 based on
another pair of protocols. A link-layer switch in a link, however, is involved only in two layers,
data-link and physical. Although each switch in the above figure has two different connections,
the connections are in the same link, which uses only one set of protocols. This means that,
unlike a router, a link-layer switch is involved only in one data-link and one physical layer.

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

• Layered Architecture

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.

Manjula L, AIML dept., BGSCET P a g e 21 | 51


Computer Networks Module 1

• Layers in the TCP/IP Protocol Suite


Figure 2.7 shows the second principle discussed previously for protocol layering.

Application layer (Responsible for providing services to the user)


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.

Manjula L, AIML dept., BGSCET P a g e 22 | 51


Computer Networks Module 1

Transport Layer (Responsible for delivery of a message from one process to another)

• Duties/services
◦ Port addressing
◦ Segmentation and reassembly
◦ Connection control
◦ Flow control (end-to-end)
◦ Error control (end-to-end)

The transport layer provides services to the application layer and takes services from the
network layer. The data in the transport layer is referred to as Segments . It is responsible for
the end-to-end delivery of the complete message. The transport layer also provides the
acknowledgment of the successful data transmission and re-transmits the data if an error is
found.

Manjula L, AIML dept., BGSCET P a g e 23 | 51


Computer Networks Module 1

At the sender’s side: The transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow and error control to ensure proper data
transmission. It also adds Source and Destination port numbers in its header and forwards the
segmented data to the Network Layer.
Note: The sender needs to know the port number associated with the receiver’s application.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application requests a web server, it typically uses port number 80,
because this is the default port assigned to web applications. Many applications have default
ports assigned.
At the receiver’s side: Transport Layer reads the port number from its header and forwards
the Data which it has received to the respective application. It also performs sequencing and
reassembling of the segmented data.
Functions of the Transport Layer
• Segmentation and Reassembly: This layer accepts the message from the (session)
layer, and breaks the message into smaller units. Each of the segments produced has a
header associated with it. The transport layer at the destination station reassembles the
message.
• Service Point Addressing: To deliver the message to the correct process, the transport
layer header includes a type of address called service point address or port address.
Thus, by specifying this address, the transport layer makes sure that the message is
delivered to the correct process.
Services Provided by Transport Layer
• Connection-Oriented Service
• Connectionless Service
1. Connection-Oriented Service: It is a three-phase process that includes:
• Connection Establishment
• Data Transfer
• Termination/disconnection
In this type of transmission, the receiving device sends an acknowledgment, back to the
source after a packet or group of packets is received. This type of transmission is reliable and
secure.
2. Connectionless service: It is a one-phase process and includes Data Transfer. In this type of
transmission, the receiver does not acknowledge receipt of a packet. This approach allows for
much faster communication between devices. Connection-oriented service is more reliable
than connectionless Service.
Note:
• Data in the Transport Layer is called Segments.

Manjula L, AIML dept., BGSCET P a g e 24 | 51


Computer Networks Module 1

• Transport layer is operated by the Operating System. It is a part of the OS and


communicates with the Application Layer by making system calls.
• The transport layer is called as Heart of the OSI model.
• Device or Protocol Use : TCP, UDP NetBIOS, PPTP

Network Layer (Responsible for the delivery of packets from the original source to the destination)

Duties/services
• Routing: The network layer protocols determine which route is suitable from
source to destination. This function of the network layer is known as routing.
• Logical Addressing: To identify each device inter-network uniquely, the network
layer defines an addressing scheme. The sender & receiver’s IP addresses are
placed in the header by the network layer. Such an address distinguishes each
device uniquely and universally.

Data Link Layer (Responsible for transmitting frames from one node to the next)
• Duties/services

◦ Framing

◦ Physical addressing

Manjula L, AIML dept., BGSCET P a g e 25 | 51


Computer Networks Module 1

◦ Flow control (hop-to-hop)

◦ Error control (hop-to-hop)

◦ Access control

• Framing: Framing is a function of the data link layer. It provides a way for a sender to
transmit a set of bits that are meaningful to the receiver. This can be accomplished by
attaching special bit patterns to the beginning and end of the frame.
• Physical Addressing: After creating frames, the Data link layer adds physical
addresses ( MAC addresses ) of the sender and/or receiver in the header of each frame.
• Error Control: The data link layer provides the mechanism of error control in which
it detects and retransmits damaged or lost frames.

Manjula L, AIML dept., BGSCET P a g e 26 | 51


Computer Networks Module 1

• Flow Control: The data rate must be constant on both sides else the data may get
corrupted thus, flow control coordinates the amount of data that can be sent before
receiving an acknowledgment.
• Access Control: When a single communication channel is shared by multiple devices,
the MAC sub-layer of the data link layer helps to determine which device has control
over the channel at a given time.

Physical Layer (Responsible for transmitting individual bits from one node to the next)
• Duties/services

◦ Physical characteristics of interfaces and media

◦ Representation of bits

◦ Data rate (transmission rate)

◦ Synchronization of bits

• Bit Synchronization: The physical layer provides the synchronization of the bits by providing
a clock. This clock controls both sender and receiver thus providing synchronization at the bit
level.

• Bit Rate Control: The Physical layer also defines the transmission rate i.e. the number of bits
sent per second.

• Physical Topologies: Physical layer specifies how the different, devices/nodes are arranged in
a network i.e. bus, star, or mesh topology.

• Transmission Mode: Physical layer also defines how the data flows between the two
connected devices. The various transmission modes possible are Simplex, half-duplex and
full-duplex.

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

Manjula L, AIML dept., BGSCET P a g e 27 | 51


Computer Networks Module 1

of data exchange at the physical layer is a bit, which definitely cannot have an
address.

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

Manjula L, AIML dept., BGSCET P a g e 28 | 51


Computer Networks Module 1

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

Ex: At the transport layer, either UDP or TCP can accept a message from several application-
layer protocols

Protocol Suites
• A set of protocols must be constructed
◦ to ensure that the resulting communication system is complete and efficient
• Each protocol should handle a part of communication not handled by other protocols
• How can we guarantee that protocols work well together?
◦ Instead of creating each protocol in isolation, protocols are designed in
complete, cooperative sets called suites or families

Layer Protocols
Application HTTP, FTP, Telnet, SMTP, ...
Transport TCP, UDP, SCTP, ...
Network IP (IPv4), IPv6, ICMP, IGMP, ...
Data Link Ethernet, Wi-Fi, PPP, ...
Physical RS-232, DSL, 10Base-T, ...

OSI MODEL

Manjula L, AIML dept., BGSCET P a g e 29 | 51


Computer Networks Module 1

• A word we hear all the time when we talk about the Internet is protocol. 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 need a
protocol at each layer, or protocol layering.

Session Layer (Responsible for establishing, managing and terminating


connections between applications)
This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.
Functions of the Session Layer
• Session Establishment, Maintenance, and Termination: The layer allows the two
processes to establish, use, and terminate a connection.
• Synchronization: This layer allows a process to add checkpoints that are considered
synchronization points in the data. These synchronization points help to identify the
error so that the data is re-synchronized properly, and ends of the messages are not cut
prematurely and data loss is avoided.
• Dialog Controller: The session layer allows two systems to start communication with
each other in half-duplex or full-duplex.

Presentation Layer (Responsible for handling differences in data


representation to applications)
The presentation layer is also called the Translation layer . The data from the application
layer is extracted here and manipulated as per the required format to transmit over the
network.
Functions of the Presentation Layer
Manjula L, AIML dept., BGSCET P a g e 30 | 51
Computer Networks Module 1

• Translation: For example, ASCII to EBCDIC .


• Encryption/ Decryption: Data encryption translates the data into another form or
code. The encrypted data is known as the ciphertext and the decrypted data is known
as plain text. A key value is used for encrypting as well as decrypting data.
• Compression: Reduces the number of bits that need to be transmitted on the network.
Note: Device or Protocol Use: JPEG, MPEG, GIF.

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

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. OSI was completed when TCP/IP was fully in place. changing it would cost a lot.
2. 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. 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.

Manjula L, AIML dept., BGSCET P a g e 31 | 51


Computer Networks Module 1

Chapter 2- Introduction to Physical Layer

A transmission medium can be broadly defined as anything that can carry information
from a source to a destination. The transmission medium is usually free space,
metallic cable, or fiber-optic cable. The information is usually a signal that is the
result of a conversion of data from another form.

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.
• Twisted-Pair Cable

A twisted pair consists of two conductors (normally copper), each with its own plastic
insulation, twisted together, as shown in Figure 7.3. 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
Manjula L, AIML dept., BGSCET P a g e 32 | 51
Computer Networks Module 1

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 cancelled out. The number of
twists per unit of length (e.g., inch) has effect on the quality of the cable.
Unshielded Versus Shielded Twisted-Pair Cable
The most common twisted-pair cable used in communications is referred to as unshielded
twisted-pair (UTP). IBM has also produced a version of twisted-pair cable for its use, called
shielded twisted-pair (STP). STP cable has a metal foil or braided mesh covering that encases
each pair of insulated conductors. Although metal casing improves the quality of cable by
preventing the penetration of noise or crosstalk, it is bulkier and more expensive. Figure 7.4
shows the difference between UTP and STP.

Manjula L, AIML dept., BGSCET P a g e 33 | 51


Computer Networks Module 1

Performance
A twisted-pair cable can pass a wide range of frequencies. However, increasing frequency, the
attenuation, measured in decibels per kilometre (dB/km), sharply increases with frequencies
above 100 kHz.
Applications
Twisted-pair cables are used in telephone lines to provide voice and data channels. The local
loop—the line that connects subscribers to the central telephone office— commonly consists
of unshielded twisted-pair cables.

Coaxial Cable
Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair
cable.
Instead of having two wires, coax has a central core conductor of solid or stranded wire (usually
copper) enclosed in an insulating sheath, which is, in turn, encased in an outer conductor of
metal foil, braid, or a combination of the two.
The outer metallic wrapping serves both as a shield against noise and as the second conductor,
which completes the circuit. This outer conductor is also enclosed in an insulating sheath, and
the whole cable is protected by a plastic cover (see Figure 7.7).

Performance

Manjula L, AIML dept., BGSCET P a g e 34 | 51


Computer Networks Module 1

Attenuation is much higher in coaxial cable than in twisted-pair cable. In other words, although
coaxial cable has a much higher bandwidth, the signal weakens rapidly and requires the
frequent use of repeaters.
Applications
Coaxial cable was widely used in analog telephone networks where a single coaxial network
could carry 10,000 voice signals. Later it was used in digital telephone networks where a single
coaxial cable could carry digital data up to 600 Mbps. How ever, coaxial cable in telephone
networks has largely been replaced today with fiber optic cable.

Fiber-Optic Cable
A fiber-optic cable is made of glass or plastic and transmits signals in the form of light. Light
travels in a straight line as long as it is moving through a single uniform substance. If a ray of
light traveling through one substance suddenly enters another substance (of a different density),
the ray changes direction.
Figure 7.10 shows how a ray of light changes direction when going from a denser to a less
dense substance. As the figure shows, if the angle of incidence I (the angle the ray makes with
the line perpendicular to the interface between the two substances) is less than the critical angle,
the ray refracts and moves closer to the surface.
If the angle of incidence is equal to the critical angle, the light bends along the interface. If the
angle is greater than the critical angle, the ray reflects (makes a turn) and travels again in the
denser substance.
Note that the critical angle is a property of the substance, and its value differs from one
substance to another. Optical fibers use reflection to guide light through a channel. A glass or
plastic core is surrounded by a cladding of less dense glass or plastic. The difference in density
of the two materials must be such that a beam of light moving through the core is reflected off
the cladding instead of being refracted into it. See Figure 7.11.

Manjula L, AIML dept., BGSCET P a g e 35 | 51


Computer Networks Module 1

Propagation Modes
Current technology supports two modes (multimode and single mode) for propagating light
along optical channels, each requiring fiber with different physical characteristics. Multimode
can be implemented in two forms: step-index or graded-index (see Figure 7.12).

Multimode
Multimode is so named because multiple beams from a light source move through the core in
different paths. How these beams move within the cable depends on the structure of the core,
as shown in Figure 7.13.

Manjula L, AIML dept., BGSCET P a g e 36 | 51


Computer Networks Module 1

In multimode step-index fiber, the density of the core remains constant from the center to the
edges. A beam of light moves through this constant density in a straight line until it reaches the
interface of the core and the cladding.
At the interface, there is an abrupt change due to a lower density; this alters the angle of the
beam’s motion. The term step-index refers to the suddenness of this change, which contributes
to the distortion of the signal as it passes through the fiber.
A second type of fiber, called multimode graded-index fiber, decreases this distortion of the
signal through the cable. The word index here refers to the index of refraction. As we saw
above, the index of refraction is related to density.
A graded index fiber, therefore, is one with varying densities. Density is highest at the center
of the core and decreases gradually to its lowest at the edge. Figure 7.13 shows the impact of
this variable density on the propagation of light beams.
Single-Mode
Single-mode uses step-index fiber and a highly focused source of light that limits beams to a
small range of angles, all close to the horizontal. The single-mode fiber itself is manufactured
with a much smaller diameter than that of multimode fiber, and with substantially lower density
(index of refraction).
The decrease in density results in a critical angle that is close enough to 90° to make the
propagation of beams almost horizontal. In this case, propagation of different beams is almost
identical, and delays are negligible. All the beams arrive at the destination “together” and can
be recombined with little distortion to the signal (see Figure 7.13).

Manjula L, AIML dept., BGSCET P a g e 37 | 51


Computer Networks Module 1

Performance
Attenuation is flatter than in the case of twisted-pair cable and coaxial cable. The performance
is such that we need fewer (actually one tenth as many) repeaters when we use fiber-optic cable.
Applications
Fiber-optic cable is often found in backbone networks because its wide bandwidth is cost-
effective. Today, with wavelength-division multiplexing (WDM), we can transfer data at a rate
of 1600 Gbps. The SONET network provides backbone. Some cable TV companies use a
combination of optical fiber and coaxial cable, thus creating a hybrid network. Optical fiber
provides the backbone structure while coaxial cable provides the connection to the user
premises. This is a cost-effective con figuration since the narrow bandwidth requirement at the
user end does not justify the use of optical fiber.
Advantages and Disadvantages of Optical Fiber
Advantages Fiber-optic cable has several advantages over metallic cable (twisted-pair or
coaxial).

❑ Higher bandwidth. Fiber-optic cable can support dramatically higher bandwidths (and
hence data rates) than either twisted-pair or coaxial cable. Currently, data rates and bandwidth
utilization over fiber-optic cable are limited not by the medium but by the signal generation
and reception technology available.

❑ Less signal attenuation. Fiber-optic transmission distance is significantly greater than that
of other guided media. A signal can run for 50 km without requiring regeneration. We need
repeaters every 5 km for coaxial or twisted-pair cable.

❑ Immunity to electromagnetic interference. Electromagnetic noise cannot affect fiber-


optic cables.

❑ Resistance to corrosive materials. Glass is more resistant to corrosive materials than


copper.

❑ Light weight. Fiber-optic cables are much lighter than copper cables.

❑ Greater immunity to tapping. Fiber-optic cables are more immune to tapping than copper
cables. Copper cables create antenna effects that can easily be tapped.
Disadvantages
There are some disadvantages in the use 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.

Manjula L, AIML dept., BGSCET P a g e 38 | 51


Computer Networks Module 1

UNGUIDED MEDIA: WIRELESS


Unguided medium transport electromagnetic waves without using a physical conductor. This
type of communication is often referred to as wireless communication. Signals are normally
broadcast through free space and thus are available to anyone who has a device capable of
receiving them. Figure 7.17 shows the part of the electromagnetic spectrum, ranging from 3
kHz to 900 THz, used for wireless communication. Unguided signals can travel from the source
to the destination in several ways: ground propagation, sky propagation, and line-of-sight
propagation, as shown in Figure 7.18

In ground propagation, radio waves travel through the lowest portion of the atmo sphere,
hugging the earth. These low-frequency signals emanate in all directions from the transmitting
antenna and follow the curvature of the planet. Distance depends on the amount of power in
the signal: The greater the power, the greater the distance. In sky propagation, higher-frequency
radio waves radiate upward into the ionosphere (the layer of atmosphere where particles exist
as ions) where they are reflected back to earth. This type of transmission allows for greater
distances with lower output power. In line-of-sight propagation, very high-frequency signals
are transmitted in straight lines directly from antenna to antenna. Antennas must be directional,
facing each other, and either tall enough or close enough together not to be affected by the
curvature of the earth. Line-of sight propagation is tricky because radio transmissions cannot
be completely focused. The section of the electromagnetic spectrum defined as radio waves
and microwaves is divided into eight ranges, called bands, each regulated by government
authorities. These bands are rated from very low frequency (VLF) to extremely high frequency
(EHF). Table 7.4 lists these bands, their ranges, propagation methods, and some applications.

Manjula L, AIML dept., BGSCET P a g e 39 | 51


Computer Networks Module 1

Radio Waves
Although there is no clear-cut demarcation between radio waves and microwaves,
electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called
radio waves; waves ranging in frequencies between 1 and 300 GHz are called micro waves.
However, the behavior of the waves, rather than the frequencies, is a better criterion for
classification. Radio waves, for the most part, are omnidirectional. When an antenna transmits
radio waves, they are propagated in all directions. This means that the sending and receiving
antennas do not have to be aligned. A sending antenna sends waves that can be received by any
receiving antenna. The omnidirectional property has a disadvantage, too. The radio waves
transmitted by one antenna are susceptible to interference by another antenna that may send
signals using the same frequency or band. Radio waves, particularly those waves that propagate
in the sky mode, can travel long distances. This makes radio waves a good candidate for long-
distance broadcasting such as AM radio. Radio waves, particularly those of low and medium
frequencies, can penetrate walls. This characteristic can be both an advantage and a
disadvantage. It is an advantage because, for example, an AM radio can receive signals inside
a building. It is a dis advantage because we cannot isolate a communication to just inside or
outside a building. The radio wave band is relatively narrow, just under 1 GHz, compared to
the microwave band. When this band is divided into sub bands, the sub bands are also narrow,
leading to a low data rate for digital communications. Almost the entire band is regulated by
authorities (e.g., the FCC in the United States). Using any part of the band requires permission
from the authorities.
Omnidirectional Antenna
Radio waves use omnidirectional antennas that send out signals in all directions. Based on the
wavelength, strength, and the purpose of transmission, we can have several types of antennas.
Figure 7.19 shows an omnidirectional antenna.

Manjula L, AIML dept., BGSCET P a g e 40 | 51


Computer Networks Module 1

Applications
The omnidirectional characteristics of radio waves make them useful for multicasting, in which
there is one sender but many receivers. AM and FM radio, television, maritime radio, cordless
phones, and paging are examples of multicasting. Radio waves are used for multicast
communications, such as radio and television, and paging systems.

Microwaves
Electromagnetic waves having frequencies between 1 and 300 GHz are called micro waves.
Microwaves are unidirectional. When an antenna transmits microwaves, they can be narrowly
focused. This means that the sending and receiving antennas need to be aligned. The
unidirectional property has an obvious advantage. A pair of antennas can be aligned without
interfering with another pair of aligned antennas.
The following describes some characteristics of microwave propagation:

❑ Microwave propagation is line-of-sight. Since the towers with the mounted antennas need
to be in direct sight of each other, towers that are far apart need to be very tall. The curvature
of the earth as well as other blocking obstacles do not allow two short towers to communicate
by using microwaves. Repeaters are often needed for long distance communication.

❑ Very high-frequency microwaves cannot penetrate walls. This characteristic can be a


disadvantage if receivers are inside buildings.

❑ The microwave band is relatively wide, almost 299 GHz. Therefore, wider subbands can be
assigned, and a high data rate is possible.

❑ Use of certain portions of the band requires permission from authorities.


Unidirectional Antenna
Microwaves need unidirectional antennas that send out signals in one direction. Two types of
antennas are used for microwave communications: the parabolic dish and the horn (see Figure
7.20).

Manjula L, AIML dept., BGSCET P a g e 41 | 51


Computer Networks Module 1

A parabolic dish antenna is based on the geometry of a parabola: Every line parallel to the line
of symmetry (line of sight) reflects off the curve at angles such that all the lines intersect in a
common point called the focus. The parabolic dish works as a funnel, catching a wide range of
waves and directing them to a common point. In this way, more of the signal is recovered than
would be possible with a single-point receiver. Outgoing transmissions are broadcast through
a horn aimed at the dish. The micro waves hit the dish and are deflected outward in a reversal
of the receipt path. A horn antenna looks like a gigantic scoop. Outgoing transmissions are
broadcast up a stem (resembling a handle) and deflected outward in a series of narrow parallel
beams by the curved head. Received transmissions are collected by the scooped shape of the
horn, in a manner similar to the parabolic dish, and are deflected down into the stem.
Applications
Microwaves, due to their unidirectional properties, are very useful when unicast (one to-one)
communication is needed between the sender and the receiver. They are used in cellular phones,
satellite networks, and wireless LANs.

Infrared
Infrared waves, with frequencies from 300 GHz to 400 THz (wavelengths from 1 mm to 770
nm), can be used for short-range communication. Infrared waves, having high frequencies,
cannot penetrate walls. This advantageous characteristic prevents interference between one
system and another; a short-range communication system in one room cannot be affected by
another system in the next room. When we use our infrared remote control, we do not interfere
with the use of the remote by our neighbors. How ever, this same characteristic makes infrared
signals useless for long-range communication. In addition, we cannot use infrared waves
outside a building because the sun’s rays contain infrared waves that can interfere with the
communication.
Applications
The infrared band, almost 400 THz, has an excellent potential for data transmission. Such a
wide bandwidth can be used to transmit digital data with a very high data rate. The Infrared
Data Association (IrDA), an association for sponsoring the use of infrared waves, has

Manjula L, AIML dept., BGSCET P a g e 42 | 51


Computer Networks Module 1

established standards for using these signals for communication between devices such as
keyboards, mice, PCs, and printers. For example, some manufacturers provide a special port
called the IrDA port that allows a wireless keyboard to communicate with a PC. The standard
originally defined a data rate of 75 kbps for a distance up to 8 m. The recent standard defines
a data rate of 4 Mbps. Infrared signals defined by IrDA transmit through line of sight; the IrDA
port on the keyboard needs to point to the PC for transmission to occur.

PACKET SWITCHING
In data communications, we need to send messages from one end system to another. If the
message is going to pass through a packet-switched network, it needs to be divided into packets
of fixed or variable size. The size of the packet is determined by the network and the governing
protocol. In packet switching, there is no resource allocation for a packet. This means that there
is no reserved bandwidth on the links, and there is no scheduled processing time for each
packet. Resources are allocated on demand. The allocation is done on a first come, first-served
basis. When a switch receives a packet, no matter what the source or destination is, the packet
must wait if there are other packets being processed. As with other systems in our daily life,
this lack of reservation may create delay. For example, if we do not have a reservation at a
restaurant, we might have to wait.
Datagram Networks
In a datagram network, each packet is treated independently of all others. Even if a packet is
part of a multipacket transmission, the network treats it as though it existed alone. Packets in
this approach are referred to as datagrams. Datagram switching is normally done at the network
layer. We briefly discuss datagram networks here as a comparison with circuit-switched and
virtual-circuit switched networks. Figure 8.7 shows how the datagram approach is used to
deliver four packets from station A to station X. The switches in a datagram network are
traditionally referred to as routers. That is why we use a different symbol for the switches in
the figure.

In this example, all four packets (or datagrams) belong to the same message, but may travel
different paths to reach their destination. This is so because the links may be involved in
carrying packets from other sources and do not have the necessary bandwidth available to carry
all the packets from A to X. This approach can cause the datagrams of a transmission to arrive

Manjula L, AIML dept., BGSCET P a g e 43 | 51


Computer Networks Module 1

at their destination out of order with different delays between the packets. Packets may also be
lost or dropped because of a lack of resources. In most protocols, it is the responsibility of an
upper-layer protocol to reorder the datagrams or ask for lost datagrams before passing them on
to the application. The datagram networks are sometimes referred to as connectionless
networks. The term connectionless here means that the switch (packet switch) does not keep
information about the connection state. There are no setup or teardown phases. Each packet is
treated the same by a switch regardless of its source or destination.
Routing Table
If there are no setup or teardown phases, how are the packets routed to their destinations in a
datagram network? In this type of network, each switch (or packet switch) has a routing table
which is based on the destination address.
The routing tables are dynamic and are updated periodically. The destination addresses and the
corresponding forwarding output ports are recorded in the tables. This is different from the
table of a circuit switched network in which each entry is created when the setup phase is
completed and deleted when the teardown phase is over. Figure 8.8 shows the routing table for
a switch.

Destination Address
Every packet in a datagram network carries a header that contains, among other information,
the destination addresses of the packet. When the switch receives the packet, this destination
address is examined; the routing table is consulted to find the corresponding port through which
the packet should be forwarded. This address, unlike the address in a virtual-circuit network,
remains the same during the entire journey of the packet.

Manjula L, AIML dept., BGSCET P a g e 44 | 51


Computer Networks Module 1

Efficiency
The efficiency of a datagram network is better than that of a circuit-switched network resources
are allocated only when there are packets to be transferred. If a source sends a packet and there
is a delay of a few minutes before another packet can be sent, the resources can be reallocated
during these minutes for other packets from other sources.
Delay
There may be greater delay in a datagram network than in a virtual-circuit network. Although
there are no setup and teardown phases, each packet may experience a wait at a switch before
it is forwarded. In addition, since not all packets in a message necessarily travel through the
same switches, the delay is not uniform for the packets of a message. Figure 8.9 gives an
example of delay in a datagram network for one packet.

The packet travels through two switches. There are three transmission times (3T), three
propagation delays (slopes 3τ of the lines), and two waiting times (w1 + w2). We ignore the
processing time in each switch. The total delay is

Virtual-Circuit Networks

A virtual-circuit network is a cross between a circuit-switched network and a datagram


network. It has some characteristics of both.
1. As in a circuit-switched network, there are setup and teardown phases in addition to the data
transfer phase.
2. Resources can be allocated during the setup phase, as in a circuit-switched network, or on
demand, as in a datagram network.
3. As in a datagram network, data are packetized and each packet carries an address in the
header. However, the address in the header has local jurisdiction (it defines what the next switch
should be and the channel on which the packet is being carried), not end-to-end jurisdiction.

Manjula L, AIML dept., BGSCET P a g e 45 | 51


Computer Networks Module 1

The reader may ask how the intermediate switches know where to send the packet if there is
no final destination address carried by a packet. The answer will be clear when we discuss
virtual-circuit identifiers in the next section.
4. As in a circuit-switched network, all packets follow the same path established during the
connection.
5. A virtual-circuit network is normally implemented in the data-link layer, while a circuit-
switched network is implemented in the physical layer and a datagram network in the network
layer.
Figure 8.10 is an example of a virtual-circuit network. The network has switches that allow
traffic from sources to destinations. A source or destination can be a computer, packet switch,
bridge, or any other device that connects other networks.

Addressing
In a virtual-circuit network, two types of addressing are involved: global and local (virtual-
circuit identifier).
Global Addressing
A source or a destination needs to have a global address—an address that can be unique in the
scope of the network or internationally if the network is part of an international network.
However, we will see that a global address in virtual-circuit networks is used only to create a
virtual-circuit identifier, as discussed next.
Virtual-Circuit Identifier
The identifier that is actually used for data transfer is called the virtual-circuit identifier (VCI)
or the label. A VCI, unlike a global address, is a small number that has only switch scope; it is
used by a frame between two switches. When a frame arrives at a switch, it has a VCI; when it
leaves, it has a different VCI. Figure 8.11 shows how the VCI in a data frame changes from
one switch to another. Note that a VCI does not need to be a large number since each switch
can use its own unique set of VCIs.

Manjula L, AIML dept., BGSCET P a g e 46 | 51


Computer Networks Module 1

Three Phases
As in a circuit-switched network, a source and destination need to go through three phases in a
virtual-circuit network: setup, data transfer, and teardown. In the setup phase, the source and
destination use their global addresses to help switches make table entries for the connection. In
the teardown phase, the source and destination inform the switches to delete the corresponding
entry. Data transfer occurs between these two phases.
Data-Transfer Phase
To transfer a frame from a source to its destination, all switches need to have a table entry for
this virtual circuit. The table, in its simplest form, has four columns. This means that the switch
holds four pieces of information for each virtual circuit that is already set up. We show later
how the switches make their table entries, but for the moment we assume that each switch has
a table with entries for all active virtual circuits. Figure 8.12 shows such a switch and its
corresponding table.

Figure 8.12 shows a frame arriving at port 1 with a VCI of 14. When the frame arrives, the
switch looks in its table to find port 1 and a VCI of 14. When it is found, the switch knows to
change the VCI to 22 and send out the frame from port 3. Figure 8.13 shows how a frame from
source A reaches destination B and how its VCI changes during the trip. Each switch changes
the VCI and routes the frame. The data-transfer phase is active until the source sends all its
frames to the destination. The procedure at the switch is the same for each frame of a message.

Manjula L, AIML dept., BGSCET P a g e 47 | 51


Computer Networks Module 1

The process creates a virtual circuit, not a real circuit, between the source and destination. Setup
Phase In the setup phase, a switch creates an entry for a virtual circuit. For example, suppose
source A needs to create a virtual circuit to B. Two steps are required: the setup request and the
acknowledgment.

Setup Request
A setup request frame is sent from the source to the destination. Figure 8.14 shows the process.

a. Source A sends a setup frame to switch 1.


b. Switch 1 receives the setup request frame. It knows that a frame going from A to B goes out
through port 3. How the switch has obtained this information is a point covered in future
chapters. The switch, in the setup phase, acts as a packet switch; it has a routing table which is

Manjula L, AIML dept., BGSCET P a g e 48 | 51


Computer Networks Module 1

different from the switching table. For the moment, assume that it knows the output port. The
switch creates an entry in its table for this virtual circuit, but it is only able to fill three of the
four columns. The switch assigns the incoming port (1) and chooses an available incoming VCI
(14) and the outgoing port (3). It does not yet know the outgoing VCI, which will be found dur
ing the acknowledgment step. The switch then forwards the frame through port 3 to switch 2.
c. Switch 2 receives the setup request frame. The same events happen here as at switch 1; three
columns of the table are completed: in this case, incoming port (1), incoming VCI (66), and
outgoing port (2).
d. Switch 3 receives the setup request frame. Again, three columns are completed: incoming
port (2), incoming VCI (22), and outgoing port (3).
e. Destination B receives the setup frame, and if it is ready to receive frames from A, it assigns
a VCI to the incoming frames that come from A, in this case 77. This VCI lets the destination
know that the frames come from A, and not other sources.
Acknowledgment
A special frame, called the acknowledgment frame, completes the entries in the switch ing
tables. Figure 8.15 shows the process.

a. The destination sends an acknowledgment to switch 3. The acknowledgment carries the


global source and destination addresses so the switch knows which entry in the table is to be
completed. The frame also carries VCI 77, chosen by the destination as the incoming VCI for
frames from A. Switch 3 uses this VCI to complete the outgo ing VCI column for this entry.
Note that 77 is the incoming VCI for destination B, but the outgoing VCI for switch 3.
b. Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI in the table,
chosen in the previous step. Switch 2 uses this as the outgoing VCI in the table.
c. Switch 2 sends an acknowledgment to switch 1 that contains its incoming VCI in the table,
chosen in the previous step. Switch 1 uses this as the outgoing VCI in the table.

Manjula L, AIML dept., BGSCET P a g e 49 | 51


Computer Networks Module 1

d. Finally switch 1 sends an acknowledgment to source A that contains its incoming VCI in the
table, chosen in the previous step.
e. The source uses this as the outgoing VCI for the data frames to be sent to destination B.
Teardown Phase
In this phase, source A, after sending all frames to B, sends a special frame called a teardown
request. Destination B responds with a teardown confirmation frame. All switches delete the
corresponding entry from their tables.
Efficiency
As we said before, resource reservation in a virtual-circuit network can be made during the
setup or can be on demand during the data-transfer phase. In the first case, the delay for each
packet is the same; in the second case, each packet may encounter different delays. There is
one big advantage in a virtual-circuit network even if resource allocation is on demand. The
source can check the availability of the resources, without actually reserving it. Consider a
family that wants to dine at a restaurant. Although the restaurant may not accept reservations
(allocation of the tables is on demand), the family can call and find out the waiting time. This
can save the family time and effort.

Delay in Virtual-Circuit Networks


In a virtual-circuit network, there is a one-time delay for setup and a one-time delay for
teardown. If resources are allocated during the setup phase, there is no wait time for individual
packets. Figure 8.16 shows the delay for a packet traveling through two switches in a virtual-
circuit network.

Manjula L, AIML dept., BGSCET P a g e 50 | 51


Computer Networks Module 1

The packet is traveling through two switches (routers). There are three transmission times (3T
), three propagation times (3τ), data transfer depicted by the sloping lines, a setup delay (which
includes transmission and propagation in two directions). and a teardown delay (which includes
transmission and propagation in one direction). We ignore the processing time in each switch.
The total delay time is

Manjula L, AIML dept., BGSCET P a g e 51 | 51

You might also like