0% found this document useful (0 votes)
10 views124 pages

Unit 2

The document provides an overview of computer networks, focusing on the ISO-OSI architecture and TCP/IP model. It details the functions of each layer in the OSI model, including physical, data link, network, transport, session, presentation, and application layers, highlighting their roles in data communication. Additionally, it discusses concepts such as encapsulation, peer-to-peer processes, and the importance of protocols in ensuring effective communication between systems.

Uploaded by

venu
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)
10 views124 pages

Unit 2

The document provides an overview of computer networks, focusing on the ISO-OSI architecture and TCP/IP model. It details the functions of each layer in the OSI model, including physical, data link, network, transport, session, presentation, and application layers, highlighting their roles in data communication. Additionally, it discusses concepts such as encapsulation, peer-to-peer processes, and the importance of protocols in ensuring effective communication between systems.

Uploaded by

venu
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

DATA COMMUNICATIONS AND

COMPUTER NETWORKS
23MCAH203

Venugopala Rao A S
Head – Computer Applications Department
PIM Udupi
Introduction to Computer Networks
• Unit 2: Introduction to Computer Networks
• Application and goals
• Classification of Computer Networks,
• ISO-OSI Architecture
• Services of Physical, Data link, Network, Transport, Session, Presentation and Application
Layers.
• TCP /IP reference Model
• Topology.
• Physical and Data Link Layer Services,
• Network Layer Services: Networking and Internetworking Technology Devices,
Repeaters, Bridges, Routers, Gateways and Other Devices
13-08-2024 PIM, Udupi 2
Introduction to Computer Networks
• ISO-OSI Architecture
• In our daily life concept of layers can be seen in most of the tasks we perform.
• Let us take up simple example of sending a letter to a friend

13-08-2024 PIM, Udupi 3


Introduction to Computer Networks
• Hierarchy:
• In the example, it can be seen that there are various tasks to be performed at the sender side
before letter is sent to the carrier.
• Similarly various tasks at the receiving side before letter reaches the destination.
• Here the order of tasks are need to be followed as they are given
• Services:
• Each layer in the sending side uses the service of layer immediately below it.
• i.e. sender uses services of higher layer, higher layer uses service of middle layer and so on.
• In data communication, the most dominated layered model was Open System Interconnect
(OSI) model.
• But the introduction of TCP/IP protocol suit in 1990 took over the major role in data
communication over OSI model.
13-08-2024 PIM, Udupi 4
Introduction to Computer Networks
• International standards Organization(ISO), a multinational body dedicated to
worldwide agreement on International standards.
• An ISO standard that covers all aspects of data communication is OSI model.
• This was proposed in 1970.
• Open system is a set of protocols used for any two systems to communicate
irrespective of their architecture.
• The purpose of OSI model was to show the possibility of communication between
two different systems without changing the underlying hardware or software.
• Note that OSI model is not protocol, it is a model to understand, design a network
which is flexible, robust and interoperable.

13-08-2024 PIM, Udupi 5


Introduction to Computer Networks
• The OSI model consists of seven separate but related layers, each of which defines
a part of the process of moving information across a network

13-08-2024 PIM, Udupi 6


Introduction to Computer Networks
• Layered Architecture:
• In developing the model, the designers grouped the process of transmitting data to
its most fundamental elements.
• i.e. they identified which networking functions had related uses and collected
those functions into discrete groups known as layers.
• Here each layer defines a family of functions which is distinct from the functions
of the other layers.
• By defining and localizing functionality in this fashion, an architecture is created
that is both comprehensive and flexible.
• Most importantly, the OSI model allows complete interoperability between
incompatible systems.
• This model is shown in a detailed manner in the figure.
13-08-2024 PIM, Udupi 7
Introduction to Computer Networks

13-08-2024 PIM, Udupi 8


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

13-08-2024 PIM, Udupi 9
Introduction to Computer Networks
• Peer-to-peer process:
• From the fig. it is clear that, at the physical layer, communication is direct.
• i.e. device A sends bit stream to device B through intermediate nodes.
• But at the higher level communication comes down through higher layers on
device A and moves upwards in layers of device B
• Each layer in sending side adds its own information to the data it receives from the
layer above it and sends the same to layer below it
• Finally at layer 1, entire message is converted to a form suitable for transmission
to receiving side.
• At receiving side, the message will be unwrapped layer by layer and passed to
next higher layer.
13-08-2024 PIM, Udupi 10
Introduction to Computer Networks
• Interfaces Between Layers:

13-08-2024 PIM, Udupi 11


Introduction to Computer Networks
• Interfaces Between Layers:
• The passing data and network information between layers is made possible by an
interface between each pair of adjacent layers.
• Each interface defines the information and services a layer must provide for the layer
above it.
• As long as a layer provides the expected services to the layer above it, the specific
implementation of its functions can be modified or replaced without requiring changes to
the surrounding layers.
• Organization of layers:
• Seven layers are grouped into three groups
• Physical, data link an network- network support layers.
• This is because they deal with physical aspects of data movement like physical
connection, electrical specification, physical addressing etc.
13-08-2024 PIM, Udupi 12
Introduction to Computer Networks
• Session, presentation and application layers – user support layers.
• They allow interoperability among unrelated software systems.
• Layer 4, the transport layer links the above said two subgroups and also ensures
that, data transmitted by lower layer is in a form which can be used by upper
layers.
• Upper layers of OSI model are always implemented using software only.
• Lower layers except physical layer are combination of both hardware and
software.
• Physical layer is commonly hardware.

13-08-2024 PIM, Udupi 13


Introduction to Computer Networks
• Data Exchange using OSI model

13-08-2024 PIM, Udupi 14


Introduction to Computer Networks
• In the figure, D7 means data unit at layer 7, D6 means data unit at layer 6 and so
on.
• Communication process starts at layer 7, and moves downwards layer by layer.
• Each layer adds some information to the data it receives from higher layer. These
are known as headers or trailers.
• Finally after reaching layer 1, data is converted to EM signal and transported via
physical link.
• At receiving end, data is converted back to digital form and moves upwards
through layers.
• At every layer, the headers and trailers attached to the data by the corresponding
layer is removed and performs layer specific tasks and sends data upwards for
next layer.

13-08-2024 PIM, Udupi 15


Introduction to Computer Networks
• Encapsulation:
• From the figure it can be seen that, data portion at any given layer N contains the
whole packet (data + header/trailer) from the layer (N-1).
• This is called as encapsulation.
• For example, a packet from layer 6 which consists of header and data is together
considered as single data unit and layer 5 adds its header to this data packet.
• Layer (N-1) will not be aware of which part of encapsulated packet is data an
which part is header.
• It considers whole packet received from layer N as single data unit.

13-08-2024 PIM, Udupi 16


Introduction to Computer Networks
• Physical layer:
• The physical layer coordinates the functions required to carry a bit stream over a
physical medium.
• It deals with the mechanical and electrical specifications of the interface and
transmission medium.
• It also defines the procedures and functions of physical devices and interfaces for
the transmission to take place.

13-08-2024 PIM, Udupi 17


Introduction to Computer Networks
• Other responsibilities of physical layer are-
• Physical characteristics of interfaces and medium: The physical layer defines the
characteristics of the interface between the devices and the transmission medium.
It also defines the type of transmission medium.
• Representation of bits: The physical layer data consists of a stream of bits
(sequence of 0’s or l’s) with no interpretation. To be transmitted, bits must be
encoded into signals – electrical or optical. The physical layer defines the type of
encoding (how 0’s and 1’s are changed to signals).
• Data rate: (The transmission rate) - the number of bits sent each second—is
defined by the physical layer. In other words, the physical layer defines the
duration of a bit.
13-08-2024 PIM, Udupi 18
Introduction to Computer Networks
• Synchronization of bits: The sender and receiver not only must use the same bit
rate but also must be synchronized at the bit level. In other words, the sender and
the receiver clocks must be synchronized.
• Line configuration: The physical layer is concerned with the connection of devices
to the media. In a point-to-point configuration, two devices are connected through
a dedicated link. In a multipoint configuration, a link is shared among several
devices.
• Physical topology: The physical topology defines how devices are connected to
make a network. Devices can be connected by using a mesh topology, a star
topology, a ring topology, a bus topology, or a hybrid topology.
• Transmission mode: The physical layer also defines the direction of transmission
between two devices: simplex, half-duplex, or full-duplex.
13-08-2024 PIM, Udupi 19
Introduction to Computer Networks
• Data link layer:
• Data link layer makes physical layer to be error free for the upper layer (Network layer).

• Other functions of data link layer include-


• Framing: The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.
• Physical addressing: The data link layer adds a header to the frame to define the sender
and/or receiver of the frame. If the frame is intended for a system outside the sender's
network, the receiver address is the address of the device that connects the network to
the next one
13-08-2024 PIM, Udupi 20
Introduction to Computer Networks
• Flow control: If the rate at which the data are absorbed by the receiver is less than
the rate at which data are produced in the sender, the data link layer imposes a
flow control mechanism to avoid data loss at the receiver.
• Error control: The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. It also uses a
mechanism to recognize duplicate frames. Error control is normally achieved
through a trailer added to the end of the frame.
• Access control: When two or more devices are connected to the same link, data
link layer protocols are necessary to determine which device has control over the
link at any given time.

13-08-2024 PIM, Udupi 21


Introduction to Computer Networks
• Network layer:
• Responsible for the source-to-destination delivery of a packet, possibly across
multiple networks (links).
• It ensures that each packet gets from its point of origin to its final destination.
• If two systems are connected to the same link, there is usually no need for a
network layer.
• But if the two systems are attached to different networks (links) with connecting
devices between the networks (links), there is often a need for the network layer to
accomplish source-to-destination delivery.

13-08-2024 PIM, Udupi 22


Introduction to Computer Networks

• Other functions of network layer:


• Logical addressing:
• The physical addressing implemented by the data link layer handles the addressing
problem locally.

13-08-2024 PIM, Udupi 23


Introduction to Computer Networks
• If a packet passes the network boundary, we need another addressing system to
help distinguish the source and destination systems.
• The network layer adds a header to the packet coming from the upper layer that,
among other things, includes the logical addresses of the sender and receiver.
• Routing: When independent networks or links are connected to create
internetworks (network of networks) or a large network, the connecting devices
(called routers or switches) route or switch the packets to their final destination.
The network layer provides this mechanism.

13-08-2024 PIM, Udupi 24


Introduction to Computer Networks
• Transport layer:
• Responsible for process to process delivery of the entire message.
• i.e. this layer ensures that the whole message arrives from source to destination
intact and also in the same order as it is sent.
• It also performs error control and flow control operations

13-08-2024 PIM, Udupi 25


Introduction to Computer Networks
• Other responsibilities
• Service point addressing:
• W.k.t. computers run several programs at the same time.
• In this context, source to destination delivery implies that delivery of messages
from a specific process in source to a specific process in the destination.
• The transport layer header must include a type of address called a service-point
address (or port address).
• Based on this address, the network layer gets each packet to the correct computer,
the transport layer gets the entire message to the correct process on that computer.

13-08-2024 PIM, Udupi 26


Introduction to Computer Networks
• Segmentation and reassembly:
• Messages are divided in small pieces so that transportation becomes easy.
• Each piece will have a sequence number which is used for reassembling them at
destination.
• In case any number in the sequence is missing, this indicates that, corresponding
packet is lost.
• This can be obtained by the retransmission from the source.

• Flow control:
• Similar to data-link layer, this layer also performs flow control.
• But difference here is, the flow control here is done from end to end.
13-08-2024 PIM, Udupi 27
Introduction to Computer Networks
• Error control:
• Error control is done process to process.
• Transport layer of sending side, makes sure that the message is received at the
destination without any error caused due to damage, loss or duplication.
• Usually error correction is done via retransmission.

13-08-2024 PIM, Udupi 28


Introduction to Computer Networks
• Session layer:
• In some processes, services provided by physical, data link and network layers
may not be sufficient.
• In such cases session layer is useful for providing required additional services.
• Session layer establishes, maintains and synchronizes the interaction among
communicating systems.
• Responsibilities of Session layer:
• Dialog control- this layer enables two systems to enter into communication
(dialog)
• Communication may be half duplex or full duplex.
• Synchronization:- this layer adds check points/synchronization points to the
stream of data.
• E.g. sending a file of say 5000 pages with check points after every 500 pages
13-08-2024 PIM, Udupi 29
Introduction to Computer Networks
• Presentation layer:
• Concerned with syntax and semantics of the information being exchanged
between two systems.
• Main functions of this layer include translation, encryption and compression.
• Translation:
• It is known that different machines work with different types of data encoding
formats.
• So, presentation layer in sender side converts the message from sender dependent
format to a common format.
• On the other hand, presentation layer converts this back to receiver dependent
format.

13-08-2024 PIM, Udupi 30


Introduction to Computer Networks
• Encryption:
• In order to protect the privacy of the data, at the sending side original data will be
transformed to another form and this modified data is sent across network.
• in the receiving end, decryption is done which is a reverse operation of encryption.
• Data compression:
• Used to reduce the number of bits in the information
• Becomes useful in transmitting messages such as images audio n video etc.

13-08-2024 PIM, Udupi 31


Introduction to Computer Networks
• Application layer:
• Enables the user (human/software) to access the network.
• Provides user interfaces and supports for services like e-mail, file transfer, remote
file access, shared database management an other distributed information services.

13-08-2024 PIM, Udupi 32


Introduction to Computer Networks
• Specific services provided:
• Network virtual terminal:
• Software version of a physical terminal
• Allows user to log on to a remote system
• File transfer, access and management
• Allows to access files from a remote host, retrieve files from a remote host to local
system, and also to manage files located in remote host locally.
• Mail services:
• Provides platform for e-mail forwarding and storage.
• Directory Services:
• This provides distributed database sources and access for global information about
various objects and services.
13-08-2024 PIM, Udupi 33
Introduction to Computer Networks
• Let’s look at it with an Example:
• Mr. A sends an e-mail to his friend Mr. B.
• Step 1: Mr. A interacts with e-mail application like Gmail, outlook, etc. Writes his
email to send. (Layer 7: Application layer)
• Step 2: Mail application prepares for data transmission like encrypting data and
formatting it for transmission. (Layer 6: Presentation Layer)
• Step 3: There is a connection established between the sender and receiver on the
internet. (Layer 5: Session Layer)
• Step 4: Email data is broken into smaller segments. It adds sequence number and
error-checking information to maintain the reliability of the information. (Layer 4:
Transport Layer)
13-08-2024 PIM, Udupi 34
Introduction to Computer Networks
• Step 5: Addressing of packets is done in order to find the best route for transfer.
(Layer 3: Network Layer)
• Step 6: Data packets are encapsulated into frames, then MAC address is added for
local devices. (Layer 2: Data Link Layer)
• Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals over
a physical network medium like Ethernet cable or Wi-Fi.

• After the email reaches the receiver i.e. Mr. B, the process will reverse and decrypt
the e-mail content. At last, the email will be shown on Mr. B’s email client.

13-08-2024 PIM, Udupi 35


Introduction to Computer Networks
• Principles of Protocol Layering
• First Principle
• If we want bidirectional communication, we need to make each layer be able to
perform two opposite tasks, one in each direction.
• E.g.: 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.
• Second Principle
• Two objects under each layer at both sites should be identical.
• E.g.: The object under layer 3 at both sites should be a plaintext letter.

13-08-2024 PIM, Udupi 36


Introduction to Computer Networks
• TCP/IP PROTOCOL SUITE
• The TCP/IP (Transmission Control Protocol/Internet Protocol) 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.
• 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.
• Both configurations are shown in the figure
13-08-2024 PIM, Udupi 37
Introduction to Computer Networks

13-08-2024 PIM, Udupi 38


Introduction to Computer Networks
• Layers in the TCP/IP Protocol Suite
• To better understand the duties of each layer, we need to think about the logical
connections between layers. Figure below shows logical connections in simple
internet.

13-08-2024 PIM, Udupi 39


Introduction to Computer Networks
• As seen in the figure, 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.
• 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

• Figure below shows the second principle discussed previously for protocol
layering.
• We show the identical objects below each layer related to each device.

13-08-2024 PIM, Udupi 40


Introduction to Computer Networks

13-08-2024 PIM, Udupi 41


Introduction to Computer Networks
• 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

• Description of Each Layer:


• Physical Layer
• W.k.t. 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.
13-08-2024 PIM, Udupi 42
Introduction to Computer Networks
• Two devices are connected by a transmission medium (cable or air).
• We know that the transmission medium does not carry bits; it carries electrical or
optical signals.
• 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
• 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
13-08-2024 PIM, Udupi 43
Introduction to Computer Networks
• 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, a wireless LAN, a wired WAN, or a wireless WAN.
• We can also have different protocols used with any link type.
• In each case, the data-link layer is responsible for moving the packet through the
link.
• TCP/IP does not define any specific protocol for the data-link layer.
• It supports all the standard and proprietary protocols.
• The data-link layer takes a datagram and encapsulates it in a packet called a frame.

13-08-2024 PIM, Udupi 44


Introduction to Computer Networks
• 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.
• Since there can be several routers from the source to the destination, 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.

13-08-2024 PIM, Udupi 45


Introduction to Computer Networks
• IP defines the format and the structure of addresses used in this layer.
• 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
• IP is a connectionless protocol that provides no flow control, no error control, and
no congestion control services.
• i.e. if any of theses services is required for an application, the application should
relay 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.
13-08-2024 PIM, Udupi 46
Introduction to Computer Networks
• The network layer has some supporting protocols that help IP in its delivery and
routing tasks.
• 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.
• 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.

13-08-2024 PIM, Udupi 47


Introduction to Computer Networks
• Transport Layer
• The logical connection at the transport layer is 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

13-08-2024 PIM, Udupi 48


Introduction to Computer Networks
• There are more than one protocol in the transport layer, which means that each
application program can use the protocol that best matches its requirement.
• The main protocol, 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 source data rate with the destination data rate 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.
13-08-2024 PIM, Udupi 49
Introduction to Computer Networks
• 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.
• UDP is a simple protocol that does not provide flow, error, or congestion control.
• UDP is preferred for 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

13-08-2024 PIM, Udupi 50


Introduction to Computer Networks
• Application Layer
• The two application layers exchange messages between each other as though there
were a bridge between the two layers.
• However, the communication happens 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.
13-08-2024 PIM, Udupi 51
Introduction to Computer Networks
• The Hypertext Transfer Protocol (HTTP) is a the protocol used to access the 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 remote accessing
• 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

13-08-2024 PIM, Udupi 52


Introduction to Computer Networks
• Encapsulation and Decapsulation
• Figure below shows this concept for the small internet seen previously

13-08-2024 PIM, Udupi 53


Introduction to Computer Networks
• We have not shown the layers for the link-layer switches because no
encapsulation/decapsulation occurs in this device.
• we see the encapsulation in the source host, decapsulation in the destination host,
and encapsulation and decapsulation in the router.
• 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.
• 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.

13-08-2024 PIM, Udupi 54


Introduction to Computer Networks
• It adds the transport layer header to the payload, (the identifiers of the source and
destination application programs that want to communicate + 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.
13-08-2024 PIM, Udupi 55
Introduction to Computer Networks
• 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

13-08-2024 PIM, Udupi 56


Introduction to Computer Networks
• Decapsulation and Encapsulation at 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 will 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.
13-08-2024 PIM, Udupi 57
Introduction to Computer Networks
• 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
• decapsulates the packet received
• removes the payload, and
• delivers the payload to the next-higher layer protocol until the message reaches the
application layer.
• Note that decapsulation in the host involves error checking too.

13-08-2024 PIM, Udupi 58


Introduction to Computer Networks
• Addressing:
• Any communication that involves two parties needs two addresses:
• source address and
• destination address.
• Since we have five layers it looks as if we need five pairs of addresses, one pair
per layer
• But we 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.
• The addressing at each layer is shown in the figure

13-08-2024 PIM, Udupi 59


Introduction to Computer Networks

13-08-2024 PIM, Udupi 60


Introduction to Computer Networks
• From the figure we can see that, 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 use names to define the site that provides services,
such as [Link], or the e-mail address, such as somebody@[Link].
• 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.

13-08-2024 PIM, Udupi 61


Introduction to Computer Networks
• 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).

13-08-2024 PIM, Udupi 62


Introduction to Computer Networks
• Network-Layer Services:
• Let us discuss network-layer services that are expected from a network-layer
protocol
• Packetizing:
• The primary service offered by the network layer is packetizing -encapsulating the
payload in a network-layer packet at the source and decapsulating the payload
from the network-layer packet at the destination.
• In simple words, the network layer’s duty is to carry a payload from the source to
the destination without changing it or using it.

13-08-2024 PIM, Udupi 63


Introduction to Computer Networks
• The source host receives the payload from an upper-layer protocol, adds a header
that contains the source and destination addresses and some other information that
is required by the network-layer protocol and delivers the packet to the data-link
layer.
• The source is not allowed to change the content of the payload unless it is too
large for delivery and needs to be fragmented
• The destination host receives the network-layer packet from its data-link layer,
decapsulates the packet, and delivers the payload to the corresponding upper-layer
protocol.
• If the packet is fragmented at the source or at routers along the path, the network
layer needs to wait until all fragments arrive, reassembling them, and delivering
them to the upper-layer protocol
13-08-2024 PIM, Udupi 64
Introduction to Computer Networks
• Routing
• The network layer is responsible for routing the packet from its source to the destination.
• A physical network is a combination of networks (LANs and WANs) and routers that
connect them.
• This means that there is more than one route from the source to the destination.
• The network layer is responsible for finding the best one among these possible routes.
• The network layer needs to have some specific strategies for defining the best route.
• This is done by running some routing protocols to help the routers coordinate their
knowledge about the neighborhood and to come up with consistent tables to be used
when a packet arrives.
• The routing protocols should be run before any communication occurs

13-08-2024 PIM, Udupi 65


Introduction to Computer Networks
• Forwarding
• If routing is applying strategies and running some routing protocols to create the
decision-making tables for each router, forwarding can be defined as the action
applied by each router when a packet arrives at one of its interfaces.
• The decision-making table a router normally uses for applying this action is
sometimes called the forwarding table and sometimes the routing table.
• When a router receives a packet from one of its attached networks, it needs to
forward the packet to another attached network (in unicast routing) or to some
attached networks (in multicast routing).
• To make this decision, the router uses a piece of information in the packet header,
which can be the destination address or a label, to find the corresponding output
interface number in the forwarding table.
13-08-2024 PIM, Udupi 66
Introduction to Computer Networks
• Figure below shows the idea of the forwarding process in a router

13-08-2024 PIM, Udupi 67


Introduction to Computer Networks
• Error Control
• We have seen that, error control mechanisms are implemented in the transport
layer and also in the data-link layer.
• Similarly error control also could have been implemented in the network layer
• The designers of the network layer in the Internet ignored this issue.
• The reason for this decision is that the packet in the network layer may be
fragmented at each router, which makes error checking at this layer inefficient.
• But the designers of the network layer have added a checksum field to the
datagram to control any corruption in the header, but not the whole datagram.
• This checksum may prevent any changes or corruptions in the header of the
datagram between two hops and from end to end.
13-08-2024 PIM, Udupi 68
Introduction to Computer Networks
• Flow Control
• W.k.t. Flow control regulates the amount of data a source can send without
overwhelming the receiver.
• If the upper layer at the source produces data faster than the upper
• layer at the destination computer can consume it, the receiver will be
overwhelmed with data.
• To control the flow of data, the receiver needs to send some feedback to the sender
to inform the latter that it is overwhelmed with data.
• The network layer in the Internet, however, does not directly provide any flow
control.
• The datagrams are sent by the sender when they are ready, without checking the
readiness of the receiver
13-08-2024 PIM, Udupi 69
Introduction to Computer Networks
• Reasons for the lack of flow control in the network layer
1. Since there is no error control in this layer, the job of the network layer at the
receiver is so simple that it may rarely be overloaded.
2. The upper layers that use the service of the network layer can implement buffers
to receive data from the network layer as they are ready and do not have to
consume the data as fast as it is received.
3. Flow control is provided for most of the upper-layer protocols that use the
services of the network layer, so another level of flow control makes the
network layer more complicated and the whole system less efficient.

13-08-2024 PIM, Udupi 70


Introduction to Computer Networks
• Congestion Control
• Congestion in the network layer is a situation in which too many datagrams are
present in an area of the Internet.
• Congestion may occur if the number of datagrams sent by source computers is
beyond the capacity of the network or routers.
• In this situation, some routers may drop some of the datagrams.
• If more datagrams are dropped, the situation may become worse.
• Because of the error control mechanism at the upper layers, the sender may send
duplicates of the lost packets.
• If the congestion continues, sometimes a situation may reach a point where the
system collapses and no datagrams are delivered.
13-08-2024 PIM, Udupi 71
Introduction to Computer Networks
• Security
• Security was not a concern when the Internet was originally designed because it
was used by a small number of users at universities for research activities; other
people had no access to the Internet.
• The network layer was designed with no security provision.

• Today, security is a big concern.


• To provide security for a connectionless network layer, we need to have another
virtual level that changes the connectionless service to a connection-oriented
service.
• This virtual layer, called IPSec
13-08-2024 PIM, Udupi 72
Introduction to Computer Networks
• Networking and Internetworking Technology Devices,
• Repeaters, Bridges, Routers, Gateways and Other Devices

• What is Internetworking?
• Internetworking is defined as a way to connect multiple forms of computer
networks.
• Computer internetworking occurs when several computer LANs, WANs, or parts
of a computer network are linked together using devices such as routers and
coordinated through a logical addressing system utilizing a protocol such as IP
(Internet Protocol).

13-08-2024 PIM, Udupi 73


Introduction to Computer Networks
• What is Internetworking in Computer Network?
• Internetworking, is the practice of connecting different computer networks or
network segments to create a larger and more extensive network infrastructure.
• Various networking technologies, protocols, and devices, including routers and
switches, are used to enable communication and data exchange between these
distinct networks.
• The term internetworking is made up of two words, inter and networking, which
refers to a link between two or more separate nodes/segments.
• Internetworking aims to provide seamless network environment for efficient data
transfer across several interconnected networks, regardless of their underlying
technologies or architectures.
13-08-2024 PIM, Udupi 74
Introduction to Computer Networks
• Types of Internetworking
• The three types of internetworking are as follows:

13-08-2024 PIM, Udupi 75


Introduction to Computer Networks
• Extranet
• An extranet refers to a controlled and secure extension of an organization's
internal network that allows authorized external parties, such as clients,
partners, suppliers, or customers, to access certain resources, services, and
information.
• It is a network that is restricted to one organization or entity but also has restricted
links to the networks of one or more other organizations or entities at times, but
not always.
• It is the most basic level of Internetworking, usually imposed in an extremely
private place.
• An extranet cannot include a single local area network and must include at least
one reference to an external network.
13-08-2024 PIM, Udupi 76
Introduction to Computer Networks
• Intranet
• An intranet is a private and internal network within a company that uses internet
protocols and technology to allow employees or members to share information,
resources, and services.
• Intranets are used for internal communication, document sharing, project
collaboration, and access to internal tools and applications.
• It operates under the jurisdiction of a single administrative entity.
• This entity restricts external access to the network, permitting entry exclusively to
designated users.
• Commonly, this network functions as the internal infrastructure of a corporation or
another business entity.
13-08-2024 PIM, Udupi 77
Introduction to Computer Networks
• Internet
• The internet, (interconnected network) is a global network of interconnected
computers and computer networks that communicate with one another via
standardized protocols.
• It is an immense network that allows people, organizations, and computers all over
the world to share information, resources, and services.
• It consists of a worldwide interconnection of governmental, academic, public, and
personal networks and also home to the World Wide Web (WWW) and referred
to as the 'Internet'
• Participants on the internet, as well as their service providers, use IP addresses
obtained from address registries that control assignments.
13-08-2024 PIM, Udupi 78
Introduction to Computer Networks
• Network Devices:
• Network devices, also known as networking hardware, are physical devices that
allow hardware on a computer network to communicate and interact with one
another.
• E.g: Repeater, Hub, Bridge, Switch, Routers, Gateway, Brouter, and NIC, etc.
• Repeater –
• A networking device that is used to amplify and generate the incoming signal.
• A repeater operates at the physical layer.
• Its job is to amplifies (i.e., regenerates) the signal over the same network before
the signal becomes too weak or corrupted to extend the length to which the signal
can be transmitted over the same network.
13-08-2024 PIM, Udupi 79
Introduction to Computer Networks
• The main aim of using a repeater is to increase the networking distance by
increasing the strength and quality of signals.
• The LANs and WANs use repeaters.
• Use of repeaters helps to reduce error, and loss of data and provides with delivery
of data at specified locations only.
• The major advantage of using a repeater is that it provides with transfer of data
with more security and over a long distance.

13-08-2024 PIM, Udupi 80


Introduction to Computer Networks
• Types of Repeaters
• Repeaters are divided into three types.
• According to the type of Signals
• Analog Repeater: Analog repeaters are used to amplify only the analog signals.
• Analog repeaters receives the analog signal, amplifies it and then regenerates it as the
output.
• Analog repeaters were mostly used in the older network technologies where analog
signal was used.
• Digital Repeater: Digital repeaters are the type of repeaters that does not amplify digital
signal but regenerates it directly.
• Digital repeaters are mostly used in the modern technologies where digital signal is
being used.
• Digital repeaters are also capable to reconstruct a distorted signal.
13-08-2024 PIM, Udupi 81
Introduction to Computer Networks
• According to the type of Connected Network
• Wired Repeaters:
• Wired repeaters are used in wired LANs.
• Wired repeater receives the signal and repeats it. This helps to extend the network
travel of data without loosing it’s strength.
• Wireless Repeaters:
• Wireless repeaters are used in wireless LANs and Cellular networks.
• A router connected in the network sends wireless signal to the repeater.
• Once received, repeater broadcast the signal to increase the coverage of network.

13-08-2024 PIM, Udupi 82


Introduction to Computer Networks
• According to the Domain of LAN Networks
• Based on the location of the Repeater in network they are connected, Repeaters
are classified as below:
• Local Repeaters: Local Repeaters are used in Local Area Networks where the
network is very small.
• The distance between the devices connected in network is very small.
• Remote Repeaters: Remote Repeaters are used in Local Area Networks where
network is very large.
• The distance between the devices connected in network is more.

13-08-2024 PIM, Udupi 83


Introduction to Computer Networks
• Based on Technologies
• Microwave Repeater:. The use of microwave repeater depends upon the distance
between two devices. In microwave repeaters high power transmitters and sensitive
receivers are used.
• Optical Repeater: Used for the communication of through OFC
• Optical repeaters can amplify and reshape the operations before they are being
transmitted.
• The optical repeater grabs all the signals from optical fiber cable into electronic form.
• Radio Repeater: Transmits all the received data into radio signals.
• Radio repeaters has two different ports namely radio receiver and radio transmitter.
• Radio transmitter is used to retransmit the data that is received from repeater and radio
receiver collects all the incoming data in form of signals.
13-08-2024 PIM, Udupi 84
Introduction to Computer Networks
• CONNECTING DEVICES
• Connecting devices are used to connect hosts together to make a network or to
connect networks together to make an internet.
• Connecting devices can operate in different layers of the Internet model.
• We discuss three kinds of connecting devices:
• Hubs
• Link-layer switches
• Routers.
• Hubs operate in the first layer of the Internet model.
• Link-layer switches operate in the first two layers.
• Routers operate in the first three layers.
13-08-2024 PIM, Udupi 85
Introduction to Computer Networks

• Hubs
• A hub operates only in the physical layer.
• Signals that carry information within a network can travel a fixed distance before
attenuation occurs.
• A repeater receives a signal and regenerates and retimes the original bit pattern.
• The repeater then sends the refreshed signal.
• When Ethernet LANs were using bus topology, a repeater was used to connect two
segments of a LAN to overcome the length restriction of the coaxial cable.
13-08-2024 PIM, Udupi 86
Introduction to Computer Networks
• Today, however, Ethernet LANs use star topology. In a star topology, a repeater is
a multiport device, often called a hub, that can be used to serve as the connecting
point and at the same time function as a repeater.
• Figure below shows that when a packet from station A to station B arrives at the
hub, the signal representing the frame is regenerated to remove any possible
corrupting noise

13-08-2024 PIM, Udupi 87


Introduction to Computer Networks
• The hub forwards the packet from all outgoing ports except the one from which
the signal was received.
• In other words, the frame is broadcasted.
• All stations in the LAN receive the frame, but only station B keeps it.
• The rest of the stations discard it.
• Figure also shows the role of a repeater or a hub in a switched LAN.
• We can notice that a hub does not have a filtering capability – it does not have the
intelligence to find from which port the frame should be sent out.
• A hub or a repeater is a physical-layer device.
• They do not have a link-layer address and they do not check the link-layer address
of the received frame.
• They just regenerate the corrupted bits and send them out from every port.
13-08-2024 PIM, Udupi 88
Introduction to Computer Networks
• Link-Layer Switches
• A link-layer switch (or switch) operates in both the physical and the data-link
layers.
• As a physical-layer device, it regenerates the signal it receives.
• As a link-layer device, the link-layer switch can check the MAC addresses (source
and destination) contained in the frame.
• Filtering:
• A link-layer switch has filtering capability.
• It can check the destination address of a frame and can decide from which
outgoing port the frame should be sent.

13-08-2024 PIM, Udupi 89


Introduction to Computer Networks
• Let us see it through an example.
• Assume that we have a LAN with four stations that are connected to a link-layer
switch.

• If a frame destined for station 71:2B:13:45:61:42 arrives at port 1, the link-layer


switch consults its table to find the departing port.
13-08-2024 PIM, Udupi 90
Introduction to Computer Networks
• According to its table, frames for 71:2B:13:45:61:42 should be sent out only through
port 2; therefore, there is no need for forwarding the frame through other ports.

• Transparent Switches
• A transparent switch is a switch in which the stations are completely unaware of the
switch’s existence.
• If a switch is added or deleted from the system, reconfiguration of the stations is
unnecessary.
• According to the IEEE 802.1d specification, a system equipped with transparent
switches must meet three criteria:
• Frames must be forwarded from one station to another.
• The forwarding table is automatically made by learning frame movements in the
network.
• Loops in the system must be prevented.
13-08-2024 PIM, Udupi 91
Introduction to Computer Networks
• Forwarding
• A transparent switch must correctly forward the frames.
• Learning: The earliest switches had switching tables that were static.
• The system administrator would manually enter each table entry during switch
setup.
• Although the process was simple, it was not practical.
• If a station was added or deleted, the table had to be modified manually.
• The same was true if a station’s MAC address changed.
• A better solution to this is a dynamic table that maps addresses to ports (interfaces)
automatically.

13-08-2024 PIM, Udupi 92


Introduction to Computer Networks
• To make a table dynamic, switch needs to learn from the frames’ movements.
• To do this, the switch inspects both the destination and the source addresses in
each frame that passes through the switch.
• The destination address is used for the forwarding decision (table lookup); the
source address is used for adding entries to the table and for updating purposes.
Let us elaborate on this process using an example

13-08-2024 PIM, Udupi 93


Introduction to Computer Networks

13-08-2024 PIM, Udupi 94


Introduction to Computer Networks
• When station A sends a frame to station D, the switch does not have an entry for
either D or A.
• The frame goes out from all three ports.
• However, by looking at the source address, the switch learns that station A must be
connected to port 1.
• This means that frames destined for A, in the future, must be sent out through port
1.
• The switch adds this entry to its table.
• The table has its first entry now.

13-08-2024 PIM, Udupi 95


Introduction to Computer Networks
• When station D sends a frame to station B, the switch has no entry for B, so it
floods the network again.
• However, it adds one more entry to the table related to station D.

• The learning process continues until the table has information about every port.
• However, note that the learning process may take a long time.
• For example, if a station does not send out a frame (a rare situation), the station
will never have an entry in the table.
13-08-2024 PIM, Udupi 96
Introduction to Computer Networks
• Loop Problem
• Transparent switches work fine as long as there are no redundant switches in the
system.
• Systems administrators, however, like to have redundant switches (more than one
switch between a pair of LANs) to make the system more reliable.
• If a switch fails, another switch takes over until the failed one is repaired or
replaced.
• Redundancy can create loops in the system, which is very undesirable.
• Loops can be created only when two or more broadcasting LANs (those using
hubs, for example) are connected by more than one switch

13-08-2024 PIM, Udupi 97


Introduction to Computer Networks
• Example below shows how a loop created in a system with two LANs connected
by two switches

• Station A sends a frame to station D.


• The tables of both switches are empty.

• Both forward the frame and update their tables based on the source address A.
• Now there are two copies of the frame on LAN 2.

13-08-2024 PIM, Udupi 98


Introduction to Computer Networks
• The copy sent out by the left switch is
received by the right switch, which
does not have any information about the
destination address D; it forwards the
frame.
• The copy sent out by the right switch is
received by the left switch and is sent
out for lack of information about D.
• The tables of both switches are updated,
but still there is no information for
destination D.
13-08-2024 PIM, Udupi 99
Introduction to Computer Networks
• Now there are two copies of the frame on LAN 1.
• Step 2 is repeated, and both copies are sent to LAN2.

13-08-2024 PIM, Udupi 100


Introduction to Computer Networks
• The process continues on and on. Note that switches are also repeaters and
regenerate frames.
• So in each iteration, there are newly generated fresh copies of the frames.
• Spanning Tree Algorithm
• To solve the looping problem, the IEEE specification requires that switches use
the spanning tree algorithm to create a loopless topology.
• In graph theory, a spanning tree is a graph in which there is no loop.
• In a switched LAN, this means creating a topology in which each LAN can be
reached from any other LAN through one path only (no loop).
• We cannot change the physical topology of the system because of physical
connections between cables and switches, but we can create a logical topology that
overlays the physical one.
13-08-2024 PIM, Udupi 101
Introduction to Computer Networks
• Figure below shows a system with four LANs and five switches.

• This physical system and its representation in graph theory can be depicted as
shown in the following figure, wherein we represent both LANs and switches as
nodes.
• The connecting arcs show the connection of a LAN to a switch and vice versa.
13-08-2024 PIM, Udupi 102
Introduction to Computer Networks

• To find the spanning tree, we need to assign a cost (metric) to each arc.
• The interpretation of the cost is left up to the systems administrator.
• We have chosen the minimum hops.
• Note that the hop count is normally 1 from a switch to the LAN and 0 in the reverse
direction.
13-08-2024 PIM, Udupi 103
Introduction to Computer Networks
• Advantages of Switches
• Collision Elimination
• Link-layer switch eliminates the collision.
• This means increasing the average bandwidth available to a host in the network.
• In a switched LAN, there is no need for carrier sensing and collision detection; each host
can transmit at any time.
• Connecting Heterogonous Devices
• A link-layer switch can connect devices that use different protocols at the physical layer
(data rates) and different transmission media.
• As long as the format of the frame at the data-link layer does not change, a switch can
receive a frame from a device that uses twisted-pair cable and sends data at 10 Mbps and
deliver the frame to another device that uses fiber-optic cable and can receive data at 100
Mbps.
13-08-2024 PIM, Udupi 104
Introduction to Computer Networks
• Routers
• A router is a three-layer device
• It operates in the physical, data-link, and network layers.
• As a physical-layer device, it regenerates the signal it receives.
• As a link-layer device, the router checks the physical addresses (source and
destination) contained in the packet.
• As a network-layer device, a router checks the network-layer addresses.
• A router is an internetworking device -it connects independent networks to form
an internetwork.

13-08-2024 PIM, Udupi 105


Introduction to Computer Networks
• According to this definition, two networks connected by a router become an
internetwork or an internet.
• There are three major differences between a router and a repeater or a switch.
1. A router has a physical and logical (IP) address for each of its interfaces.
2. A router acts only on those packets in which the link-layer destination address
matches the address of the interface at which the packet arrives.
3. A router changes the link-layer address of the packet (both source and
destination) when it forwards the packet.

13-08-2024 PIM, Udupi 106


Introduction to Computer Networks
• How Does Router Work?
• A router determines a packet’s future path by examining the destination IP address of the
header and comparing it to the routing database.
• The list of routing tables tells how to send the data to a specific network location.
• They use a set of rules to determine the best way to transmit the data to the specified IP
address.
• Most routers include many ports that can connect a variety of devices to the internet
simultaneously.
• Routing tables are used to decide where to deliver data and to know where the traffic is
coming from
• A routing table primarily specifies the router’s default path.
• As a result, it might not determine the optimum path to forward the data for a particular
packet.
13-08-2024 PIM, Udupi 107
Introduction to Computer Networks
• E.g.: the office router directs all networks to its internet service provider through a
single default channel.
• Varieties of routing table: Static and dynamic tables
• The dynamic routing tables are automatically updated by dynamic routers based
on network activity, whereas the static routing tables are configured manually.
• Types of Routers
• Wireless Router: Wireless routers are used to offer Wi-Fi connectivity to laptops,
smartphones, and other devices
• Wireless routers are capable of generating a wireless signal in your home or office,
and it allows the computers to connect with routers within a range, and use the
internet.
13-08-2024 PIM, Udupi 108
Introduction to Computer Networks
• Brouter: Combination of the bridge and a router.
• It allows transferring the data between networks like a bridge.
• And like a router, it can also route the data within a network to the individual
systems.
• Thus, it combines these two functions of bridge and router by routing some
incoming data to the correct systems while transferring the other data to another
network.
• Core router: This can route the data within a network, but it is not able to route the
data between the networks.
• It is used by internet service providers (ISPs), and it also provides various types of
fast and powerful data communication interfaces.
13-08-2024 PIM, Udupi 109
Introduction to Computer Networks
• Edge router: An edge router is placed at the boundary of a network.
• It allows an internal network to connect with the external networks.
• It is also called as an access router.
• It uses an External BGP (Border Gateway Protocol) to provides connectivity with
remote networks over the internet.
• Broadband routers: Mainly used to provide high-speed internet access to
computers.
• It is needed when you connect to the internet through phone and use voice over IP
technology (VOIP).

13-08-2024 PIM, Udupi 110


Introduction to Computer Networks

13-08-2024 PIM, Udupi 111


Introduction to Computer Networks
• Architecture of Router
• A router consists of the following components: Input Port, Switching Fabric,
Output Port, Routing Processor

13-08-2024 PIM, Udupi 112


Introduction to Computer Networks
• Input Port: This is the interface by which packets are admitted into the router
• It manages the connection that comes in from another device.
• It checks the information's format and makes it work with what's on the other side.
• The input port also checks out where the information should go next.
• It makes sure the data goes to the right place inside the router.

13-08-2024 PIM, Udupi 113


Introduction to Computer Networks
• Output Port
• It keeps the packets that are ready to go out and sends them through the right
connection.
• It does this by handling things like how the data should be sent on the wire.
• Just like the input port, it also works with the data's format and makes sure it
matches what's expected on the other side.
• The output port is responsible to send data out of the router, making sure it's ready
to travel on the right path.

13-08-2024 PIM, Udupi 114


Introduction to Computer Networks
• Switching Fabric: This is the heart of the Router
• It connects the input ports with the output ports.
• The switching fabric can be implemented in the following ways
• Switching via memory:
• In this, we have a processor which copies the packet from input ports and sends it
to the appropriate output port.
• It works as a traditional CPU with input and output ports acting as input and
output devices.

13-08-2024 PIM, Udupi 115


Introduction to Computer Networks
• Switching via bus:
• In this, we use a bus that connects all the input ports to all the output ports.
• On receiving a packet and determining which output port it must be delivered to,
the input port puts a particular token on the packet and transfers it to the bus.
• All output ports can see the packets but they will be delivered to the output port
whose token has been put in, the token is then removed by that output port and the
packet is forwarded

13-08-2024 PIM, Udupi 116


Introduction to Computer Networks
• Switching via interconnection network:
• Here instead of a single bus we use a 2N bus to connect n input ports to n output
ports.

• Routing Processor: It executes the routing protocols, and it works like a


traditional CPU.
• It employs various routing algorithms to prepare the forwarding table, which is
looked up to determine the route and the output port

13-08-2024 PIM, Udupi 117


Introduction to Computer Networks
• Gateways:
• A gateway is a network device that connects two networks that use different
transmission protocols.
• It works as the entry-exit point for a network because all traffic that passes across
the networks must pass through the gateway.
• The gateway monitors and controls all the incoming and outgoing traffic of the
network.
• Suppose there are two different networks and they want to communicate with each
other, they need to set up a path between them.
• Now that path will be made between gateways of those different networks.

13-08-2024 PIM, Udupi 118


Introduction to Computer Networks
• Gateways are known as protocol converters because they help to convert protocol
supported by traffic of the different networks into that are supported by this
network.
• Because of that, it makes smooth communication between two different networks.
• How does Gateway Work?
• Step 1: It gets data from the network
• Step 2: It intercepts and analyzes the received data.
• Step 3: It routes the data to the destination address.
• Step 4: It converts the received data to make that compatible with the receiver
network.
• Step 5: It sends the final data inside the network.
13-08-2024 PIM, Udupi 119
Introduction to Computer Networks

13-08-2024 PIM, Udupi 120


Introduction to Computer Networks
• Functionality of Gateways
• LAN to WAN connections- It can connect a group of personal computers i.e.
LAN(Local Area Network) to the Internet i.e. WAN(Wide Area Network).
• Controls incoming and outgoing data– It is located on the boundary of any
network, so it controls incoming and outgoing data packets from/to any network.
• Works as a Protocol Converter- It makes sure that the data packet from another
network is compatible with this network. So it converts their protocols into
supported protocols before it enters into the network.
• Information Collector- It collects data from different sections of the network to
make a better diagnosis of any data packets. In this process, it collects
information.
13-08-2024 PIM, Udupi 121
Introduction to Computer Networks
• Routing of data packets- It is responsible for routing data packets to different
networks because it knows about the routing path of different networks that are in
communication with its network.
• Different Types of Gateways
• Gateways can be classified into multiple categories on different bases
• On the Basis of the Direction of the Flow of Data
• Unidirectional Gateways: Unidirectional Gateway allows the flow of data in
only one direction.
• It means the changes that occurred in the source can be copied to the destination
but the changes that occurred in the destination can’t be copied to the source.

13-08-2024 PIM, Udupi 122


Introduction to Computer Networks
• Bidirectional Gateways:
• Bidirectional Gateways allow the flow of data in both directions.
• It means changes that occurred in the source can be copied to the destination and
changes that occurred in the destination can be copied to the source.

• Based on Functionality
• Email Security Gateway: It scans email for any type of malicious content before
allowing it to enter the network.
• Cloud Storage Gateway: It helps in data transfer between the cloud and the
nodes of the network.
• It converts different API requests into that form which can be understandable by
cloud platforms.
13-08-2024 PIM, Udupi 123
Introduction to Computer Networks
• Network Gateway: This is the most popular type of gateway, it acts as an
interface between two different networks using different protocols.
• Internet-To-Orbit Gateway (I2O): Project HERMES and Global Educational
Network for Satellite Operations (GENSO) are two well-known I2O gateways that
connect devices on the Internet to satellites and spacecraft orbiting the earth.
• IoT Gateway: Before delivering sensor data to the cloud network, IoT gateways
integrate it from Internet of Things (IoT) devices in the field and translate it
between sensor protocols.
• They link user applications, cloud networks, and IoT devices.

13-08-2024 PIM, Udupi 124

You might also like