20EC503 Data Communication Networks Unit 3
20EC503 Data Communication Networks Unit 3
20EC503 Data Communication Networks Unit 3
2
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.
3
20EC503 Data Communication Networks
Date : 27.09.2022
4
Table of Contents
5
Table of Contents
Page
S.No Contents
No
1 Course Objectives 8
3 Syllabus 12
4 Course Outcomes 14
5 CO - PO / PSO Mapping 16
INTRODUCTION 23
GENERAL IDEA 24
INTERNET AS A GRAPH 24
LOW COST ROUTING AND TREES 25
6
1.Course Objectives
8
1.Course Objectives
The student should be made to:
9
2.Pre Requisites (Course Names with Code)
10
Pre Requisites
S.No Course Course Name
Code
1 EC8392 DIGITAL ELECTRONICS
11
3.Syllabus
12
SYLLABUS
20EC503- DATA COMMUNICATION NETWORKS
L T P C
3 0 0 3
TOTAL: 45 PERIODS
13
4.Course Outcomes
14
Course Outcomes for
20EC503 – DATA COMMUNICATION NETWORKS
Highest
# Course Outcomes Cognitive
Level
Identify the components required to build different types of
CO1 K2
networks
Choose the required functionality at each layer for given
CO2 K3
application
CO3 Identify solution for each functionality at each layer K2
Trace the flow of information from one node to another node in
CO4 K2
the network
Understand and differentiate the various unicast and multicast
CO5 K2
protocols for routing data.
Quote the various utilities of the application layer and identify its
CO6 K2
functionalities
15
5.CO - PO / PSO Mapping
16
CO – PO – PSO – Mapping
Program Specific
Outcomes
Program Outcomes
Course Out Comes
Level of CO
K3,
K3 K4 K4 K5 K5, A3 A2 A3 A3 A3 A3 A2 K5 K5 K3
K6
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 - - 1 - 1
C304.2 K3 3 2 - - - - - - - 3 - - - - 2
C304.3 K3 3 2 2 2 2 - - - - 2 - - - - 2
C304.4 K2 2 1 - - - - - - - 2 - - - - 1
C304.5 K2 2 1 1 1 - - - - - 2 - - - - 1
C304.6 K2 2 2 - - - - - - - 2 - - - 1 1
CO Avg
3 2 2 2 2 - - - - 3 - - 1 1 2
C304
17
Lecture Plan – Unit 3
18
Lecture Plan – Unit 3
UNIT 1 –FUNDAMENTALS AND LINK LAYERS
Mode of Delivery
Taxonomy Level
No. of Periods
Planned Date
Mapping CO
Actual Date
Reason for
Deviation
Topics
No
Si
PPT
1 Routing -Protocols 1 CO3 K4 through
Online
PPT
Building Network and its K4
2 2 CO3 through
types
Online
PPT
Multicast Routing and its
3 2 CO3 K2 through
basics
Online
PPT
Overview of IPv6
5 Addressing 1 CO3 K4 through
Online
PPT
Transition from IPv4 to
6 IPv6 2 CO3 K4 through
Online
19
Activity Based Learning
Activity Used: Hands on Practice
20
Activity Based Learning
Hands on Practice
Students are expected to perform the following task and explain the learnings in
document format.
1. Open command prompt in windows
2. Execute the command “ip config – all” document the output and explain the
learnings
3. Execute the command “ tracert google.com” document the output and explain
the learnings
4. Execute the command “ netstat –r” document the output and explain the
learnings
5. Open the command prompt and ping with the same IP address to check the
connectivity.
6. In the same command prompt window ping with the immediate neighbours IP
address after obtaining from the administrator and check the connectivity status
of the immediate neighbours.
21
Lecture Notes
Unit 3 - Routing
22
Section 3.1
INTRODUCTION
3.1.1 General Idea
3.1.2 internet as a graph
3.1.3 Low cost routing and trees
23
3.1 INTRODUCTION
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.1.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.1.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.
24
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.
25
Section 3.2
UNICAST ROUTING
ALGORITHMS
3.2.1 Distance Vector Algorithms
3.2.2 Link State Algorithm
3.2.3 Path Vector Algorithm
26
3.2 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.
27
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.
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
28
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.
29
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.
30
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.
31
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.2.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.
32
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.
33
zdfg
34
35
3.2.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.
36
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
37
Path-Vector Algorithm
38
Section 3.3
UNICAST ROUTING
PROTOCOLS
3.3.1 Internet Structure
3.3.2 Hierarchical Routing
3.3.3 Routing Information Protocol (RIP)
3.3.4 Open Shortest Path First Protocol (OSPF)
3.3.5 Border Gateway Protocol (BGP)
39
3.3 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.3.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.
40
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.
41
3.3.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.
42
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.
43
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.
44
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.
45
3.3.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 thatthe only difference is the cost values.
46
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.
47
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.
48
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.
49
OSPF MESSAGE FORMAT
50
3.3.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.
51
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.
52
Finalized BGP path tables
53
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).
54
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.
55
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.
56
Section 3.4
MULTICAST
ROUTING
3.4.1 Concepts of Unicast, Multicast, Broadcast
3.4.2 Applications of Multicast
3.4.3 Optimal Routing Protocols
3.4.4 Multicast Routing Protocols
3.4.4.1 MOSPF
3.4.4.2 DVMRP
3.4.4.3 CBT
3.4.4.4 PIM
57
3.4 MULTICAST ROUTING PROTOCOLS
58
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.
59
3.4.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.
60
3.4.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.
61
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.
62
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.
63
3.4.4 Routing Protocols
The figure shows the taxonomy of the protocols
64
3.4.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.
65
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.
66
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.
67
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
68
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.
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.
69
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.
70
3.4.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.
71
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
72
Section 3.5
IPv6 ADDRESS
3.5.1 Representation of IPv6
3.5.2 Address Space
3.5.3 Auto Configuration
3.5.4 Renumbering
73
3.5 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.5.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.
74
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.
75
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.
76
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
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
77
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.
78
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.5.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?
79
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.5.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.
80
Section 3.6
TRANSITION FROM
IPv4 TO IPv6
81
3.6 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.
82
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.
83
Links for online Lecture Videos and
Lecture PPTs
84
LINKS FOR ONLINE LECTURE VIDEOS AND LECTURE
SLIDES
Concepts of IP
1 https://youtu.be/zQ https://www.slideshare.net/J
Addressing WGGGEBigo aiGanesh11/
Routing and its https://www.slideshare.net/J
2. https://www.youtu aiGanesh11/
concepts be.com/watch?v=c
Consolidated Unit-3 wehPM9RJak&list=
Lecture Slides & PLA2UBjeRwle3Alqs
3. rF-7G2techJbaJ9Mf https://drive.google.com/file/
Google Meet Lecture https://drive.google d/1fTqPuw7c3jqUMPvNIj6i2r
Videos .com/folderview?id 07Fq0tbAkV/view
=1-oi77wk1sPV9rda
MNSYqECaTVF8PTJ
13
85
Assignments
86
Assignment Questions
Unit - I
87
Part A Q & A (With K - Level and CO)
88
Part-A Questions & Answers
89
Part-A Questions & Answers
90
Part-A Questions & Answers
91
Part-A Questions & Answers
92
Part B Q's (With K - Level and CO)
93
Part-B Questions
6 Explain about IPv6? Compare IPv4 and IPv6. (May/June 2016) K3 CO3
94
Supportive Online
certification Courses
95
Supportive Online Courses for
EC8551 – Communication Networks
96
Realtime Applications
97
Realtime Applications
learning.
98
Content Beyond Syllabus
99
Content Beyond Syllabus
100
Assessment Schedule
101
Assessment Schedule
ASSESSMENT PROPOSED DATE ACTUAL DATE
Unit - 1 Assignment
Assessment
Unit Test 1
Unit - 2 Assignment
Assessment
Internal Assessment 1
Retest for IA 1
Unit - 3 Assignment
Assessment
Unit Test 2
Unit - 4 Assignment
Assessment
Internal Assessment 2
Unit 5 Assignment
Assessment
Revision Test 1
Revision Test 2
Model Exam
Remodel Exam
University Exam
102
Text Book and Reference Books
103
Text Book and Reference Books
TEXT BOOK:
1. Behrouz A. Forouzan, ―Data communication and Networking‖, Fifth Edition, Tata
McGraw – Hill, 2013 (UNIT I –V)
REFERENCES
1. James F. Kurose, Keith W. Ross, ―Computer Networking - A Top-Down Approach
Featuring the Internet‖, Seventh Edition, Pearson Education, 2016.
2. Nader. F. Mir,― Computer and Communication Networks‖, Pearson Prentice Hall
Publishers, 2nd Edition, 2014.
3. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, ―Computer Networks: An Open
Source Approach‖, Mc Graw Hill Publisher, 2011.
4. Larry L. Peterson, Bruce S. Davie, ―Computer Networks: A Systems Approach‖,
Fifth Edition, Morgan Kaufmann Publishers, 2011.
104
Mini Project Ideas
105
Projects to be Carried out
PROJECT 1
OBJECTIVE:
DESCRIPTION:
• 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.
106
Projects to be Carried out
PROJECT 3
OBJECTIVE:
DESCRIPTION:
• Try communicating through the routers after implementing RIP and OSPF
protocols and compare the propagational delay.
PROJECT 4
Create the same network mentioned above using NS2 simulation software
and determine optimal networking algorithm
DESCRIPTION:
Implement the same network that was implemented in the previous project using
NS2 simulation software. Make sure the position of nodes and their connectivity
remain the same aa before. Implement RIP and OSPF protocols in the routers and
visually simulate the date flow in both cases. The packets delivered and lost can b
clearly noticed and indicated. Similarly, the round trip time and packet loss in each
algorithm can be calculated and compared.
107
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.
108