0% found this document useful (0 votes)
20 views146 pages

1.CN DC Unit 3

This document is a confidential educational resource for RMK Group of Educational Institutions, focusing on the syllabus and course structure for the Computer Networks course (22EC503). It outlines course objectives, prerequisites, detailed syllabus content, course outcomes, and a lecture plan for the network layer unit. The document also includes sections on network layer services, protocols, and various routing algorithms, emphasizing the importance of packet switching and addressing in computer networks.

Uploaded by

asatle231305.ec
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)
20 views146 pages

1.CN DC Unit 3

This document is a confidential educational resource for RMK Group of Educational Institutions, focusing on the syllabus and course structure for the Computer Networks course (22EC503). It outlines course objectives, prerequisites, detailed syllabus content, course outcomes, and a lecture plan for the network layer unit. The document also includes sections on network layer services, protocols, and various routing algorithms, emphasizing the importance of packet switching and addressing in computer networks.

Uploaded by

asatle231305.ec
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
You are on page 1/ 146

Please read this disclaimer before

proceeding:
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document through
email in error, please notify the system manager. This document contains proprietary
information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or
copy through e-mail. Please notify the sender immediately by e-mail if you have
received this document by mistake and delete this document from your system. If
you are not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this information is
strictly prohibited.
22EC503– Computer Networks

UNIT – 3
Network Layer

Department : Electronics and Communication Engineering


Batch/Year : 2022 Batch / III-ECE
Created by : Ms.Samuda Prathima/Assistant Professor/ECE
Ms.S.Priyadharshini/Assistant Professor/ECE
Date : 19.07.2024
Table of Contents
Table of Contents

Page
S.No Contents
No
1 Course Objectives 8

2 Pre Requisites (Course Names with Code) 10

3 Syllabus 12

4 Course Outcomes 14

5 CO - PO / PSO Mapping 16

6 Unit - III – Network Layer

6.1 Lecture Plan 18

6.2 Activity Based Learning 20

6.3 Lecture Notes 22

3.1 NETWORK LAYER SERVICES 23

3.1.1 PACKETIZING 24
3.1.2 ROUTING AND FORWARDING

3.1.3 OTHER SERVICES

3.2 PACKET SWITCHING 29

3.2.1 DATAGRAM APPROACH: CONNECTIONLESS SERVICE

3.2.2 VIRTUAL CIRCUIT APPROACH: CONNECTION ORIENTED SERVICE

3.3 NETWORK LAYER PROTOCOLS: IPv4 ADDRESSES 34

3.3.1 ADDRESS SPACE

3.3.2 CLASSFUL ADDRESSING

3.3.3 CLASSLESS ADDRESSING

3.3.4 DYNAMIC HOST CONFIGURATION PROTOCOL (DHCP)

3.3.5 NETWORK ADDRESS TRANSLATION


Table of Contents

S.No Contents Page No


3.4 INTERNET PROTOCOL 50
3.4.1 Datagram Approach
3.4.2 Fragmentation
3.4.3 Options
3.4.4 SECURITY OF Ipv4 DATAGRAM
3.5 ICMPv4 58
3.5.1 Messages
3.5.2 Debugging Tools
3.5.3 ICMP Checksum
3.6 ROUTING 63
3.6.1 General Idea
3.6.2 Internet As A Graph
3.6.3 Low Cost Routing And Trees
3.7 UNICAST ROUTING ALGORITHMS 66
3.7.1 Distance Vector Algorithms
3.7.2 Link State Algorithm
3.7.3 Path Vector Algorithm
3.8 UNICAST ROUTING PROTOCOLS 78
3.8.1 Internet Structure
3.8.2 Hierarchical Routing
3.8.3 Routing Information Protocol (RIP)
3.8.4 Open Shortest Path First Protocol (OSPF)
3.8.5 Border Gateway Protocol (BGP)
3.9 MULTICAST ROUTING 96
3.9.1 Concepts Of Unicast, Multicast, Broadcast
3.9.2 Applications Of Multicast
3.9.3 Optimal Routing Protocols
3.9.4 Multicast Routing Protocols
3.10 IPv6 ADDRESSING 112
3.10.1 Representation Of Ipv6
3.10.2 Address Space
3.10.3 Auto Configuration
3.10.4 Renumbering
Table of Contents

S.No Contents Page No


3.11 TRANSITION FROM IPv4 TO IPv6 120
7 Links for online Lecture Videos and Lecture PPTs 123
8 Assignments 125
9 Part- A AND B QUESTIONS (With K Level and CO) 127
10 Supportive Online Certification Courses 133
11 Real Time Applications 135
12 Content Beyond the Syllabus 137
13 Assessment Schedule 139
14 Text Books and Reference Books 141
15 Mini Project Ideas 143
1. Course Objectives
Course Objectives
The student should be made to:
• To study the fundamental concepts of computer networks and physical layer.
• To gain the knowledge of various protocols and techniques used in the data link
layer.
• To learn the services of network layer and network layer protocols.
• To describe different protocols used in the transport layer.
• To understand the application layer protocols
2. Pre Requisites (Course Names with Code)
Pre Requisites
S.No Course Course Name
Code
1 22EC101 DIGITAL PRINCIPLES SYSTEM DESIGN

2 VAC INTRODUCTION TO NETWORKS


3. Syllabus
SYLLABUS

22EC503 – COMPUTER NETWORKS


L T P C
3 0 0 3

UNIT I INTRODUCTION AND PHYSICAL LAYER 9


Data Communications – Network Types – Protocol Layering – Network
Models (OSI, TCP/IP) Networking Devices: Hubs, Bridges, Switches –
Performance Metrics – Transmission media - Guided media -Unguided
media- Switching-Circuit Switching - Packet Switching
UNIT II DATA LINK LAYER 9
Introduction – Link-Layer Addressing- Error Detection and Correction -
DLC Services – Data Link Layer Protocols – HDLC – PPP - Wired LANs:
Ethernet - Wireless LANs – Introduction – IEEE 802.11, Bluetooth
UNIT III NETWORK LAYER 9
Network Layer Services – Packet switching – Performance – IPV4
Addresses – Forwarding of IP Packets - Network Layer Protocols: IP,
ICMP v4 – Unicast Routing Algorithms – Protocols – Multicasting Basics –
IPV6 Addressing – IPV6 Protocol.
UNIT IV TRANSPORT LAYER 9
Introduction – Transport Layer Protocols – Services – Port Numbers –
User Datagram Protocol –Transmission Control Protocol – SCTP.
UNIT V APPLICATION LAYER 9
Application layer-WWW and HTTP – FTP – Email –Telnet –SSH – DNS –
SNMP

TOTAL: 45 PERIODS
4. Course Outcomes
Course Outcomes for
22EC503– Computer Networks

Highest
# Course Outcomes Cognitive
Level

C304.1 Describe the fundamental concepts of computer networks. K2

Explain the basics of Transmission Media and Switching


C304.2 K2
Techniques.

Demonstrate the various protocols and techniques used in the


C304.3 K3
data link layer.

C304.4 Learn the network layer services and network layer protocols K2

Discuss the various protocols used in the transport layer.


C304.5 K2

C304.6 Analyze the various application layer protocols. K4


5. CO - PO / PSO Mapping
Course Out Comes
CO – PO – PSO – Mapping

Outcomes
Program
Specific
Level of CO

Program Outcomes

K3 K4 K4 K5 K6 A3 A2 A3 A3 A3 A3 A2 K5 K5 K3
PO- PO- PO- PO- PO- PO- PO- PO- PO- PO- PO- PO- PSO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3

C304.1 K2 2 1 - - - - - - - - - - - - 2
C304.2 K2 2 1 - - - - - - - - - - - - 2
C304.3 K3 3 2 2 1 1 - - - - - - - - - 3
C304.4 K2 2 1 - - - - - - - - - - - - 2
C304.5 K2 2 1 1 1 - - - - - - - - - - 2
CO Avg
3 2 2 1 1 - - - - - - - - - 3
C304
Lecture Plan – Unit 3
Lecture Plan – Unit 3

UNIT 3–NETWORK LAYER

Reason for
Taxonomy

Deviation
Mapping

Delivery
Planned

Mode of
Periods

Actual
No. of

Level
Date

Date

CO
No

Topics
S

Network layer
1 services - Packet 1 31.08.24 CO3 K2
Switching

2 IPV4 Address 1 02.09.24 CO3 K2

Network Layer
3 1 03.09.24 CO3 K2
Protocols - IP

4 ICMP 1 04.09.24 CO3 K2

Interactive
5 Routing -Protocols 1 05.09.24 CO3 K2 Smart
Board,
chalk and
Building Network and talk
6 1 09.09.24 CO3 K2
its types

Multicast Routing and


7 1 10.09.24 CO3 K3
its basics

Overview of IPv6
8 1 11.09.24 CO3 K2
Addressing

Transition from IPv4


9 1 12.09.24 CO3 K3
to IPv6

Signature of Staff In charge Signature of HOD


Activity Based Learning
Activity Used: Hands on Practice
Activity Based Learning
Hands on Practice
Students are expected to perform the following task and explain the learnings in
document format.
1. Print the route to reach Google.com from your laptop and infer the response with
respect to number of hops and time delay from the packet
2. Print the routing table of your laptop in command prompt and infer the response
with respect to intradomain and interdomain routing
Lecture Notes
Unit 3 – NETWORK LAYER
NETWORK LAYER
SERVICES
3.1 NETWORK-LAYER SERVICES

FIG 3.1: Communication at the network layer


The Internet is an internetwork, a combination of LANs and WANs.
To better understand the role of the network layer (or the internetwork layer), we
need to think about the connecting devices (routers or switches) that connect the LANs
and WANs.
As the figure shows, the network layer is involved at the source host, destination host,
and all routers in the path (R2, R4, R5, and R7).
At the source host (Alice), the network layer accepts a packet from a transport layer,
encapsulates the packet in a datagram, and delivers the packet to the data-link layer.
At the destination host (Bob), the datagram is decapsulated, and the packet is
extracted and delivered to the corresponding transport layer.
Although the source and destination hosts are involved in all five layers of the TCP/IP
suite, the routers use three layers if they are routing packets only; however, they may
need the transport and application layers for control purposes.
A router in the path is normally shown with two data-link layers and two physical
layers, because it receives a packet from one network and delivers it to another network.
NETWORK-LAYER PROTOCOLS
Packetizing

Packetizing

The first duty of the network layer is definitely packetizing: encapsulating the
payload (data received from upper layer) in a network-layer packet at the source and
decapsulating the payload from the network-layer packet at the destination.

▪ The routers in the path are not allowed to decapsulate the packets they received unless
the packets need to be fragmented.

▪ The routers are not allowed to change source and destination addresses either.

▪ They just inspect the addresses for the purpose of forwarding the packet to the next
network on the path. However, if a packet is fragmented, the header needs to be copied
to all fragments and some changes are needed

Routing and Forwarding

The Routing and Forwarding are the important function of the Network Layer.

Routing:

In a network, there is more than one route from source host to reach the destination host.
The reponsibility of the network layer is to find the best route to reach the destination
among all possible routes.

The network layer needs to have some specific strategies for defining the best route. In the
Internet today, 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.

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.
NETWORK-LAYER PROTOCOLS

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.

Other Services

Error Control

▪ The designers of the network layer, have added a checksum field to the datagram
to control any corruption in the header, but not in the whole datagram.

▪ This checksum may prevent any changes or corruptions in the header of the
datagram.

▪ The network layer in the Internet does not directly provide error control, the
Internet uses an auxiliary protocol, ICMP, that provides some kind of error control
if the datagram is discarded or has some unknown information in the header.

Flow Control

▪ Flow control regulates the amount of data a source can send without
overwhelming the receiver.

▪ The network layer in the Internet, however, does not directly provide any flow
control.
NETWORK-LAYER PROTOCOLS

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 the
congestion continues, sometimes a situation may reach a point where the system
collapses and no datagrams are delivered.

Quality of Service

The Internet has thrived by providing better quality of service to support these
applications. However, to keep the network layer untouched, these provisions are
mostly implemented in the upper layer.

Security

Another issue related to communication at the network layer is security.

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

3.2 PACKET SWITCHING

In data communication switching techniques are divided into two broad categories,
circuit switching and packet switching, only packet switching is used at the network
layer because the unit of data at this layer is a packet.

A packet-switched network can use two different approaches to route the packets:
the datagram approach and the virtual circuit approach.

3.2.1 Datagram Approach: Connectionless Service

A connectionless service is the one in which the network-layer protocol treats each
packet independently, with each packet having no relationship to any other packet.

The idea was that the network layer is only responsible for delivery of packets from
the source to the destination. In this approach, the packets in a message may or
may not travel the same path to their destination.

Fig 3.2 : A connectionless packet-switched network


PACKET SWITCHING

▪ When the network layer provides a connectionless service, each packet traveling
in the Internet is an independent entity; there is no relationship between packets
belonging to the same message.
▪ The switches in this type of network are called routers.
▪ Each packet is routed based on the information contained in its header: source
and destination addresses.
▪ The destination address defines where it should go; the source address defines
where it comes from.
▪ The router in this case routes the packet based only on the destination address.
▪ The source address may be used to send an error message to the source if the
packet is discarded.

Figure 3.3 shows the forwarding process in a router in this case. We have used
symbolic addresses such as A and B.

Fig 3.3 : Forwarding process in a router when used in a connectionless network


PACKET SWITCHING

3.2.2 Virtual-Circuit Approach: Connection-Oriented Service

In a connection-oriented service (also called virtual-circuit approach), there is a


relationship between all packets belonging to a message.

Before all datagrams in a message can be sent, a virtual connection should be set
up to define the path for the datagrams.

After connection setup, the datagrams can all follow the same path.

▪ In this type of service, not only must the packet contain the source and
destination addresses, it must also contain a flow label, a virtual circuit identifier
that defines the virtual path the packet should follow. Each packet is forwarded
based on the label in the packet.

▪ To follow the idea of connection-oriented design to be used in the Internet, we


assume that the packet has a label when it reaches the router.

▪ In this case, the forwarding decision is based on the value of the label, or virtual
circuit identifier.

Fig 3.4: A virtual-circuit packet-switched network


PACKET SWITCHING

To create a connection-oriented service, a three-phase process is used: setup, data


transfer, and teardown.
Setup Phase
▪ In the setup phase, a router creates an entry for a virtual circuit.
▪ Two auxiliary packets need to be exchanged between the sender and the
receiver: the request packet and the acknowledgment packet.
Request packet
A request packet is sent from the source to the destination. This auxiliary
packet carries the source and destination addresses.
Acknowledgment Packet
A special packet, called the acknowledgment packet, completes the entries in
the switching tables.
Data-Transfer Phase
The second phase is called the data-transfer phase. After all routers have created
their forwarding table for a specific virtual circuit, then the network-layer packets
belonging to one message can be sent one after another.

Fig 3.5: Flow of one packet in an established virtual circuit


PACKET SWITCHING

▪ The source computer uses the label 14, which it has received from router R1 in
the setupphase.

▪ Router R1 forwards the packet to router R3, but changes the label to 66. Router
R3 forwards the packet to router R4, but changes the label to 22.

▪ Finally, router R4 delivers the packet to its final destination with the label 77.

▪ All the packets in the message follow the same sequence of labels, and the
packets arrive in order at the destination.

Teardown Phase

▪ In the teardown phase, source A, after sending all packets to B, sends a special
packet called a teardown packet.

▪ Destination B responds with a confirmation packet. All routers delete the


corresponding entries from their tables.
IPV4 ADDRESSES

3.3 IPV4 ADDRESSES

The identifier used in the IP layer of the TCP/IP protocol suite to identify the
connection of each device to the Internet is called the Internet address or IP
address.

An IPv4 address is a 32-bit address that uniquely and universally defines the
connection of a host or a router to the Internet.

The IP address is the address of the connection, not the host or the router, because
if the device is moved to another network, the IP address may be changed.

IPv4 addresses are unique in the sense that each address defines one, and only
one, connection to the Internet.

3.3.1 Address Space

▪ An address space is the total number of addresses used by the protocol.

▪ IPv4 uses 32-bit addresses, which means that the address space is 232 or
4,294,967,296 (more than four billion).

Notation

There are three common notations to show an IPv4 address:

binary notation (base 2),

dotted-decimal notation (base 256), and

hexadecimal notation (base 16).

▪ In binary notation, an IPv4 address is displayed as 32 bits.

▪ To make the IPv4 address more compact and easier to read, it is usually written in
decimal form with a decimal point (dot) separating the bytes. This format is
referred to as dotted-decimal notation.
IPV4 ADDRESSES

▪ IPv4 address in hexadecimal notation.

▪ Each hexadecimal digit is equivalent to four bits.

▪ This means that a 32-bit address has 8 hexadecimal digits. This notation is often
used in network programming.

Fig 3.6: Three different notations in IPv4 addressing

Hierarchy in Addressing

A 32-bit IPv4 address is hierarchical and it is divided only into two parts.

The first part of the address, called the prefix, defines the network; the second
part of the address, called the suffix, defines the node (connection of a device to
the Internet).

Fig 3.7: Hierarchy in addressing


IPV4 ADDRESSES

▪ The prefix length is n bits and the suffix length is (32 − n) bits.

▪ A prefix can be fixed length or variable length. The network identifier in the IPv4
was first designed as a fixed-length prefix. This scheme, which is now obsolete, is
referred to as classful addressing.

▪ The new scheme, which is referred to as classless addressing, uses a variable-


length network prefix.

3.3.2 Classful Addressing

When the Internet started, an IPv4 address was designed with a fixed-length prefix,
but to accommodate both small and large networks, three fixed-length prefixes were
designed instead of one (n = 8, n = 16, and n = 24).

The whole address space was divided into five classes (class A, B, C, D, and E), as
shown in Figure

This scheme is referred to as classful addressing.

Fig 3.8:Occupation of the address space in classful addressing


IPV4 ADDRESSES

In class A, the network length is 8 bits, but since the first bit, which is 0, defines
the class, we can have only seven bits as the network identifier. This means there
are only 27 = 128 networks in the world that can have a class A address.

In class B, the network length is 16 bits, but since the first two bits, which are
(10)2, define the class, we can have only 14 bits as the network identifier. This
means there are only 214 = 16,384 networks in the world that can have a class B
address.

All addresses that start with (110)2 belong to class C. In class C, the network
length is 24 bits, but since three bits define the class, we can have only 21 bits as
the network identifier. This means there are 221 = 2,097,152 networks in the world
that can have a class C address.

Class D is not divided into prefix and suffix. It is used for multicast addresses.

All Addresses that start with 1111 in binary belong to class E.

Address Depletion

▪ The reason that classful addressing has become obsolete is address depletion.

▪ Since the addresses were not distributed properly, the Internet was faced with the
problem of the addresses being rapidly used up, resulting in no more addresses
available for organizations and individuals that needed to be connected to the
Internet.
IPV4 ADDRESSES

Subnetting and Supernetting

To alleviate address depletion, two strategies were proposed and, to some


extent, implemented: subnetting and supernetting.

In subnetting, a class A or class B block is divided into several subnets. Each


subnet has a larger prefix length than the original network.

For example, if a network in class A is divided into four subnets, each subnet has a
prefix of nsub = 10.

At the same time, if all of the addresses in a network are not used, subnetting
allows the addresses to be divided among several organizations.

This idea did not work because most large organizations were not happy about
dividing the block and giving some of the unused addresses to smaller organizations.

While subnetting was devised to divide a large block into smaller ones,
supernetting was devised to combine several class C blocks into a larger block to
be attractive to organizations that need more than the 256 addresses available in a
class C block.

This idea did not work either because it makes the routing of packets more difficult.

Advantage of Classful Addressing

Although classful addressing had several problems and became obsolete, it had one
advantage: Given an address, we can easily find the class of the address and, since
the prefix length for each class is fixed, we can find the prefix length immediately.
IPV4 ADDRESSES

3.3.3 Classless Addressing

In 1996, the Internet authorities announced a new architecture called classless


addressing.

▪ In classless addressing, variable-length blocks are used that belong to no classes.

▪ We can have a block of 1 address, 2 addresses, 4 addresses, 128 addresses, and


so on.

▪ In classless addressing, the whole address space is divided into variable length
blocks. The prefix in an address defines the block (network); the suffix defines
the node (device).

▪ Theoretically, we can have a block of 20, 21, 22, ..., 232 addresses. One of the
restrictions is that the number of addresses in a block needs to be a power of 2.

▪ An organization can be granted one block of addresses.

Fig 3.9: Variable-length blocks in classless addressing

Unlike classful addressing, the prefix length in classless addressing is variable.

We can have a prefix length that ranges from 0 to 32. The size of the network is
inversely proportional to the length of the prefix.
IPV4 ADDRESSES

Prefix Length: Slash Notation

The first question that we need to answer in classless addressing is how to find the
prefix length if an address is given.

Since the prefix length is not inherent in the address, we need to separately give the
length of the prefix.

In this case, the prefix length, n, is added to the address, separated by a slash.

The notation is informally referred to as slash notation and formally as classless


interdomain routing or CIDR (pronounced cider) strategy.

An address in classless addressing can then be represented as shown in Figure 3.10

Fig 3.10: Slash notation (CIDR)

Extracting Information from an Address

Given any address in the block, we normally like to know three pieces of information
about the block to which the address belongs: the number of addresses, the first
address in the block, and the last address.

Since the value of prefix length, n, is given, we can easily find these three pieces of
information, as shown in Figure 2.63 a.

1. The number of addresses in the block is found as N = 232−n.

2. To find the first address, we keep the n leftmost bits and set the (32 − n) rightmost
bits all to 0s.

3. To find the last address, we keep the n leftmost bits and set the (32 − n) rightmost
bits all to 1s.
IPV4 ADDRESSES

Fig 3.11 : Information extraction in classless addressing

Address Mask

Another way to find the first and last addresses in the block is to use the address
mask.

The address mask is a 32-bit number in which the n leftmost bits are set to 1s and
the rest of the bits (32 − n) are set to 0s. A computer can easily find the address
mask because it is the complement of (232 − n − 1).

The reason for defining a mask in this way is that it can be used by a computer
program to extract the information in a block, using the three bit-wise operations
NOT, AND, and OR.

1. The number of addresses in the block N = NOT (mask) + 1.

2. The first address in the block = (Any address in the block) AND (mask).

3. The last address in the block = (Any address in the block) OR [(NOT (mask)].

Network Address

The first address, the network address, is particularly important because it is used in
routing a packet to its destination network.
IPV4 ADDRESSES

Block Allocation

The ultimate responsibility of block allocation is given to a global authority called the
Internet Corporation for Assigned Names and Numbers (ICANN). However, ICANN does not
normally allocate addresses to individual Internet users. It assigns a large block of
addresses to an ISP

Subnetting

An organization (or an ISP) that is granted a range of addresses may divide the range into
several subranges and assign each subrange to a subnetwork (or subnet).A subnetwork can
be divided into several sub-subnetworks.

A sub-subnetwork can be divided into several sub-sub-subnetworks, and so on.

Designing Subnets

The subnetworks in a network should be carefully designed to enable the routing of packets.

We assume the total number of addresses granted to the organization is N, the prefix length
is n, the assigned number of addresses to each subnetwork is Nsub, and the prefix length for
each subnetwork is nsub.

Then the following steps need to be carefully followed to guarantee the proper operation of
the subnetworks.

❑ The number of addresses in each subnetwork should be a power of 2.

❑ The prefix length for each subnetwork should be found using the following formula:

first address = (prefix in decimal) × 232 − n = (prefix in decimal) × N. nsub = 32 − log2Nsub

 The starting address in each subnetwork should be divisible by the number of addresses
in that subnetwork. This can be achieved if we first assign addresses to larger
subnetworks.
IPV4 ADDRESSES

Address Aggregation

▪ One of the advantages of the CIDR strategy is address aggregation (sometimes called
address summarization or route summarization). When blocks of addresses are combined
to create a larger block, routing can be done based on the prefix of the larger block.

▪ ICANN assigns a large block of addresses to an ISP. Each ISP in turn divides its assigned
block into smaller subblocks and grants the subblocks to its customers.

Special Addresses

 This-host Address

▪ The only address in the block 0.0.0.0/32 is called the this-host address.

▪ It is used whenever a host needs to send an IP datagram but it does not know its own
address to use as the source address.

 Limited-broadcast Address

▪ The only address in the block 255.255.255.255/32 is called the limited-broadcast address.

▪ It is used whenever a router or a host needs to send a datagram to all devices in a


network.

 Loopback Address

▪ The block 127.0.0.0/8 is called the loopback address.

▪ A packet with one of the addresses in this block as the destination address never leaves
the host; it will remain in the host.

 Private Addresses

▪ Four blocks are assigned as private addresses: 10.0.0.0/8, 172.16.0.0/12,


192.168.0.0/16, and 169.254.0.0/16.

 Multicast Addresses

▪ The block 224.0.0.0/4 is reserved for multicast addresses.


IPV4 ADDRESSES

3.3.4 Dynamic Host Configuration Protocol (DHCP)


▪ An address assignment in an organization can be done automatically using the
Dynamic Host Configuration Protocol (DHCP).
▪ DHCP is an application-layer program, using the client-server paradigm, that
actually helps TCP/IP at the network layer.
▪ DHCP has found such widespread use in the Internet that it is often called a plug
and-play protocol.
▪ A network manager can configure DHCP to assign permanent IP addresses to the
host and routers.
▪ DHCP can also be configured to provide temporary, on demand, IP addresses to
hosts.
▪ The second capability can provide a temporary IP address to a traveller to connect
her laptop to the Internet while she is staying in the hotel. It also allows an ISP
with 1000 granted addresses to provide services to 4000 households, assuming
not more than one-forth of customers use the Internet at the same time.
DHCP Message Format
DHCP is a client-server protocol in which the client sends a request message and the
server returns a response message.

Fig 3.12: DHCP message format


IPV4 ADDRESSES

DHCP Operation

1. The joining host creates a DHCPDISCOVER message in which only the transaction ID field
is set to a random number. This message is encapsulated in a UDP user datagram with the
source port set to 68 and the destination port set to 67. The user datagram is encapsulated
in an IP datagram with the source address set to 0.0.0.0 (“this host”) and the destination
address set to 255.255.255.255 (broadcast address). The reason is that the joining host
knows neither its own address nor the server address.

2. The DHCP server or servers (if more than one) responds with a DHCPOFFER message in
which the your address field defines the offered IP address for the joining host and the
server address field includes the IP address of the server.

Fig 3.13 a: Operation of DHCP


IPV4 ADDRESSES

3. The joining host receives one or more offers and selects the best of them. The
joining host then sends a DHCPREQUEST message to the server that has given the
best offer. The fields with known value are set. The user datagram is encapsulated
in an IP datagram with the source address set to the new client address, but the
destination address still is set to the broadcast address to let the other servers know
that their offer was not accepted.

4. Finally, the selected server responds with a DHCPACK message to the client if the
offered IP address is valid. If the server cannot keep its offer (for example, if the
address is offered to another host in between), the server sends a DHCPNACK
message and the client needs to repeat the process. This message is also broadcast
to let other servers know that the request is accepted or rejected.

3.3.5 Network Address Translation (NAT)

A technology that can provide the mapping between the private and universal
addresses, and at the same time support virtual private networks, is Network
Address Translation (NAT).

The technology allows a site to use a set of private addresses for internal
communication and a set of global Internet addresses (at least one) for
communication with the rest of the world.

Fig 3.14 : NAT


IPV4 ADDRESSES

As the figure shows, the private network uses private addresses. The router that
connects the network to the global address uses one private address and one global
address. The private network is invisible to the rest of the Internet; the rest of the
Internet sees only the NAT router with the address 200.24.5.8.
Address Translation

All of the outgoing packets go through the NAT router, which replaces the source
address in the packet with the global NAT address.

All incoming packets also pass through the NAT router, which replaces the
destination address in the packet (the NAT router global address) with the
appropriate private address.

Fig 3.15: Address translation


Network-Layer Protocols
Network-Layer Protocols

3.4 INTERNET PROTOCOL (IP)

The network layer in version 4 can be thought of as one main protocol and three
auxiliary ones.

The main protocol, Internet Protocol version 4 (IPv4), is responsible for


packetizing, forwarding, and delivery of a packet at the network layer.

The Internet Control Message Protocol version 4 (ICMPv4) helps IPv4 to handle
some errors that may occur in the network-layer delivery.

The Internet Group Management Protocol (IGMP) is used to help IPv4 in


multicasting.

The Address Resolution Protocol (ARP) is used to glue the network and data-link
layers in mapping network-layer addresses to link-layer addresses.

▪ IPv4 is an unreliable datagram protocol—a best-effort delivery service.

▪ The term best-effort means that IPv4 packets can be corrupted, be lost, arrive out
of order, or be delayed, and may create congestion for the network.

▪ If reliability is important, IPv4 must be paired with a reliable transport-layer


protocol such as TCP.

Fig 3.16: Position of IP and other network-layer protocols in TCP/IP protocol suite
Network-Layer Protocols

▪ IPv4 is also a connectionless protocol that uses the datagram approach.

▪ This means that each datagram is handled independently, and each datagram can
follow a different route to the destination.

▪ This implies that datagrams sent by the same source to the same destination
could arrive out of order.

▪ Again, IPv4 relies on a higher-level protocol to take care of all these problems.

3.4.1 Datagram Format

Packets used by the IP are called datagrams. Figure 2.67a shows the IPv4 datagram
format. A datagram is a variable-length packet consisting of two parts:

header and payload (data).

Fig 3.17 : IP datagram

▪ The header is 20 to 60 bytes in length and contains information essential to


routing and delivery.

▪ It is customary in TCP/IP to show the header in 4-byte sections.


Network-Layer Protocols

Version Number: The 4-bit version number (VER) field defines the version of the
IPv4 protocol, which, obviously, has the value of 4.

Header Length: The 4-bit header length (HLEN) field defines the total length of
the datagram header in 4-byte words.

Service Type: In the original design of the IP header, this field was referred to as
type of service (TOS), which defined how the datagram should be handled.

Total Length: This 16-bit field defines the total length (header plus data) of the IP
datagram in bytes. A 16-bit number can define a total length of up to 65,535 (when
all bits are 1s).

Identification, Flags, and Fragmentation Offset: These three fields are related
to the fragmentation of the IP datagram when the size of the datagram is larger
than the underlying network can carry.

Time-to-live: The time-to-live (TTL) field is used to control the maximum number
of hops (routers) visited by the datagram. Each router that processes the datagram
decrements this number by one. If this value, after being decremented, is zero, the
router discards the datagram.

Protocol: In TCP/IP, the data section of a packet, called the payload, carries the
whole packet from another protocol.

Header checksum: IP is not a reliable protocol;The datagram header, however, is


added by IP, and its error-checking is the responsibility of IP. Errors in the IP header
can be a disaster. For these reasons, IP adds a header checksum field to check the
header, but not the payload. We need to remember that, since the value of some
fields, such as TTL, which are related to fragmentation and options, may change
from router to router, the checksum needs to be recalculated at each router.

Source and Destination Addresses: These 32-bit source and destination address
fields define the IP address of the source and destination respectively.
Network-Layer Protocols

Options:

A datagram header can have up to 40 bytes of options. Options can be used for
network testing and debugging.

Payload:

Payload, or data, is the main reason for creating a datagram. Payload is the packet
coming from other protocols that use the service of IP.

3.4.2 Fragmentation
A datagram can travel through different networks. Each router decapsulates the IP
datagram from the frame it receives, processes it, and then encapsulates it in
another frame.

The format and size of the received frame depend on the protocol used by the
physical network through which the frame has just traveled. The format and size of
the sent frame depend on the protocol used by the physical network through which
the frame is going to travel.

Maximum Transfer Unit (MTU)

Each link-layer protocol has its own frame format. One of the features of each
format is the maximum size of the payload that can be encapsulated.

Fig 3.18: Maximum transfer unit (MTU)


Network-Layer Protocols

▪ The value of the MTU differs from one physical network protocol to another.

▪ In order to make the IP protocol independent of the physical network, the


design_x0002_ers decided to make the maximum length of the IP datagram equal
to 65,535 bytes.

▪ This makes transmission more efficient if one day we use a link-layer protocol
with an MTU of this size. However, for other physical networks, we must divide
the datagram to make it possible for it to pass through these networks. This is
called fragmentation.

▪ When a datagram is fragmented, each fragment has its own header with most of
the fields repeated, but some have been changed. A fragmented datagram may
itself be fragmented if it encounters a network with an even smaller MTU.

▪ A datagram can be fragmented by the source host or any router in the path. The
reassembly of the datagram, however, is done only by the destination host,
because each fragment becomes an independent datagram.
Network-Layer Protocols

3.4.3 Options

The header of the IPv4 datagram is made of two parts: a fixed part and a variable
part.

▪ The fixed part is 20 bytes long and was discussed in the previous section. The
variable part comprises the options that can be a maximum of 40 bytes (in
multiples of 4-bytes) to preserve the boundary of the header.

▪ Options, as the name implies, are not required for a datagram. They can be used
for network testing and debugging.

Single-Byte Options

There are two single-byte options.

•No Operation

A no-operation option is a 1-byte option used as a filler between options.

•End of Option

An end-of-option option is a 1-byte option used for padding at the end of the option
field. It, however, can only be used as the last option.

Multiple-Byte Options

There are four multiple-byte options.

• Record Route

A record route option is used to record the Internet routers that handle the
datagram.

• Strict Source Route

A strict source route option is used by the source to predetermine a route for the
datagram as it travels through the Internet.
Network-Layer Protocols

Loose Source Route

A loose source route option is similar to the strict source route, but it is less rigid.

Timestamp

A timestamp option is used to record the time of datagram processing by a router.

3.4.4 Security of IPv4 Datagrams

There are three security issues that are particularly applicable to the IP protocol:
packet sniffing, packet modification, and IP spoofing.

Packet Sniffing

An intruder may intercept an IP packet and make a copy of it. Packet sniffing is a
passive attack, in which the attacker does not change the contents of the packet.
This type of attack is very difficult to detect because the sender and the receiver
may never know that the packet has been copied.

Packet Modification

▪ The second type of attack is to modify the packet. The attacker intercepts the
packet, changes its contents, and sends the new packet to the receiver.

▪ The receiver believes that the packet is coming from the original sender.

▪ This type of attack can be detected using a data integrity mechanism.

▪ The receiver, before opening and using the contents of the message, can use this
mechanism to make sure that the packet has not been changed during the
transmission.

IP Spoofing

An attacker can masquerade as somebody else and create an IP packet that carries
the source address of another computer. An attacker can send an IP packet to a
bank pretending that it is coming from one of the customers. This type of attack can
be prevented using an origin authentication mechanism
Network-Layer Protocols

IPSec

The IP packets today can be protected from the previously mentioned attacks using
a protocol called IPSec (IP Security).

This protocol, which is used in conjunction with the IP protocol, creates a


connection-oriented service between two entities in which they can exchange IP
packets without worrying about the three attacks discussed above.

 Defining Algorithms and Keys.

The two entities that want to create a secure channel between themselves can
agree on some available algorithms and keys to be used for security purposes.

❑ Packet Encryption. The packets exchanged between two parties can be


encrypted for privacy using one of the encryption algorithms and a shared key
agreed upon in the first step. This makes the packet sniffing attack useless.

❑ Data Integrity. Data integrity guarantees that the packet is not modified during
the transmission. If the received packet does not pass the data integrity test, it is
discarded. This prevents the second attack, packet modification, described above.

❑ Origin Authentication. IPSec can authenticate the origin of the packet to be


sure that the packet is not created by an imposter. This can prevent IP spoofing
attacks as described above.
Network-Layer Protocols

3.5 ICMPv4

▪ The IPv4 has no error-reporting or error-correcting mechanism.

▪ The IP protocol also lacks a mechanism for host and management queries.

▪ The Internet Control Message Protocol version 4 (ICMPv4) has been designed to
compensate for the above two deficiencies. It is a companion to the IP protocol.

▪ ICMP itself is a network-layer protocol.When an IP datagram encapsulates an


ICMP message, the value of the protocol field in the IP datagram is set to 1 to
indicate that the IP payroll is an ICMP message.

3.5.1 MESSAGES

ICMP messages are divided into two broad categories: error-reporting messages and
query messages.

The error-reporting messages report problems that a router or a host (destination)


may encounter when it processes an IP packet.

The query messages, which occur in pairs, help a host or a network manager get
specific information from a router or another host.

An ICMP message has an 8-byte header and a variable-size data section.

Fig 3.19: General format of ICMP messages


Network-Layer Protocols

▪ The data section in error messages carries information for finding the original packet that
had the error.

▪ In query messages, the data section carries extra information based on the type of query.

Error Reporting Messages

To make the error-reporting process simple, ICMP follows some rules in reporting messages.

▪ First, no error message will be generated for a datagram having a multicast address or
special address (such as this host or loopback).

▪ Second, no ICMP error message will be generated in response to a datagram carrying an


ICMP error message.

▪ Third, no ICMP error message will be generated for a fragmented datagram that is not
the first fragment.

Destination Unreachable

The most widely used error message is the destination unreachable (type 3).

▪ This message uses different codes (0 to 15) to define the type of error message and
the reason why a datagram has not reached its final destination.

Source Quench

Another error message is called the source quench (type 4) message, which informs the
sender that the network has encountered congestion and the datagram has been dropped;
the source needs to slow down sending more datagrams.

Redirection Message

The redirection message (type 5) is used when the source uses a wrong router to send out
its message.

The router redirects the message to the appropriate router, but informs the source that it
needs to change its default router in the future. The IP address of the default router is sent
in the message.
Network-Layer Protocols

Parameter Problem

A parameter problem message (type 12) can be sent when either there is a problem
in the header of a datagram (code 0) or some options are missing or cannot be
interpreted (code 1).

Query Messages

Interestingly, query messages in ICMP can be used independently without relation to


an IP datagram.

▪ Query messages are used to probe or test the liveliness of hosts or routers in the
Internet, find the one-way or the round-trip time for an IP datagram between two
devices, or even find out whether the clocks in two devices are synchronized.
Naturally, query messages come in pairs: request and reply.

▪ The echo request (type 8) and the echo reply (type 0) pair of messages are used
by a host or a router to test the liveliness of another host or router

▪ The timestamp request (type 13) and the timestamp reply (type 14) pair of
messages are used to find the round-trip time between two devices or to check
whether the clocks in two devices are synchronized.

Deprecated Messages

Three pairs of messages are declared obsolete by IETF:

1. Information request and replay messages are not used today because their duties
are done by the Address Resolution Protocol (ARP).

2. Address mask request and reply messages are not used today because their
duties are done by the Dynamic Host Configuration Protocol (DHCP)

3. Router solicitation and advertisement messages are not used today because their
duties are done by the Dynamic Host Configuration Protocol (DHCP)
Network-Layer Protocols

3.5.2 Debugging Tools

There are several tools that can be used in the Internet for debugging.

We introduce two tools that use ICMP for debugging: ping and traceroute.

Ping

We can use the ping program to find if a host is alive and responding. We use ping
here to see how it uses ICMP packets. The source host sends ICMP echo-request
messages; the destination, if alive, responds with ICMP echo-reply messages.

Traceroute or Tracert

The traceroute program in UNIX or tracert in Windows can be used to trace the path
of a packet from a source to the destination.

It can find the IP addresses of all the routers that are visited along the path. The
program is usually set to check for the maximum of 30 hops (routers) to be visited.

3.5.3 ICMP Checksum

In ICMP the checksum is calculated over the entire message (header and data).
Section 3.6
ROUTING
3.6.1 General Idea
3.6.2 internet as a graph
3.6.3 Low cost routing and trees
3.6 ROUTING
Unicast routing in the Internet, with a large number of routers and a huge number
of hosts, can be done only by using hierarchical routing: routing in several steps
using different routing algorithms.
3.6.1 General Idea
In unicast routing, a packet is routed, hop by hop, from its source to its
destination by the help of forwarding tables. The source host needs no forwarding
table because it delivers its packet to the default router in its local network. The
destination host needs no forwarding table either because it receives the packet
from its default router in its local network. This means that only the routers that
glue together the networks in the internet need forwarding tables. With the above
explanation, routing a packet from its source to its destination means routing the
packet from a source router (the default router of the source host) to a destination
router (the router connected to the destination network).
3.6.2 An Internet as a Graph
To find the best route, an internet can be modeled as a graph. A graph in
computer science is a set of nodes and edges (lines) that connect the nodes. An
internet is, in fact, modeled as a weighted graph, in which each edge is associated
with a cost. In routing, however, the cost of an edge has a different interpretation in
different routing protocols. If there is no edge between the nodes, the cost is
infinity.

Fig. 3.20: An internet and its graphical representation


Least-Cost Routing
When an internet is modeled as a weighted graph, one of the ways to
interpret the best route from the source router to the destination router is to find
the least cost between the two. In other words, the source router chooses a route to
the destination router in such a way that the total cost for the route is the least cost
among all possible routes. In Fig, the best route between A and E is A-B-E, with the
cost of 6. This means that each router needs to find the least-cost route between
itself and all the other routers to be able to route a packet using this criteria.

Least-Cost Trees
If there are N routers in an internet, there are (N − 1) least-cost paths
from each router to any other router. This means we need N × (N − 1) least-cost
paths for the whole internet. If we have only 10 routers in an internet, we need 90
least-cost paths. A least-cost tree is a tree with the source router as the root that
spans the whole graph (visits all other nodes) and in which the path between the
root and any other node is the shortest. In this way, we can have only one shortest-
path tree for each node; we have N least-cost trees for the whole internet.

The least-cost trees for a weighted graph can have several properties if they are
created using consistent criteria.
1. The least-cost route from X to Y in X’s tree is the inverse of the least-cost route
from Y to X in Y’s tree; the cost in both directions is the same.
2. Instead of travelling from X to Z using X’s tree, we can travel from X to Y using
X’s tree and continue from Y to Z using Y’s tree.
Section 3.7
UNICAST ROUTING
ALGORITHMS
3.7.1 Distance Vector Algorithms
3.7.2 Link State Algorithm
3.7.3 Path Vector Algorithm
3.7 ROUTING ALGORITHMS
We have different routing algorithms, The differences between these algorithms are
in the way they interpret the least cost and the way they create the least-cost tree
for each node.
3.7.1 Distance-Vector Routing
In distance-vector routing, the first thing each node creates is its own least-cost tree
with the rudimentary information it has about its immediate neighbors. The
incomplete trees are exchanged between immediate neighbors to make the trees
more and more complete and to represent the whole internet. We can say that in
distance-vector routing, a router continuously tells all of its neighbors what it knows
about the whole internet (although the knowledge can be incomplete).
Bellman-Ford Equation
The heart of distance-vector routing is the famous Bellman-Ford equation.
This equation is used to find the least cost (shortest distance) between a source
node, x, and a destination node, y, through some intermediary nodes (a, b, c, . . .)
when the costs between the source and the intermediary nodes and the least costs
between the intermediary nodes and the destination are given. The following shows
the general case in which Dij is the shortest distance and cij is the cost between
nodes i and j.

In distance-vector routing, normally we want to update an existing least cost with a


least cost through an intermediary node, such as z, if the latter is shorter. In this
case, the equation becomes simpler, as shown below:

Fig. Graphical idea behind Bellman-Ford equation


Distance Vectors
The concept of a distance vector is the rationale for the name distance-vector
routing. A distance vector, is a one-dimensional array to represent the tree. Figure
shows the tree for node A and the corresponding distance vector. Note that the
name of the distance vector defines the root, the indexes define the destinations,
and the value of each cell defines the least cost from the root to the destination.
A distance vector does not give the path to the destinations as the least-cost tree
does; it gives only the least costs to the destinations. Each node in an internet,
when it is booted, creates a very rudimentary distance vector with the minimum
information the node can obtain from its neighborhood. The node sends some
greeting messages out of its interfaces and discovers the identity of the immediate
neighbors and the distance between itself and each neighbor. It then makes a
simple distance vector by inserting the discovered distances in the corresponding
cells and leaves the value of other cells as infinity.

Fig. The first distance vector


For example, node A thinks that it is not connected to node G because the
corresponding cell shows the least cost of infinity. To improve these vectors, the
nodes in the internet need to help each other by exchanging information. After each
node has created its vector, it sends a copy of the vector to all its immediate
neighbors. After a node receives a distance vector from a neighbor, it updates its
distance vector using the Bellman-Ford equation (second case). However, we need
to understand that we need to update, not only one least cost, but N of them in
which N is the number of the nodes in the internet.
The figure shows two asynchronous events, happening one after another
with some time in between. In the first event, node A has sent its vector to node B.
Node B updates its vector using the cost CBA= 2. In the second event, node E has
sent its vector to node B. Node B updates its vector using the cost CEA = 4.
Count to Infinity
A problem with distance-vector routing is that any decrease in cost (good news)
propagates quickly, but any increase in cost (bad news) will propagate slowly. For a
routing protocol to work properly, if a link is broken (cost becomes infinity), every
other router should be aware of it immediately, but in distance-vector routing, this
takes some time. The problem is referred to as count to infinity. It sometimes takes
several updates before the cost for a broken link is recorded as infinity by all routers.
Two-Node Loop
One example of count to infinity is the two-node loop problem

At the beginning, both nodes A and B know how to reach node X. But suddenly, the
link between A and X fails. Node A changes its table. If A can send its table to B
immediately, everything is fine. However, the system becomes unstable if B sends its
forwarding table to A before receiving A’s forwarding table. The cost of reaching X
increases gradually until it reaches infinity. At this moment, both A and B know that
X cannot be reached. However, during this time the system is not stable. Packets
bounce between A and B, creating a two-node loop problem. A few solutions have
been proposed for instability of this kind.
Split Horizon
One solution to instability is called split horizon. In this strategy, instead of
flooding the table through each interface, each node sends only part of its table
through each interface. If, according to its table, node B thinks that the optimum
route to reach X is via A, it does not need to advertise this piece of information to A;
the information has come from A (A already knows). Taking information from node
A, modifying it, and sending it back to node A is what creates the confusion. In our
scenario, node B eliminates the last line of its forwarding table before it sends it to
A. In this case, node A keeps the value of infinity as the distance to X. Later, when
node A sends its forwarding table to B, node B also corrects its forwarding table. The
system becomes stable after the first update: both node A and node B know that X
is not reachable.
Poison Reverse
Using the split-horizon strategy has one drawback. Normally, the
corresponding protocol uses a timer, and if there is no news about a route, the node
deletes the route from its table. When node B in the previous scenario eliminates
the route to X from its advertisement to A, node A cannot guess whether this is due
to the split-horizon strategy (the source of information was A) or because B has not
received any news about X recently. In the poison reverse strategy B can still
advertise the value for X, but if the source of information is A, it can replace the
distance with infinity as a warning: “Do not use this value; what I know about this
route comes from you.”
Three-Node Instability
The two-node instability can be avoided using split horizon combined with
poison reverse. However, if the instability is between three nodes, stability cannot be
guaranteed.
3.7.2 Link-State Routing
This method uses the term link-state to define the characteristic of a link
(an edge) that represents a network in the internet. In this algorithm the cost
associated with an edge defines the state of the link. Links with lower costs are
preferred to links with higher costs; if the cost of a link is infinity, it means that the
link does not exist or has been broken.
Link-State Database (LSDB)
The collection of states for all links is called the link-state database (LSDB). There is
only one LSDB for the whole internet; each node needs to have a duplicate of it to
be able to create the least-cost tree.
Now the question is how each node can create this LSDB that contains information
about the whole internet. This can be done by a process called flooding. Each node
can send some greeting messages to all its immediate neighbors (those nodes to
which it is connected directly) to collect two pieces of information for each
neighboring node: the identity of the node and the cost of the link. The combination
of these two pieces of information is called the LS packet (LSP); the LSP is sent out
of each interface. When a node receives an LSP from one of its interfaces, it
compares the LSP with the copy it may already have. If the newly arrived LSP is
older than the one it has (found by checking the sequence number), it discards the
LSP. If it is newer or the first one received, the node discards the old LSP (if there is
one) and keeps the received one.

Formation of Least-Cost Trees


To create a least-cost tree for itself, using the shared LSDB, each node
needs to run the famous Dijkstra Algorithm. This iterative algorithm uses the
following steps:
1. The node chooses itself as the root of the tree, creating a tree with a single node,
and sets the total cost of each node based on the information in the LSDB.
2. The node selects one node, among all nodes not in the tree, which is closest to
the root, and adds this to the tree. After this node is added to the tree, the cost of
all other nodes not in the tree needs to be updated because the paths may have
been changed.
3. The node repeats step 2 until all nodes are added to the tree.
3.7.3 Path-Vector Routing
Both link-state and distance-vector routing are based on the least-cost goal.
However, there are instances where this goal is not the priority. For example,
assume that there are some routers in the internet that a sender wants to prevent
its packets from going through. Least-cost routing does not prevent a packet from
passing through an area when that area is in the least-cost path. In other words, the
least-cost goal, applied by LS or DV routing, does not allow a sender to apply
specific policies to the route a packet may take. To respond to these demands, a
third routing algorithm, called path-vector (PV) routing has been devised. The best
route is determined by the source using the policy it imposes on the route. In other
words, the source can control the path. Although path-vector routing is not actually
used in an internet, and is mostly designed to route a packet between ISPs.
Spanning Trees
In path-vector routing, the path from a source to all destinations is also
determined by the best spanning tree. The best spanning tree, however, is not the
least-cost tree; it is the tree determined by the source when it imposes its own
policy. If there is more than one route to a destination, the source can choose the
route that meets its policy best. A source may apply several policies at the same
time. One of the common policies uses the minimum number of nodes to be visited
(something similar to least-cost). Another common policy is to avoid some nodes as
the middle node in a route.

Creation of Spanning Trees


The spanning trees are made, gradually and asynchronously, by each node. When a
node is booted, it creates a path vector based on the information it can obtain about
its immediate neighbor. A node sends greeting messages to its immediate neighbors
to collect these pieces of information.
Each node, after the creation of the initial path vector, sends it to all its immediate
neighbors. Each node, when it receives a path vector from a neighbor, updates its
path vector using an equation similar to the Bellman-Ford, but applying its own
policy instead of looking for the least cost. We can define this equation as

Path vectors made at booting time

Updating path vectors


Figure shows the path vector of node C after two events. In the first event, node C
receives a copy of B’s vector, which improves its vector: now it knows how to reach
node A. In the second event, node C receives a copy of D’s vector, which does not
change its vector. As a matter of fact the vector for node C after the first event is
stabilized and serves as its forwarding table.
Path-Vector Algorithm
Section 3.8
UNICAST ROUTING
PROTOCOLS
3.8.1 Internet Structure
3.8.2 Hierarchical Routing
3.8.3 Routing Information Protocol (RIP)
3.8.4 Open Shortest Path First Protocol (OSPF)
3.8.5 Border Gateway Protocol (BGP)
3.8 UNICAST ROUTING PROTOCOLS
A protocol needs to define its domain of operation, the messages exchanged,
communication between routers, and interaction with protocols in other domains.
The three common protocols used in the Internet:
Routing Information Protocol (RIP), based on the distance-vector algorithm, Open
Shortest Path First (OSPF), based on the link-state algorithm, and Border Gateway
Protocol (BGP), based on the path-vector algorithm.
3.8.1 Internet Structure
There are several backbones run by private communication companies
that provide global connectivity. These backbones are connected by some peering
points that allow connectivity between backbones. At a lower level, there are some
provider networks that use the backbones for global connectivity but provide
services to Internet customers. Finally, there are some customer networks that use
the services provided by the provider networks. Any of these three entities
(backbone, provider network, or customer network) can be called an Internet
Service Provider or ISP. They provide services, but at different levels.

3.8.2 Hierarchical Routing


Hierarchical routing means considering each ISP as an autonomous
system (AS). Each AS can run a routing protocol that meets its needs, but the global
Internet runs a global protocol to glue all ASs together. The routing protocol run in
each AS is referred to as intra-AS routing protocol, intradomain routing protocol, or
interior gateway protocol (IGP); the global routing protocol is referred to as
inter-AS routing protocol, interdomain routing protocol, or exterior gateway protocol
(EGP).
Autonomous Systems
Each AS is given an autonomous number (ASN) by the ICANN. Each ASN
is a 16-bit unsigned integer that uniquely defines an AS. The autonomous systems,
however, are not categorized according to their size; they are categorized according
to the way they are connected to other ASs. We have stub ASs, multihomed ASs,
and transient ASs. The type, as we see will later, affects the operation of the
interdomain routing protocol in relation to that AS.
❑ Stub AS. A stub AS has only one connection to another AS. The data traffic can
be either initiated or terminated in a stub AS; the data cannot pass through it. A
good example of a stub AS is the customer network, which is either the source or
the sink of data.
❑ Multihomed AS. A multihomed AS can have more than one connection to other
ASs, but it does not allow data traffic to pass through it. A good example of such an
AS is some of the customer ASs that may use the services of more than one
provider network, but their policy does not allow data to be passed through them.
❑Transient AS. A transient AS is connected to more than one other AS and also
allows the traffic to pass through. The provider networks and the backbone are good
examples of transient ASs.
3.8.3 ROUTING INFORMATION PROTOCOL (RIP)
The Routing Information Protocol (RIP) is one of the most widely used intradomain
routing protocols based on the distance-vector routing algorithm.
Hop Count
RIP routers advertise the cost of reaching different networks instead of
reaching other nodes in a theoretical graph. the cost is defined as the number of
hops, which means the number of networks (subnets) a packet needs to travel
through from the source router to the final destination host. Note that the network
in which the source host is connected is not counted in this calculation because the
source host does not use a forwarding table; the packet is delivered to the default
router.

Forwarding Tables
A forwarding table in RIP is a three-column table in which the first column
is the address of the destination network, the second column is the address of the
next router to which the packet should be forwarded, and the third column is the
cost (the number of hops) to reach the destination network.
RIP Implementation
RIP is implemented as a process that uses the service of UDP on the well-
known port number 520. RIP is a daemon process (a process running in the
background), named routed (abbreviation for route daemon and pronounced route-
dee). This means that, although RIP is a routing protocol to help IP route its
datagrams through the AS, the RIP messages are encapsulated inside UDP user
datagrams, which in turn are encapsulated inside IP datagrams. In other words, RIP
runs at the application layer, but creates forwarding tables for IP at the network
later.
RIP Messages
Two RIP processes, a client and a server, like any other processes, need to
exchange messages. RIP-2 defines the format of the message, as shown in Figure.
Part of the message, which we call entry, can be repeated as needed in a message.
Each entry carries the information related to one line in the forwarding table of the
router that sends the message.
RIP has two types of messages: request and response. A request message
is sent by a router that has just come up or by a router that has some time-out
entries. A response (or update) message can be either solicited or unsolicited. A
solicited response message is sent only in answer to a request message. An
unsolicited response message, on the other hand, is sent periodically, every 30
seconds or when there is a change in the forwarding table.
RIP Algorithm
RIP implements the same algorithm as the distance-vector routing
algorithm. However, some changes need to be made to the algorithm to enable a
router to update its forwarding table:
❑ Instead of sending only distance vectors, a router needs to send the whole
contents of its forwarding table in a response message.
❑ The receiver adds one hop to each cost and changes the next router field to the
address of the sending router. We call each route in the modified forwarding table
the received route and each route in the old forwarding table the old route. The
received router selects the old routes as the new ones except in the following three
cases:
1. If the received route does not exist in the old forwarding table, it should be added
to the route.
2. If the cost of the received route is lower than the cost of the old one, the
received
route should be selected as the new one.
3. If the cost of the received route is higher than the cost of the old one, but the
value of the next router is the same in both routes, the received route should be
selected as the new one. This is the case where the route was actually advertised by
the same router in the past, but now the situation has been changed.
The new forwarding table needs to be sorted according to the destination route.
Timers in RIP
RIP uses three timers to support its operation. The periodic timer controls
the advertising of regular update messages. Each router has one periodic timer that
is randomly set to a number between 25 and 35 seconds (to prevent all routers
sending their messages at the same time and creating excess traffic). The timer
counts down; when zero is reached, the update message is sent, and the timer is
randomly set once again.
The expiration timer governs the validity of a route. When a router
receives update information for a route, the expiration timer is set to 180 seconds
for that particular route. Every time a new update for the route is received, the timer
is reset. If there is a problem on an internet and no update is received within the
allotted 180 seconds, the route is considered expired and the hop count of the route
is set to 16, which means the destination is unreachable. Every route has its own
expiration timer.
The garbage collection timer is used to purge a route from the forwarding
table. When the information about a route becomes invalid, the router does not
immediately purge that route from its table. Instead, it continues to advertise the
route with a metric value of 16. At the same time, a garbage collection timer is set
to 120 seconds for that route. When the count reaches zero, the route is purged
from the table. This timer allows neighbors to become aware of the invalidity of a
route prior to purging.
Performance
1. Update Messages. The update messages in RIP have a very simple format and
are sent only to neighbors; they are local.
2. Convergence of Forwarding Tables. RIP uses the distance-vector algorithm,
which can converge slowly if the domain is large, but, since RIP allows only 15 hops
in a domain (16 is considered as infinity), there is normally no problem in
convergence.
3. Robustness. The calculation of the forwarding table depends on information
received from immediate neighbors, which in turn receive their information from
their own neighbors. If there is a failure or corruption in one router, the problem will
be propagated to all routers and the forwarding in each router will be affected.
3.8.4 Open Shortest Path First (OSPF)
Open Shortest Path First (OSPF) is also an intradomain routing protocol
like RIP, but it is based on the link-state routing protocol OSPF is an open protocol,
which means that the specification is a public document.
Metric
In OSPF, like RIP, the cost of reaching a destination from the host is
calculated from the source router to the destination network. However, each link
(network) can be assigned a weight based on the throughput, round-trip time,
reliability, and so on. An interesting point about the cost in OSPF is that different
service types (TOSs) can have different weights as the cost.

Forwarding Tables
Each OSPF router can create a forwarding table after finding the shortest-
path tree between itself and the destination using Dijkstra’s algorithm. Figure shows
the forwarding tables for the simple AS. Comparing the forwarding tables for the
OSPF and RIP in the same AS, we find that the only difference is the cost values.
Areas
Compared with RIP, which is normally used in small ASs, OSPF was
designed to be able to handle routing in a small or large autonomous system.
Although flooding may not create a problem in a small AS, it may have created a
huge volume of traffic in a large AS. To prevent this, the AS needs to be divided into
small sections called areas. Each area acts as a small independent domain for
flooding LSPs. In other words, OSPF uses another level of hierarchy in routing: the
first level is the autonomous system, the second is the area.
One of the areas in the AS is designated as the backbone area,
responsible for gluing the areas together. The routers in the backbone area are
responsible for passing the information collected by each area to all other areas. In
this way, a router in an area can receive all LSPs generated in other areas. For the
purpose of communication, each area has an area identification. The area
identification of the backbone is zero.

Link-State Advertisement
OSPF is based on the link-state routing algorithm, which requires that a
router advertise the state of each link to all neighbors for the formation of the LSDB.
we need different types of advertisements, each capable of advertising different
situations. We can have five types of link-state advertisements: router link, network
link, summary link to network, summary link to AS border router, and external link.
Router link- A router link advertises the existence of a router as a node. A transient
link announces a link to a transient network, a network that is connected to the rest
of the networks by one or more routers. This type of advertisement should define
the address of the transient network and the cost of the link. A stub link advertises a
link to a stub network, a network that is not a through network. Again, the
advertisement should define the address of the network and the cost. A point-to-
point link should define the address of the router at the end of the point-to-point
line and the cost to get there.
Network link-A network link advertises the network as a node. However, since a
network cannot do announcements itself (it is a passive entity), one of the routers is
assigned as the designated router and does the advertising.
Summary link to network-This is done by an area border router; it advertises the
summary of links collected by the backbone to an area or the summary of links
collected by the area to the backbone
Summary link to AS-This is done by an AS router that advertises the summary links
from other ASs to the backbone area of the current AS, information which
later can be disseminated to the areas so that they will know about the networks in
other ASs.
External link. This is also done by an AS router to announce the existence of a single
network outside the AS to the backbone area to be disseminated into the areas.
OSPF Implementation
OSPF is implemented as a program in the network layer, using the service
of the IP for propagation. An IP datagram that carries a message from OSPF sets
the value of the protocol field to 89.
OSPF Messages
OSPF is a very complex protocol; it uses five different types of messages.
The hello message (type 1) is used by a router to introduce itself to the neighbors
and announce all neighbors that it already knows. The database description
message (type 2) is normally sent in response to the hello message to allow a newly
joined router to acquire the full LSDB. The linkstate request message (type 3) is sent
by a router that needs information about a specific LS. The link-state update
message (type 4) is the main OSPF message used for building the LSDB. The link-
state acknowledgment message (type 5) is used to create reliability in OSPF; each
router that receives a link-state update message needs to acknowledge it.
OSPF Algorithm
OSPF implements the link-state routing algorithm we discussed in the
previous section. However, some changes and augmentations need to be added to
the algorithm:
❑ After each router has created the shortest-path tree, the algorithm needs to use it
to create the corresponding routing algorithm.
❑ The algorithm needs to be augmented to handle sending and receiving all five
types of messages.
Performance
Update Messages. The link-state messages in OSPF have a somewhat complex
format. They also are flooded to the whole area. If the area is large, these
messages may create heavy traffic and use a lot of bandwidth.
❑ Convergence of Forwarding Tables. When the flooding of LSPs is completed,
each router can create its own shortest-path tree and forwarding table; convergence
is fairly quick. However, each router needs to run Dijkstra’s algorithm, which may
take some time.
OSPF MESSAGE FORMAT
3.8.5 Border Gateway Protocol Version 4 (BGP4)
The Border Gateway Protocol version 4 (BGP4) is the only interdomain
routing protocol used in the Internet today. BGP4 is based on the path-vector
algorithm.
A variation of BGP4, called external BGP (eBGP), on each border router (the one at
the edge of each AS which is connected to a router at another AS). We then install
the second variation of BGP, called internal BGP (iBGP), on all routers. This means
that the border routers will be running three routing protocols (intradomain, eBGP,
and iBGP), but other routers are running two protocols (intradomain and iBGP). We
discuss the effect of each BGP variation separately.
Operation of External BGP (eBGP)
We can say that BGP is a kind of point-to-point protocol. When the
software is installed on two routers, they try to create a TCP connection using the
well-known port 179. The two routers that run the BGP processes are called BGP
peers or BGP speakers
The eBGP variation of BGP allows two physically connected border routers
in two different ASs to form pairs of eBGP speakers and exchange messages. The
routers that are eligible in our example in Figure form three pairs: R1-R5, R2-R6,
and R4- R9. The connection between these pairs is established over three physical
WANs (N5, N6, and N7). Each logical connection in BGP parlance is referred to as a
session. This means that we need three sessions in our example, For example,
message number 1 is sent by router R1 and tells router R5 that N1, N2, N3, and N4
can be reached through router R1 (R1 gets this information from the corresponding
intradomain forwarding table). Router R5 can now add these pieces of information
at the end of its forwarding table. When R5 receives any packet destined for these
four networks, it can use its forwarding table and find that the next router is R1.
There are two problems that need to be addressed:
1. Some border routers do not know how to route a packet destined for nonneighbor
ASs. For example, R5 does not know how to route packets destined for networks in
AS3 and AS4. Routers R6 and R9 are in the same situation as R5: R6 does not know
about networks in AS2 and AS4; R9 does not know about networks in AS2 and AS3.
2. None of the nonborder routers know how to route a packet destined for any
networks in other ASs.
To address the above two problems, we need to allow all pairs of routers (border or
nonborder) to run the second variation of the BGP protocol, iBGP.
Operation of Internal BGP (iBGP)
The iBGP protocol is similar to the eBGP protocol in that it uses the service
of TCP on the well-known port 179, but it creates a session between any possible
pair of routers inside an autonomous system. First, if an AS has only one router,
there cannot be an iBGP session. For example, we cannot create an iBGP session
inside AS2 or AS4 in our internet. Second, if there are n routers in an autonomous
system, there should be [n × (n − 1) / 2] iBGP sessions in that autonomous system
(a fully connected mesh) to prevent loops in the system.
The first message (numbered 1) is sent by R1 announcing that networks
N8 and N9 are reachable through the path AS1-AS2, but the next router is R1. This
message is sent, through separate sessions, to R2, R3, and R4. Routers R2, R4, and
R6 do the same thing but send different messages to different destinations. The
interesting point is that, at this stage, R3, R7, and R8 create sessions with their
peers, but they actually have no message to send. The updating process does not
stop here. For example, after R1 receives the update message from R2, it combines
the reachability information about AS3 with the reachability information it already
knows about AS1 and sends a new update message to R5. Now R5 knows how to
reach networks in AS1 and AS3. The process continues when R1 receives the update
message from R4.
Finalized BGP path tables
Forwarding tables after injection from BGP

Path Attributes
In both intradomain routing protocols (RIP or OSPF), a destination is
normally associated with two pieces of information: next hop and cost. The first one
shows the address of the next router to deliver the packet; the second defines the
cost to the final destination. Interdomain routing is more involved and naturally
needs more information about how to reach the final destination. In BGP these
pieces are called path attributes. BGP allows a destination to be associated with up
to seven path attributes. Path attributes are divided into two broad categories: well-
known and optional. A well-known attribute must be recognized by all routers; an
optional attribute need not be.
ORIGIN (type 1) .
AS-PATH (type 2).
NEXT-HOP (type 3).
MULT-EXIT-DISC (type 4).
LOCAL-PREF (type 5).
ATOMIC-AGGREGATE (type 6).
AGGREGATOR (type 7).
Route Selection
A route in BGP has some attributes attached to it and it may come from
an eBGP session or an iBGP session. Figure shows the flow diagram as used by
common implementations. The router extracts the routes which meet the criteria in
each step. If only one route is extracted, it is selected and the process stops;
otherwise, the process continues with the next step. Note that the first choice is
related to the LOCAL-PREF attribute, which reflects the policy imposed by the
administration on the route.
Messages
BGP uses four types of messages for communication between the BGP
speakers across the ASs and inside an AS: open, update, keepalive, and notification
All BGP packets share the same common header.
❑ Open Message. To create a neighborhood relationship, a router running BGP
opens a TCP connection with a neighbor and sends an open message.
❑ Update Message. The update message is the heart of the BGP protocol. It is used
by a router to withdraw destinations that have been advertised previously, to
announce a route to a new destination, or both.
❑ Keepalive Message. The BGP peers that are running exchange keepalive
messages regularly (before their hold time expires) to tell each other that they are
alive.
❑ Notification. A notification message is sent by a router whenever an error
condition is detected or a router wants to close the session.
Section 3.9
MULTICAST ROUTING
3.9.1 Concepts of Unicast, Multicast, Broadcast
3.9.2 Applications of Multicast
3.9.3 Optimal Routing Protocols
3.9.4 Multicast Routing Protocols
3.9.4.1 MOSPF
3.9.4.2 DVMRP
3.9.4.3 CBT
3.9.4.4 PIM
3.9 MULTICAST ROUTING PROTOCOLS
3.9.1 Concepts of unicast, multicast, or broadcast
A message can be unicast, multicast, or broadcast.
Unicasting
In unicast communication, there is one source and one destination. The
relationship between the source and the destination is one-to-one.
In this type of communication, both the source and destination addresses,
in the IP datagram, are the unicast addresses assigned to the hosts (or host
interfaces, to be more exact). In Figure, a unicast packet starts from the source S1
and passes through routers to reach the destination D1.

In unicasting when a router receives a packet, it forwards the packet


through only one of its interfaces (the one belonging to the optimum path) as
defined in the routing table.
The router may discard the packet if it cannot find the destination address
in its routing table.
Multicasting

In multicast communication, there is one source and a group of


destinations. The relationship is one-to-many. In this type of communication, the
source address is a unicast address, but the destination address is a group address,
which defines one or more destinations. The group address identifies the members
of the group.
A multicast packet starts from the source S1 and goes to all destinations that belong
to group G1. In multicasting, when a router receives a packet, it may forward it
through several of its interfaces.
Broadcasting
In broadcast communication, the relationship between the source and the
destination is one-to-all.
There is only one source, but all the other hosts are the destinations.
The Internet does not explicitly support broadcasting because of the huge amount
of traffic it would create and because of the bandwidth it would need.
Imagine the traffic generated in the Internet if one person wanted to send a
message to everyone else connected to the Internet.

Multicasting starts with one single packet from the source that is duplicated by the
routers. The destination address in each packet is the same for all duplicates. Note
that only one single copy of the packet travels between any two routers.
In multiple unicasting, several packets start from the source. If there are five
destinations, for example, the source sends five packets, each with a different
unicast destination address.
There may be multiple copies traveling between two routers. For example, when a
person sends an e-mail message to a group of people, this is multiple unicasting.
The e-mail software creates replicas of the message, each with a different
destination address and sends them one by one. This is not multicasting; it is
multiple unicasting.
3.9.2 Applications
Multicasting has many applications such as access to distributed databases,
information dissemination, teleconferencing, and distance learning.
(i) Access to Distributed Databases
Most of the large databases are distributed. That is, the information is stored in
more than one location, usually at the time of production. The user who needs to
access the database does not know the location of the information. A user's request
is multicast to all the database locations, and the location that has the information
responds.
(ii) Information Dissemination
Businesses often need to send information to their customers. If the nature of the
information is the same for each customer, it can be multicast. In this way a
business can send one message that can reach many customers. For example, a
software update can be sent to all purchasers of a particular software package.
(iii) Dissemination of News
News can be easily disseminated through multicasting. One single message can be
sent to those interested in a particular topic. For example, the statistics of the
championship high school basketball tournament can be sent to the sports editors of
many newspapers.

(iv) Teleconferencing
Teleconferencing involves multicasting. The individuals attending a teleconference all
need to receive the same information at the same time. Temporary or permanent
groups can be formed for this purpose. For example, an engineering group that
holds meetings every Monday morning could have a permanent group while the
group that plans the holiday party could form a temporary group.

(v) Distance Learning


One growing area in the use of multicasting is distance learning. Lessons taught by
one single professor can be received by a specific group of students. This is
especially convenient for those students who find it difficult to attend classes on
campus.
3.9.3 Optimal Multicast Routing
The idea of optimal routing is first discussed common in all multicast protocols. Then
the overview of multicast routing protocols is given.
Optimal Routing: Shortest Path Trees
The process of optimal interdomain routing eventually results in the finding of the
shortest path tree.
The root of the tree is the source, and the leaves are the potential destinations.
The path from the root to each destination is the shortest path.
The number of trees and the formation of the trees in unicast and multicast routing
are different.
Unicast Routing In unicast routing, when a router receives a packet to forward, it
needs to find the shortest path to the destination of the packet. The router consults
its routing table for that particular destination. The next-hop entry corresponding to
the destination is the start of the shortest path. The router knows the shortest path
for each destination, which means that the router has a shortest path tree to
optimally reach all destinations. In other words, each line of the routing table is a
shortest path; the whole routing table is a shortest path tree.
In unicast routing, each router needs only one shortest path tree to forward a
packet; however, each router has its own shortest path tree. The figure shows the
details of the routing table and the shortest path tree for router R1. Each line in the
routing table corresponds to one path from the root to the corresponding network.
The whole table represents the shortest path tree.
Multicast Routing When a router receives a multicast packet, the situation is
different from when it receives a unicast packet. A multicast packet may have
destinations in more than one network. Forwarding of a single packet to members of
a group requires a shortest path tree. If we have n groups, we may need n shortest
path trees. Two approaches have been used to solve the problem: source-based
trees and group-shared trees.
Source-Based Tree. In the source-based tree approach, each router needs to have
one shortest path tree for each group. The shortest path tree for a group defines
the next hop for each network that has loyal member(s) for that group. In the figure
we assume that we have only five groups in the domain: G1, G2, G3, G4, and G5.

At the moment G1 has loyal members in four networks, G2 in three, G3 in two, G4 in


two, and G5 in two. There is one shortest path tree for each group; therefore there
are five shortest path trees for five groups.
If router R1 receives a packet with destination address G1, it needs to send a copy
of the packet to the attached network, a copy to router R2, and a copy to router R4
so that all members of G1 can receive a copy.
In this approach, if the number of groups is m, each router needs to have m
shortest path trees, one for each group. The complexity of the routing table if we
have hundreds or thousands of groups is more. However different protocols manage
to alleviate (make less severe) the situation.

Group-Shared Tree. In the group-shared tree approach, instead of each router


having m shortest path trees, only one designated router, called the center core, or
rendezvous router, takes the responsibility of distributing multicast traffic. The core
has m shortest
path trees in its routing table. The rest of the routers in the domain have none. If a
router receives a multicast packet, it encapsulates the packet in a unicast packet and
sends it to the core router. The core router removes the multicast packet from its
capsule, and consults its routing table to route the packet.
3.9.4 Routing Protocols
The figure shows the taxonomy of the protocols

Taxonomy of common multicast protocols


3.9.4.1 Multicast Link State Routing: MOSPF
In this section multicast link state routing is discussed and its
implementation in the internet, MOSPF.
Multicast Link State Routing: Multicast link state routing is a direct extension of
unicast routing and uses a source-based tree approach. In unicast routing, each
node needs to advertise the state of its links. For multicast routing a node advertises
every group which has any loyal member on the link. The information about the
group comes from IGMP.
Each router running IGMP solicits the hosts on the link to find out the membership
status. When a router receives all these LSPs, it creates n (n is the number of
groups) topologies, from which n shortest path trees are made by using Dijkstra's
algorithm. So each router has a routing table that represents as many shortest path
trees as there are groups.
The only problem with this protocol is the time and space needed to create and save
the many shortest path trees. The solution is to create the trees only when needed.
When a router receives a packet with a multicast destination address, it runs the
Dijkstra algorithm to calculate the shortest path tree for that group. The result can
be cached in case there are additional packets for that destination.
MOSPF: Multicast Open Shortest Path First (MOSPF) protocol is an extension of the
OSPF protocol that uses multicast link state routing to create source-based trees.
The protocol requires a new link state update packet to associate the unicast
address of a host with the group address or addresses the host is sponsoring. This
packet is called the group-membership LSA. In this way, we can include in the tree
only the hosts (using their unicast addresses) that belong to a particular group.
In other words, we make a tree that contains all the hosts belonging to a group, but
we use the unicast address of the host in the calculation. For efficiency, the router
calculates the shortest path trees on demand (when it receives the first multicast
packet). In addition, the tree can be saved in cache memory for future use by the
same source/group pair.
MOSPF is a data-driven protocol; the first time an MOSPF router sees a datagram
with a given source and group address, the router constructs the Dijkstra shortest
path tree.
3.9.4.2 Multicast Distance Vector: DVMRP
In this section multicast distance vector routing is discussed and its implementation
in the Internet, DVMRP.
Multicast Distance Vector Routing: Multicast distance vector routing uses source-
based trees, but the router never actually makes a routing table. When a router
receives a multicast packet, it forwards the packet as though it is consulting a
routing table. After its use (after a packet is forwarded) the table is destroyed. To
accomplish this, the multicast distance vector algorithm uses a process based on
four decision-making strategies. Each strategy is built on its predecessor.

Flooding. In flooding a router receives a packet and, without even looking


at the destination group address, sends it out from every interface except the one
from which it was received. Flooding accomplishes the first goal of multicasting:
every network with active members receives the packet. This is a broadcast, not a
multicast. There is another problem: it creates loops. A packet that has left the
router may come back again from another interface or the same interface and be
forwarded again. Some flooding protocols keep a copy of the packet for a while and
discard any duplicates to avoid loops. The next strategy, reverse path forwarding,
corrects this defect. Flooding broadcasts packets, but creates loops in the systems.

Reverse Path Forwarding (RPF). RPF is a modified flooding strategy. To


prevent loops, only one copy is forwarded; the other copies are dropped. In RPF, a
router forwards only the copy that has traveled the shortest path from the source to
the router. To find this copy, RPF uses the unicast routing table. The router receives
a packet and extracts the source address (a unicast address). It consults its unicast
routing table as though it wants to send a packet to the source address. The
routing table tells the router the next hop.
If the multicast packet has just come from the hop defined in the table, the packet
has traveled the shortest path from the source to the router because the shortest
path is reciprocal in unicast distance vector routing protocols. If the path from A to B
is the shortest, then it is also the shortest from B to A. The router forwards the
packet if it has traveled from the shortest path; it discards it otherwise. This strategy
prevents loops because there is always one shortest path from the source to the
router.
If a packet leaves the router and comes back again, it has not traveled the shortest
path. To make the point clear, let us look at the figure.
The shortest path tree as calculated by routers R1, R2, and R3 is shown by a thick
line. When R1 receives a packet from the source through the interface ml, it
consults its routing table and finds that the shortest path from RI to the source is
through interface m1. The packet is forwarded. However, if a copy of the packet has
arrived through interface m2, it is discarded because m2 does not define the
shortest path from R1 to the source. It is the same with R2 and R3.
If a copy of a packet that arrives at the m1 interface of R3, travels through R6, R5,
R2, and then enters R3 through interface m1. This interface is the correct interface
for R3. The upstream routers toward the source always discard a packet that has not
gone through the shortest path, thus preventing confusion for the downstream
routers.
Reverse Path Broadcasting (RPB): RPF guarantees that each network receives a
copy of the multicast packet without formation of loops. However, RPF does not
guarantee that each network receives only one copy; a network may receive two or
more copies. The reason is that RPF is not based on the destination address (a
group address); forwarding is based on the source address.

Problem with RPF


Net3 in this figure receives two copies of the packet even though each router just
sends out one copy from each interface. There is duplication because a tree has not
been made; instead of a tree we have a graph. Net3 has two parents: routers R2
and R4.
To eliminate duplication, only one parent router is defined for each network. A
network can receive a multicast packet from a particular source only through a
designated parent router. For each source, the router sends the packet only out of
those interfaces for which it is the designated parent. This policy is called reverse
path broadcasting (RPB). RPB guarantees that the packet reaches every network
and that every network receives only one copy. Figure shows the difference between
RPF and RPB.
RPF versus RPB
The designated parent router can be the router with the shortest path to the source.
Because routers periodically send updating packets to each other (in RIP), they can
easily determine which router in the neighborhood has the shortest path to the
source, If more than one router qualifies, the router with the smallest IP address is
selected.
Reverse Path Multicasting (RPM): RPB does not multicast the packet, it
broadcasts it. This is not efficient. To increase efficiency, the multicast packet must
reach only those networks that have active members for that particular group. This
is called reverse path multicasting (RPM). To convert broadcasting to multicasting,
the protocol uses two procedures, pruning and grafting. Figure shows the idea of
pruning and grafting
The designated parent router of each network is responsible for holding the
membership information. The process starts when a router connected to a network
finds that there is no interest in a multicast packet. The router sends a prune
message to the upstream router so that it can exclude the corresponding interface.
That is, the upstream router can stop sending multicast messages for this group
through that interface. Now if this router receives prune messages from all
downstream routers, it, in turn, sends a prune message to its upstream router.
If a leaf router (a router at the bottom of the tree) has sent a prune message but
suddenly realizes, through IGMP, that one of its networks is again interested in
receiving the multicast packet then it can send a graft message. The graft message
forces the upstream router to resume sending the multicast messages.

DVMRP: Distance Vector Multicast Routing Protocol (DVMRP) is an implementation of


multicast distance vector routing. It is a source-based routing protocol, based on
RIP.
3.9.4.3 Core-Based Tree: CBT
The Core-Based Tree (CBT) protocol is a group-shared protocol that uses a core as
the root of the tree. The autonomous system is divided into regions, and a core
(center router or rendezvous router) is chosen for each region.

Formation of the Tree: After the rendezvous point is selected; every router is
informed of the unicast address of the selected router. Each router then sends a
unicast join message (similar to a grafting message) to show that it wants to join
the group. This message passes through all routers that are located between the
sender and the rendezvous router. Each intermediate router extracts the necessary
information from the message, such as the unicast address of the sender and the
interface through which the packet has arrived, and forwards the message to the
next router in the path. When the rendezvous router has received all join messages
from every member of the group, the tree is formed. Now every router knows its
upstream router (the router that leads to the root) and the downstream router (the
router that leads to the leaf).
If a router wants to leave the group, it sends a leave message to its upstream
router. The upstream router removes the link to that router from the tree and
forwards the message to its upstream router and so on. Figure shows a group-
shared tree with its rendezvous router.
There are two differences between DVMRP and MOSPF, on one hand, and CBT, on
the other. First, the tree for the first two is made from the root up; the tree for CBT
is formed from the leaves down. Second, in DVMRP, the tree is first made
(broadcasting) and then pruned; in CBT, there is no tree at the beginning; the
joining (grafting) gradually makes the tree.
Sending Multicast Packets: After formation of the tree, any source (belonging to
the group or not) can send a multicast packet to all members of the group. It simply
sends the packet to the rendezvous router, using the unicast address of the
rendezvous router; the rendezvous router distributes the packet to all members of
the group. Figure shows how a host can send a multicast packet to all members of
the group. The source host can be any of the hosts inside the shared tree or any
host outside the shared tree.
3.9.4.4 Protocol Independent Multicast: PIM
Protocol Independent Multicast (PIM) is the name given to two independent
multicast routing protocols: Protocol Independent Multicast, Dense Mode (PIM-DM)
and Protocol Independent Multicast, Sparse Mode (PIM-SM). Both protocols are
unicast protocol- dependent.

PIM-DM: PIM-DM is used when there is a possibility that each router is involved in
multicasting (dense mode). In this environment, the use of a protocol that
broadcasts the packet is justified because almost all routers are involved in the
process.
PIM-DM is a source-based tree routing protocol that uses RPF and pruning and
grafting strategies for multicasting. Its operation is like that of DVMRP; however,
unlike DVMRP, it does not depend on a specific unicasting protocol. It assumes that
the autonomous system is using a unicast protocol and each router has a table that
can find the outgoing interface that has an optimal path to a destination. This
unicast protocol can be a distance vector protocol (RIP) or link state protocol
(OSPF).
PIM-SM: PIM-SM is used when there is a slight possibility that each router is
involved in multicasting (sparse mode). In this environment, the use of a protocol
that broadcasts the packet is not justified; a protocol such as CBT that uses a group-
shared tree is more appropriate.
PIM-SM is a group-shared tree routing protocol that has a rendezvous point (RP) as
the source of the tree. Its operation is like CBT; however, it is simpler because it
does not require acknowledgment from a join message. In addition, it creates a
backup set of RPs for each region to cover RP failures. One of the characteristics of
PIM-SM is that it can switch from a group- shared tree strategy to a source-based
tree strategy when necessary. This can happen if there is a dense area of activity far
from the RP. That area can be more efficiently handled with a source- based tree
strategy instead of a group-shared tree strategy.
Multicast Backbone :MBONE
Multimedia and real-time communications have increased the need for multicasting
in the Internet. However, only a small fraction of Internet routers are multicast
routers. In other words, a multicast router may not find another multicast router in
the neighborhood to forward the multicast packet.
A logical tunnel is established by encapsulating the multicast packet inside a unicast
packet. The multicast packet becomes the payload (data) of the unicast packet. The
intermediate (non multicast) routers forward the packet as unicast routers and
deliver the packet from one island to another. It's as if the unicast routers do not
exist and the two multicast routers are neighbors. Figure shows the concept. So far
the only protocol that supports MBONE and tunneling is DVMRP.

MBONE
Section 3.10
IPv6 ADDRESS
3.10.1 Representation of IPv6
3.10.2 Address Space
3.10.3 Auto Configuration
3.10.4 Renumbering
3.10 IPv6 ADDRESSING
The main reason for migration from IPv4 to IPv6 is the small size of the address
space in IPv4. An IPv6 address is 128 bits or 16 bytes (octets) long, four times the
address length in IPv4.
3.10.1 Representation
A computer normally stores the address in binary, but it is clear that 128 bits cannot
easily be handled by humans. The following shows two of these notations: binary
and colon hexadecimal. Binary notation is used when the addresses are stored in a
computer. The colon hexadecimal notation (or colon hex for short) divides the
address into eight sections, each made of four hexadecimal digits separated by
colons.

Although an IPv6 address, even in hexadecimal format, is very long, many of the
digits are zeros. In this case, we can abbreviate the address. The leading zeros of a
section can be omitted. Using this form of abbreviation, 0074 can be written as 74,
000F as F, and 0000 as 0. Note that 3210 cannot be abbreviated. Further
abbreviation, often called zero compression, can be applied to colon hex notation if
there are consecutive sections consisting of zeros only. We can remove all the zeros
and replace them with a double semicolon. Note that this type of abbreviation is
allowed only once per address. If there is more than one run of zero sections, only
one of them can be compressed.

Mixed Notation
Sometimes we see a mixed representation of an IPv6 address: colon hex
and dotted decimal notation. This is appropriate during the transition period in which
an IPv4 address is embedded in an IPv6 address (as the rightmost 32 bits). We can
use the colon hex notation for the leftmost six sections and four-byte dotted-decimal
notation instead of the rightmost two sections. However, this happens when all or
most of the leftmost sections of the IPv6 address are 0s. For example, the address
(::130.24.24.18) is a legitimate address in IPv6, in which the zero compression
shows that all 96 leftmost bits of the address are zeros.
CIDR Notation
IPv6 uses hierarchical addressing. For this reason, IPv6 allows slash or
CIDR notation. For example, the following shows how we can define a prefix of 60
bits using CIDR.
Address Space
The address space of IPv6 contains 2128 addresses. This address space is
296 times the IPv4 address—definitely no address depletion. The size of the space is

Each person can have 288 addresses to use. Address depletion in this version is
impossible.
Three Address Types
In IPv6, a destination address can belong to one of three categories:
unicast, anycast, and multicast.
Unicast Address
A unicast address defines a single interface (computer or router). The
packet sent to a unicast address will be routed to the intended recipient.
Anycast Address
An anycast address defines a group of computers that all share a single
address. A packet with an anycast address is delivered to only one member of the
group, the most reachable one. An anycast communication is used, for example,
when there are several servers that can respond to an inquiry. The request is sent to
the one that is most reachable. The hardware and software generate only one copy
of the request; the copy reaches only one of the servers. IPv6 does not designate a
block for anycasting; the addresses are assigned from the unicast block.
Multicast Address
A multicast address also defines a group of computers. However, there is a
difference between anycasting and multicasting. In anycasting, only one copy of the
packet is sent to one of the members of the group; in multicasting each member of
the group receives a copy. IPv6 has designated a block for multicasting from which
the same address is assigned to the members of the group. It is interesting that
IPv6 does not define broadcasting, even in a limited version. IPv6 considers
broadcasting as a special case of multicasting.
Address Space Allocation
Like the address space of IPv4, the address space of IPv6 is divided into
several blocks of varying size and each block is allocated for a special purpose. Most
of the blocks are still unassigned and have been set aside for future use. Table
shows only the assigned blocks. In this table, the last column shows the fraction
each block occupies in the whole address space.

Global unicast address


CIDR for the block is 2000::/3, which means that the three leftmost bits
are the same for all addresses in this block (001). An address in this block is divided
into three parts: global routing prefix (n bits), subnet identifier (m bits), and
interface identifier (q bits).
The global routing prefix is used to route the packet through the Internet
to the organization site, such as the ISP that owns the block. The next m bits (16
bits based on recommendation) define a subnet in an organization. This means that
an organization can have up to 216 = 65,536 subnets, which is more than enough.
The last q bits (64 bits based on recommendation) define the interface identifier.
The interface identifier is similar to host id in IPv4 addressing.
The IPv6 addressing allows the relationship between IP address and link layerv
address . Two common link layer addressing schemes can be considered for this
purpose: the 64-bit extended unique identifier (EUI-64) defined by IEEE and the 48-
bit link-layer address defined by Ethernet.
Mapping EUI-64
To map a 64-bit physical address, the global/local bit of this format needs
to be changed from 0 to 1 (local to global) to define an interface address, as shown
in Figure

Mapping Ethernet MAC Address


Mapping a 48-bit Ethernet address into a 64-bit interface identifier is more involved.
We need to change the local/global bit to 1 and insert an additional 16 bits. The
additional 16 bits are defined as 15 ones followed by one zero, or FFFE16.

Example
Using the format we defined for Ethernet addresses, find the interface
identifier if the Ethernet physical address is (F5-A9-23-14-7A-D2)16.
Solution
We only need to change the seventh bit of the first octet from 0 to 1,
insert two octets FFFE16 and change the format to colon hex notation. The result is
F7A9:23FF:FE14:7AD2 in colon hex.

Example
An organization is assigned the block 2000:1456:2474/48. What is the IPv6 address
of an interface in the third subnet if the IEEE physical address of the computer is
(F5-A9-23-14-7A-D2)16?
Solution
The interface identifier for this interface is F7A9:23FF:FE14:7AD2 . If we
append this identifier to the global prefix and the subnet identifier, we get
2000:1456:2474:0003:F7A9:23FF:FE14:7AD2/128
Special Addresses

The unspecified address is a sub block containing only one address, which is used
during bootstrap when a host does not know its own address and wants to send an
inquiry to find it. The loopback address also consists of one address. A compatible
address is an address of 96 bits of zero followed by 32 bits of IPv4 address. It is
used when a computer using IPv6 wants to send a message to another computer
using IPv6. A mapped address is used when a computer already migrated to version
6 wants to send an address to a computer still using version 4.
Other Assigned Blocks
A sub block in a unique local unicast block can be privately created and
used by a site. The packet carrying this type of address as the destination address is
not expected to be routed. This type of address has the identifier 1111 110, the next
bit can be 0 or 1 to define how the address is selected (locally or by an authority).
The next 40 bits are selected by the site using a randomly generated number of
length 40 bits. This means that the total of 48 bits defines a subblock that looks like
a global unicast address.
The second block, designed for private addresses, is the link local block. A subblock
in this block can be used as a private address in a network. Multicast addresses are
used to define a group of hosts instead of just one. In IPv6 a large block of
addresses are assigned for multicasting. All these addresses use the prefix
11111111. The second field is a flag that defines the group address as either
permanent or transient. A permanent group address is defined by the Internet
authorities and can be accessed at all times. A transient group address, on the other
hand, is used only temporarily.

3.10.3 Autoconfiguration
One of the interesting features of IPv6 addressing is the autoconfiguration of hosts.
In IPv4, the host and routers are originally configured manually by the network
manager. However, the Dynamic Host Configuration Protocol, DHCP, can be used to
allocate an IPv4 address to a host that joins the network. In IPv6, DHCP protocol
can still be used to allocate an IPv6 address to a host, but a host can also configure
itself.
When a host in IPv6 joins a network, it can configure itself using the following
process:
1. The host first creates a link local address for itself. This is done by taking the 10-
bit link local prefix (1111 1110 10), adding 54 zeros, and adding the 64-bit interface
identifier, which any host knows how to generate from its interface card. The result
is a 128-bit link local address.
2. The host then tests to see if this link local address is unique and not used by
other hosts. Since the 64-bit interface identifier is supposed to be unique, the link
local address generated is unique with a high probability. However, to be sure, the
host sends a neighbor solicitation message and waits for a neighbor advertisement
message. If any host in the subnet is using this link local address, the process fails
and the host cannot autoconfigure itself; it needs to use other means such as DHCP
for this purpose.
3. If the uniqueness of the link local address is passed, the host stores this address
as its link local address (for private communication), but it still needs a global
unicast address. The host then sends a router solicitation message to a local router.
If there is a router running on the network, the host receives a router advertisement
message that includes the global unicast prefix and the subnet prefix that the host
needs to add to its interface identifier to generate its global unicast address. If the
router cannot help the host with the configuration, it informs the host in the router
advertisement message (by setting a flag). The host then needs to use other means
for configuration.
Example
Assume a host with Ethernet address (F5-A9-23-11-9B-E2)16 has joined
the network. What would be its global unicast address if the global unicast prefix of
the organization is
3A21:1216:2165 and the subnet identifier is A245:1232?
Solution
The host first creates its interface identifier as F7A9:23FF:FE11:9BE2 using
the Ethernet address read from its card. The host then creates its link local address
as:
FE80::F7A9:23FF:FE11:9BE2
Assuming that this address is unique, the host sends a router solicitation message
and receives the router advertisement message that announces the combination of
global unicast prefix and the subnet identifier as 3A21:1216:2165:A245:1232. The
host then appends its interface identifier to this prefix to find and store its global
unicast address as:
3A21:1216:2165:A245:1232:F7A9:23FF:FE11:9BE2

3.10.4 Renumbering
To allow sites to change the service provider, renumbering of the address
prefix (n) was built into IPv6 addressing. Each site is given a prefix by the service
provider to which it is connected. If the site changes the provider, the address prefix
needs to be changed. A router to which the site is connected can advertise a new
prefix and let the site use the old prefix for a short time before disabling it. In other
words, during the transition period, a site has two prefixes. The main problem in
using the renumbering mechanism is the support of the DNS, which needs to
propagate the new addressing associated with a domain name. A new protocol for
DNS, called Next Generation DNS, is under study to provide support for this
mechanism.
Section 3.11
TRANSITION FROM
IPv4 TO IPv6
3.11 TRANSITION FROM IPv4 TO IPv6
Although we have a new version of the IP protocol, how can we make the transition
to stop using IPv4 and start using IPv6? The first solution that comes to mind is to
define a transition day on which every host or router should stop using the old
version and start using the new version. However, this is not practical; because of
the huge number of systems in the Internet, the transition from IPv4 to IPv6 cannot
happen suddenly. It will take a considerable amount of time before every system in
the Internet can move from IPv4 to IPv6. The transition must be smooth to prevent
any problems between IPv4 and IPv6 systems.
Strategies
Three strategies have been devised for transition: dual stack, tunneling,
and header translation. One or all of these three strategies can be implemented
during the transition period.
Dual Stack
It is recommended that all hosts, before migrating completely to version
6, have a dual stack of protocols during the transition. In other words, a station
must run IPv4 and IPv6 simultaneously until all the Internet uses IPv6. See Figure
for the layout of a dual-stack configuration. To determine which version to use when
sending a packet to a destination, the source host queries the DNS. If the DNS
returns an IPv4 address, the source host sends an IPv4 packet. If the DNS returns
an IPv6 address, the source host sends an IPv6 packet.

Tunneling
Tunneling is a strategy used when two computers using IPv6 want to
communicate with each other and the packet must pass through a region that uses
IPv4. To pass through this region, the packet must have an IPv4 address. So the
IPv6 packet is encapsulated in an IPv4 packet when it enters the region, and it
leaves its capsule when it exits the region. It seems as if the IPv6 packet enters a
tunnel at one end and emerges at the other end. To make it clear that the IPv4
packet is carrying an IPv6 packet as data, the protocol value is set to 41. Tunneling
is shown in Figure.
Header Translation
Header translation is necessary when the majority of the Internet has
moved to IPv6 but some systems still use IPv4. The sender wants to use IPv6, but
the receiver does not understand IPv6. Tunneling does not work in this situation
because the packet must be in the IPv4 format to be understood by the receiver. In
this case, the header format must be totally changed through header translation.
The header of the IPv6 packet is converted to an IPv4 header.

During the transition a host may need to use two addresses, IPv4 and IPv6. When
the transition is complete, IPv4 addresses should disappear. The DNS servers need
to be ready to map a host name to either address type during the transition, but the
IPv4 directory will disappear after all hosts in the world have migrated toIPv6.
Links for online Lecture Videos and
Lecture PPTs
LINKS FOR ONLINE LECTURE VIDEOS AND LECTURE
SLIDES

Link for Video


S.NO Topic Link for Lecture Slides
Lecture

Concepts of IP https://youtu.be/zQ https://www.slideshare.net/J


1
Addressing WGGGEBigo aiGanesh11/
https://www.youtu
be.com/watch?v=c https://www.slideshare.net/J
Routing and its
2. wehPM9RJak&list= aiGanesh11/
concepts
PLA2UBjeRwle3Alqs
rF-7G2techJbaJ9Mf
Assignments
Assignment Questions
Unit - III
Q.N Question Course K-Level
o Outcome
1. Simulate an environment in CSICO Packet Tracer
with the following Subnet Requirements.
Network 1 – 200 hosts
Network 2 – 500 Hosts CO3 K3
Network 3 – 100 Hosts
Consider the Address space 10.0.0.0. Configure
the network 1 with Distance Vector Algorithm,
Network 2 and 3 with Link State Algorithm. Try
exchanging the packets between each networks
2. Configure a server in network 2 and make sure
that hosts in other 2 networks are able to access CO3 K3
the server.
3. Configure a FTP Server in net3 and ensure CO3 K3
that you can share the file to other
networks.
4. Consider the following routing table at an IP router. For CO3 K6
each IP address in Group I identify the correct choice of
the next hop form Group II using the entries from the
routing table below. (13)
Network No. Net Mask Next Hop
128.96.170.0 255.255.254.0 Interface
0
128.96.168.0 255.255.254.0 Interface 1
128.96.166.0 255.255.254.0 R2
128.96.164.0 255.255.252.0 R3
0.0.0.0 Default R4

Group I Group II

i) 128.96.171.92 a) Interface 0

ii) 128.96.167.151 b) Interface 1

iii) 128.96.163.151 c) R2

iv) 128.96.165.121 d) R3

e) R4
Q.N Question Course K-Level
o Outcome
5. Consider a network with 6 routers R1 to R6 connected
with links having weights as shown in the following
diagram. All the routers use the distance vector based
routing algorithm to update their routing tables. Each CO3 K5
router starts with its routing table initialized to contain an
entry for each neighbour with the weight of the respective
connecting link. After all the routing tables stabilize,
which of the links in the network will never be used for
carrying any data? (13)
Part A Q & A (With K - Level and CO)
Part-A Questions & Answers

Q.No Question Course K-


Outcome Level
What is routing?
1. Routing is a process of selecting paths in a CO3 K2
network through which network traffic is sent.
Define an internetwork.
2. A collection of interconnected network is called CO3 K2
an internetwork.
What does routing metric mean?
A routing metric is a unit calculated by a routing
3. CO3 K2
algorithm for selecting or rejecting a routing path
for transferring data/traffic
What are the metrics used in determining
the best path for a routing protocol?
• Bandwidth
• Delay
• Load
4. CO3 K2
• Reliability
• Cost
• Hop count
• MTU
• Ticks
What is multicasting?
Multicasting is the delivery of information to a
5. group of destinations simultaneously using the CO3 K2
most efficient strategy to deliver the messages
over each link of the network only once.
What are different types of multicast
routing?
6. 1. Reverse path multicasting CO3 K2
2. Reverse path broadcasting

What is multicast? What is the motivation


for developing multicast?
Multicasting means delivering the same packet
7. simultaneously to a group of clients. Motivation CO3 K2
for developing multicast is that there are
applications that want to send a packet to more
than one destination hosts.
Part-A Questions & Answers

Q.No Question Course K-


Outcome Level
Define RIP.
RIP is a dynamic protocol used for finding the
8. best route or path from ene-to-end over a CO3 K2
network by using a routing metric/ hop count
algorithm.
What is OSPF?
OSPF protocol is a router protocol used within
9. larger autonomous system networks in CO3 K2
preference to the Routing Information Protocol
(RIP).
What are the features of OSPF?
• Authentication of routing messages
10. CO3 K2
• Additional hierarchy
• Load balancing
Mention any four applications of
multicasting
• Broad casts of audio and video
• Video conferencing
11. CO3 K2
• Shared Applications.
• IGMP is used by multicast routers to
keep track of membership in a multicast group.

Describe the process of routing packets


Routing is the act of moving information across
12. CO3 K2
an internetwork from a source to a destination.

What are the some routing algorithm


types?
The routing types are static, dynamic, flat,
13. hierarchical, host-intelligent, router- intelligent, CO3 K2
intra- domain, inter-domain, link state and
distance vector.
Part-A Questions & Answers

Q.No Question Course K-


Outcome Level
What is a benefit of DHCP?
• Simplicity: clients need to manual
configuration.
• Mobility and hosts: Hosts may move
between networks without reconfiguring.
14. CO3 K2
• Mobility of network: Possible for
internet service providers to reconfigure
customers address transparently.
• Save address space if individual clients
are not always active.
What are the 3 types of routing performed
by BGP?
• Inter-autonomous system routing
15. CO3 K2
• Intra-autonomous system routing
• Pass through autonomous system
routing
What are the different kinds of multicast
routing?
• DVMRP
16. • PIM CO3 K2
• MSDP
• MOSPF
• MBGP
Write the types of PIM.
• PIM Sparse mode
17. • PIM Dense mode CO3 K2
• Bidirectional PIM
• Source Specific Multicast (SSM)
How can the routing be classified?
The routing can be classified as,
18. • Adaptive routing CO3 K2
• Non-adaptive routing.
Part-A Questions & Answers

Q.No Question Course K-


Outcome Level
What are the salient features of IPv6?
Salient features are:
• Efficient and hierarchical addressing
and routing infrastructures.
• IPv6 networks provide auto
19. CO3 K2
configuration capabilities.
• Better support for QOS.
• Large Address space.
• Stateless and stateful address
configuration.
Write the BGP Message types.
• Open
20. • Update CO3 K2
• Notification
• Keep-alive
Part-B Questions

S.No Question Blooms Level CO’s

1 Discuss briefly about RIP and OSPF K3 CO3

Explain the shortest path algorithm with suitable illustrations.


2 K2 CO3
(April/May 2015)

Explain the distance vector routing algorithm. Mention the


3 limitations of the same. (April/May 2015) (May/June 2016) K3 CO3
(Nov/Dec 2015)

Discuss in detail about open source shortest path routing


4 with neat K3 CO3
diagrams. (Nov/Dec 2016)

Discuss in detail about any two multicast routing with neat


5 K3 CO3
sketches. (Nov/Dec 2016) (Nov/Dec 2015)

6 Explain about IPv6? Compare IPv4 and IPv6. (May/June 2016) K3 CO3

7 Discuss the interoperability issues in IPv4 and IPv6 K3 CO3

8 Explain in detail about the distance vector routing protocol K2 CO3

9 Describe in detail about Switching and Forwarding? K3 CO3

10 Explain DVMRP in detail. K3 CO3


Supportive Online
certification Courses
Supportive Online Courses for
22EC503 – Communication Networks

S.no Name of the Course Name of the Duration


Online Platform
1 The Bits and Bytes of Computer Coursera 6 Weeks
Networking
2 Computer Communications Coursera 4 Course
Specializations
Realtime Applications
Realtime Applications

Use the software wireshark and monitor the real time

traffic from your pc/laptop . Try to filter out the

packets related to routing and document your

learning.

Use the command TRACERT and find the route

between your laptop and Domain

RMKCET.AC.IN. infer the intermediate nodes

and prepare a detailed report with your

inference.
Content Beyond Syllabus
Content Beyond Syllabus

Value Added Course related to CoE

CCNA Routing and Switching : Introduction to Networks in Cisco


Networking Academy
Assessment Schedule
Assessment Schedule

S.NO TEST PROPSED DATE ACTUAL DATE

1 Unit Test 1 31.07.24

2 First internal
Assessment Test 23.08.24

3 Unit Test 2 14.09.24

4 Second Internal
Assessment Test 04.10.24

5 Model Examination 04.11.24


Text Book and Reference Books
Text Book and Reference Books
TEXT BOOK:
1. Data Communications and Networking, Behrouz A. Forouzan, McGraw
Hill Education, 5th Ed., 2017.(UNIT I –V)
REFERENCES:
1. Computer Networking- A Top-Down Approach, James F. Kurose,
University of Massachusetts and Amherst Keith Ross, 8th Edition, 2021.

2. Computer Networks, Andrew S. Tanenbaum, Sixth Edition, Pearson,


2021.

3. Data Communications and Computer Networks, P.C. Gupta, Prentice-


Hall of India, 2006.

4. Computer Networks: A Systems Approach, L. L. Peterson and B. S.


Davie, Morgan Kaufmann, 3rd ed., 2003.
Mini Project Ideas
Projects to be Carried out
PROJECT 1
Create a network in simulation environment using CISCO Packet Tracer where the
following task must be performed.
OBJECTIVE:
To configure the network with sufficient network devices and assigning the IP
address with minimal wastage of IP Addresses.
DESCRIPTION:
• Subnet the entire network with class c address space.
• Create a network with above mentioned parameters and Try exchanging the
packets from one network to another network whereas one network used DV
algorithm and another one uses LS Algorithm.
• 1 network must be assigned with IPv4 and another network must be assigned
with IPv6. try exchanging the packets between each networks

PROJECT 2

Create a wireless network with Arduino Uno Board with required shields and create a
network to monitor the health signals of soldier in warfield.

DESCRIPTION:

Sensors in a kind of wearable which constantly updates the health signals of the
soldiers in the war field.

PROJECT 3

One of your clients wants to automate his entire home with smart IoT devices and
you were asked to submit the model of his future smart home. Simulate an
automated home with smart IoT devices such as electrical appliances operated over
phone, automatic door open and close mechanisms, and fire or smoke detection
alarm system. Make sure all the network nodes are communicating each other with
wireless connection.
PROJECT 4
An organization has totally 16,384 addresses starting from 120.14.64.0. It decides
to distribute these addresses to four of its headquarters A, B, C and D, each with
4096 addresses. The headquarters A and D have the following address
allocations.
(a) The headquarters A distributes the addresses to eight of its branch offices,
each with 512 addresses. Further, each of these branch offices allocates addresses
to 128 customers, each with 4 addresses.
(b) The headquarters D assigns the addresses to its sixteen branches, each with
256 addresses.
Give the starting and ending address allocation for all the hierarchical levels
(Organization, Head Quarters, Branch and customer), along with subnet mask

• PROJECT 5
• Multi-View Video Transmission over the Internet

• DESCRIPTION:
3D television using multiple views rendering is receiving increasing interest. In this
technology a number of video sequences are transmitted simultaneously and
provides a larger view of the scene or stereoscopic viewing experience. With two
views stereoscopic rendition is possible. Nowadays 3D displays are available that are
capable of displaying several views simultaneously and the user is able to see
different views by moving his head.
Thank you

Disclaimer:

This document is confidential and intended solely for the educational purpose of RMK Group
of Educational Institutions. If you have received this document through email in error,
please notify the system manager. This document contains proprietary information and is
intended only to the respective group / learning community as intended. If you are not the
addressee you should not disseminate, distribute or copy through e-mail. Please notify the
sender immediately by e-mail if you have received this document by mistake and delete this
document from your system. If you are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in reliance on the contents of this
information is strictly prohibited.

You might also like