0% found this document useful (0 votes)
5 views86 pages

Module 2 - Unicast Routing

Module 2 of Computer Networks PPT explaining the basic concepts (routing) of CNN for final year engineering students.

Uploaded by

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

Module 2 - Unicast Routing

Module 2 of Computer Networks PPT explaining the basic concepts (routing) of CNN for final year engineering students.

Uploaded by

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

MODULE 2 – UNICAST ROUTING

• 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.
• 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).
• An Internet as a Graph: A graph in computer science is a set of nodes and edges (lines) that
connect the nodes.
• each router as a node and each network between a pair of routers as an edge.
• An internet is modeled as a weighted graph, in which each edge is associated with a cost.
• If there is no edge between the nodes, the cost is infinity
ROUTING ALGORITHMS
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.
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 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.

Dxy = min{(cxa + Day), (cxb + Dby), (cxc + Dcy), …}


In distance-vector routing, update an existing least cost with a least cost through an
intermediary node, such as z, if the latter is shorter.
Dxy = min{Dxy, (cxz + Dzy)}
Distance Vectors
The concept of a distance vector is the rationale for the name distance-vector routing.
A least-cost tree is a combination of least-cost paths from the root of the tree to all destinations.
These paths are graphically glued together to form the tree.
Distance-vector routing unglues these paths and creates a distance vector, a one-dimensional
array to represent the tree.
Note:
• 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.
Distance Vectors

makes a simple distance vector by inserting the discovered distances in the corresponding cells and leaves the value of other
cells as infinity. considering the limited information a node has. When we know only one distance between two nodes, it is
the least cost.
Distance Vectors
Distance Vectors
• These rudimentary vectors cannot help the internet to effectively forward a packet.
• 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 exchange 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 .
• 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.
• 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.
• After the first event, node B has one improvement in its vector: its least cost to node D has
changed from infinity to 5 (via node A).
• After the second event, node B has one more improvement in its vector; its least cost to node
F has changed from infinity to 6 (via node E).
• after updating a node, it immediately sends its updated vector to all neighbors. Even if its
neighbors have received the previous vector, the updated one may help
Problems with Distance Vector
Count to Infinity
A problem with distance-vector routing is that any decrease in cost propagates quickly, but any
increase in cost 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
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
Two-Node Loop
One example of count to infinity is the two-node loop problem
• the system becomes unstable if B sends its forwarding table to A before receiving A’s
forwarding table.
• Node A receives the update and, assuming that B has found a way to reach X, immediately
updates its forwarding table.
• Now A sends its new update to B.
• Now B thinks that something has been changed around A and updates its 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. during this time the system is
not stable.
• Node A thinks that the route to X is via B; node B thinks that the route to X is via A. If A
receives a packet destined for X, the packet goes to B and then comes back to A.
• Similarly, if B receives a packet destined for X, it goes to A and comes back to B. Packets
bounce between A and B, creating a two-node loop problem.
Solutions to the problems encountered by DV
1. 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.
• 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
2) Poison Reverse
• Using the split-horizon strategy has one drawback. 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.
3) Three-Node Instability
• The two-node instability can be avoided using split horizon combined with
poison reverse. if the instability is between three nodes, stability cannot be
Problems:
• Assume the shortest path in a graph from node A to node H is A → B → H. Also
assume that the shortest path from node H to node N is H → G → N. What is the
shortest path from node A to node N?
Soln: Shortest path from A to H: A → B → H
Shortest path from H to N: H → G → N

becomes:𝐴→𝐵→𝐻→𝐺→𝑁
By connecting these two paths at node H, the full shortest path from A to N

Thus, the shortest path from A to N is A → B → H → G → N.


2) Assume that the shortest distance between nodes a, b, c, and d to node y and
the costs from node x to nodes a, b, c, and d are given below:
Day = 5 Dby = 6 Dcy = 4 Ddy = 3
cxa = 2 cxb = 1 cxc = 3 cxd = 1
What is the shortest distance between node x and node y, Dxy, according to the
Bellman-Ford equation?
Soln: D xy​=min(C xa​+D ay​,C xb​+D by​,C xc​+D cy​,C xd​+D dy​)
1.𝐶𝑥𝑎+𝐷𝑎𝑦=2+5=7
2. 𝐶𝑥𝑏+𝐷𝑏𝑦=1+6=7
3. 𝐶𝑥𝑐+𝐷𝑐𝑦=3+4=7
4. 𝐶𝑥𝑑+𝐷𝑑𝑦=1+3=4
minimum of these values:𝐷 =min⁡(7,7,7,4)=4Thus, the shortest distance 𝐷
3) Assume that all nodes are initialized first. Also assume that the algorithm is applied, one at a
time, to each node respectively (A, B, C, D). Show that the process converges and all nodes will
have their stable distance vectors.

• 𝑏→𝑐=2
• a→b=3

• 𝑐→𝑑=4
• 𝑑→𝑏=5
• a→d=6
Soln:
Initial Distance Vectors (Before Exchange):Each node only knows the direct cost to its
neighbors. Let the distances be initialized as infinity for nodes that don't have direct links.
Node A: 𝐷𝐴=[0,3,∞,6] (knows its distance to B is 3, and D is 6)
Node B: 𝐷𝐵=[3,0,2,∞] (knows its distance to A is 3, C is 2)
Node C: 𝐷𝐶=[∞,2,0,4] (knows its distance to B is 2, D is 4)
Iteration 1: Node A Updates
• Node A will receive information from Node B:
• DB=[3,0,2,∞]
• A updates its distances:
• Distance from A to C through B: 3+2=5
• A knows its direct distance to D is 6, and cannot improve that through B yet.
• Updated DA​: [0,3,5,6]
Iteration 2: Node B Updates
• Node B will receive information from Node A and Node C:
• From A: DA=[0,3,5,6]
• From C: DC=[∞,2,0,4]
• B updates its distances:
• Distance from B to A is 3 (remains unchanged).
• Distance from B to D through C: 2+4=6
• Updated BDB​: [3,0,2,6]
Iteration 3: Node C Updates
• Node C will receive information from Node B and Node D:
• From B: DB=[3,0,2,6]
• From D: DD=[6,5,4,0]
• C updates its distances:
• Distance from C to A through B: 2+3=5
• Distances to B and D remain unchanged.
• Updated DC​: [5,2,0,4]

Iteration 4: Node D Updates


• Node D will receive information from Node C and Node B:
• From C: DC=[5,2,0,4]
• From B: DB=[3,0,2,6]
• D updates its distances:
• Distance from D to A through C: 4+5=9 (not better than 6).
• Distance from D to A through B: 5+3=8 (not better than 6).
• No updates for D.
Iteration 5: Convergence
• After all nodes have updated and exchanged information:
• Node A: DA=[0,3,5,6]
• Node B: DB=[3,0,2,6]
• Node C: DC=[5,2,0,4]
• Node D: DD=[6,5,4,0]
• At this point, no further updates are possible, and all nodes have converged to their stable
distance vectors.
Final Stable Distance Vectors:
• 𝐷𝐴=[0,3,5,6]
• 𝐷𝐵=[3,0,2,6]
• 𝐷𝐶=[5,2,0,4]
• 𝐷𝐷=[6,5,4,0]
Link-State Routing
• A routing algorithm for creating least-cost trees and forwarding tables is link-state (LS)
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)
• To create a least-cost tree with this method, each node needs to have a complete map
of the network, which means it needs to know the state of each link.
• 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
• can be represented as a two-dimensional array(matrix) in which the value of each cell
In the distance-vector routing algorithm, each router tells its neighbors what it knows
about the whole internet; in the link-state routing algorithm, each router tells the
whole internet what it knows about its neighbors
• LSDB that contains information 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.
• It then sends a copy of it out of each interface except the one from which the
packet arrived.
• This guarantees that flooding stops somewhere in the network (where a node
has only one interface).
• after receiving all new LSPs, each node creates the comprehensive LSDB.
• Formation of Least-Cost Trees
To create a least-cost tree for itself, using the shared LSDB, each node needs to
run the 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.
Least-cost tree
Path-Vector Routing
• Both link-state and distance-vector routing are based on the least-
cost goal.
• there are instances where this goal is not the priority.
• Ex: assume that there are some routers in the internet that a sender
wants to prevent its packets from going through.
• Ex: a router may belong to an organization that does not provide
enough security or it may belong to a commercial rival of the sender
which might inspect the packets for obtaining information.
• Least-cost routing does not prevent a packet from passing through
an area when that area is in the least-cost path.
• 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.
• the goal of routing is merely reachability: to allow the packet to
reach its destination more efficiently without assigning costs to the
route.
• To respond to these demands, a third routing algorithm, called path-vector
(PV)routing has been devised.
• Path-vector routing does not have the drawbacks of LS or DV routing because it
is not based on least-cost routing.
• The bestroute is determined by the source using the policy it imposes on the
route.
• the source can control the path.

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
• common policies uses the minimum number of nodes to be visited (something similar to least-
cost).
• common policy is to avoid some nodes as the middle node in a route.
• a small internet with only five nodes.
• Each source has created its own spanning tree that meets its policy.
• The policy imposed by all sources is to use the minimum number of nodes to reach a destination.
• The spanning tree selected by A and E is such that the communication does not pass through D as
a middle node.
• the spanning tree selected by B is such that the communication does not pass through C as a
Spanning trees in path-vector routing
Creation of Spanning Trees
• Path-vector routing, like distance-vector routing, is an asynchronous and
distributed routing algorithm.
• 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.
• we do not mean that all of these tables are created simultaneously; they are
created when each node is booted.
• 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(x, y) = best {Path(x, y), [(x + Path(v, y)]} for all v’s in the internet
• the operator (+) means to add x to the beginning of the path.
• need to be cautious to avoid adding a node to an empty path because an empty
path means one that does not exist.
• The policy is defined by selecting the best of multiple paths.
• Path-vector routing also imposes one more condition on this equation:
• If Path (v, y) includes x, that path is discarded to avoid a loop in the path.
• x does not want to visit itself when it selects a path to y. 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. the vector for node C
after the first event is stabilized and serves as its forwarding table.
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
• Three common protocols used in the Internet:
1. Routing Information Protocol (RIP), based on the distance-vector algorithm
2. Open Shortest Path First (OSPF), based on the link-state algorithm, and
3. Border Gateway Protocol (BGP), based on the path-vector algorithm.
• Internet Structure
• The Internet has changed from a tree-like structure, with a single backbone, to a
multi-backbone structure run by different private corporationsThere 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
Open Shortest Path First (OSPF)
• Open Shortest Path First (OSPF) is also an intradomain routing protocol like RIP, 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, the cost of reaching a destination from the host is calculated from the
source router to the destination network.
• each link (network) can be assigned a weight based on the throughput, round-trip
time, reliability, and so on.
• administration can also decide to use the hop count as the cost.
• the cost in OSPF is that different service types (TOSs) can have different weights
as the cost
Metric in OSPF
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
• Comparing the forwarding tables for the OSPF and RIP in the same AS, the only
difference is the cost values. if we use the hop count for OSPF, the tables will be
exactly the same.
• The reason for this consistency is that both protocols use the shortest-path trees
to define the best route from a source to a destination
Forwarding tables in OSPF
Areas
• OSPF was designed to handle routing in a small or large autonomous system.
• the formation of shortest-path trees in OSPF requires that all routers flood the whole AS
with their LSPs to create the global LSDB.
• this may create a problem 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.
• OSPF uses another level of hierarchy in routing: the first level is the autonomous system,
• the second is the area. each router in an area needs to know the information about the link
states not only in its area but also in other areas.
• reason, 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.
Areas in an autonomous system
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 to advertise :
• the existence of different entities as nodes,
• the different types of links that connect each node to its neighbors,
• and the different types of cost associated with each link.
• we need different types of advertisements, each capable of advertising different
situations. We can have five types of link-state advertisements:
1. router link
2. network link,
3. summary link to network,
4. Summary link to AS border router,
5. external link
Router link.
Router link. A router link advertises the existence of a router as a node.
• giving the address of the announcing router, this type of advertisement can define one or
more types of links that connect the advertising router to other entities.
• 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.
• 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.
• In addition to the address of the designated router, this type of LSP announces the IP address
of all routers (including the designated router as a router and not as speaker of the network),
• but no cost is advertised because each router announces the cost to the network when it sends
a router link advertisement.
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.
• this type of information exchange is needed to glue the areas together
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.
• This means that, although OSPF is a routing protocol to help IP to route its
datagrams inside an AS, the OSPF messages are encapsulated inside datagrams.
• OSPF has gone through two versions: version 1 and version 2.
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 but it is tailored to provide
information about the reachability of networks in the Internet.
• four autonomous systems. AS2, AS3, and AS4 are stub autonomous systems; AS1
is a transient one.
• data exchange between AS2, AS3, and AS4 should pass through AS1.
A sample internet with four ASs
• Each autonomous system in the figure uses one of the two common intradomain
protocols, RIP or OSPF.

• Each router in each AS knows how to reach a network that is in its own AS, but it
does not know how to reach a network in another AS.

• To enable each router to route a packet to any network in the internet, first install 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).

• 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
Operation of External BGP (eBGP)
• 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.
• a pair of client and server processes continuously communicate with each other
to exchange messages.
• 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 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).
• there is a need for a logical TCP connection to be created over the physical
connection to make the exchange of information possible.
• Each logical connection in BGP parlance is referred to as a session
• The circled number defines the sending router
Ex: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.
• the reachability information is not complete. There are two problems that need to be
addressed:
1. Some border routers do not know how to route a packet destined for non neighborASs.
Ex: R5 does not know how to route packets destined for networks inAS3 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
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.
1. if an AS has only one router, there cannot be an iBGP session.
• Ex: we cannot create an iBGP session inside AS2 or AS4 in our internet.

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

• each router needs to advertise its own reachability to the peer in the session
instead of flooding what it receives from another peer in another session.
• The first message (numbered1) 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.
• R3, R7, and R8 create sessions with their peers, but they actually have no
message to send.
• The updating process does not stop here.
Ex: 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.
• R5 knows how to reach networks in AS1 and AS3.

• The process continues when R1 receives the update message from R4. The point
is that we need to make certain that at a point in time there are no changes in the
previous updates and that all information is propagated through all ASs.

• At this time, each router combines the information received from eBGP and iBGP
and creates what we may call a path table after applying the criteria for finding
the best path, including routing policies.
Multicasting
• In multicasting, 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, a group of one or more destination
networks in which there is at least one member of the group that is interested in
receiving the multicast datagram.
• The group address defines the members of the group.
• In multicasting, a multicast router may have to send out copies of the same
datagram through more than one interface.
• router R1 needs to send out the datagram through interfaces 2 and 3.
• Similarly, router R4 needs to send out the datagram through both its interfaces.
Router R3, however, knows that there is no member belonging to this group in
the area reached by interface 2; it only sends out the datagram through interface
Multicasting versus Multiple Unicasting
• Multicasting starts with a single packet from the source that is duplicated by the
routers.
• The destination address in each packet is the same for all duplicates. only a
single copy of the packet travels between any two routers.
• In multiple unicasting, several packets start from the source. If there are three
destinations,the source sends three packets, each with a different unicast
destination address.
• there may be multiple copies traveling between two routers.
Ex: when a person sends an e-mail message to a group of people, this is multiple
unicasting. The e-mail application software creates replicas of the message, each
with a different destination address, and sends them one by one.
Emulation of Multicasting with Unicasting
why we have a separate mechanism for multicasting, when it can be emulated
with unicasting. There are at least two reasons:
1. Multicasting is more efficient than multiple unicasting. multicasting requires
less bandwidth than multiple unicasting.
• In multiple unicasting, some of the links must handle several copies.
2. In multiple unicasting, the packets are created by the source with a relative
delay between packets.
• If there are 1,000 destinations, the delay between the first and the last packet
may be unacceptable.
• In multicasting, there is no delay because only one packet is created by the
source.
Multicast Applications
• access to distributed databases, information dissemination, teleconferencing, and
distance learning.
❑ Access to Distributed Databases. Most of the large databases today are distributed.
• 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.
❑ 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.
Ex: a software update can be sent to all purchasers of a particular software package.
❑ Teleconferencing. Teleconferencing involves multicasting. The individuals attending
a teleconference all need to receive the same information at the same time.
Distance Learning. One growing area in the use of multicasting is distance
learning.
• Lessons taught by one 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.
Broadcasting
• Broadcasting means one-to-all communication: a host sends a packet to all hosts
in an internet.
• it may create a huge volume of traffic and use a huge amount of bandwidth.
• Partial broadcasting, however, is done in the Internet
• Ex: some peer-to-peer applications may use broadcasting to access all peers.
• Controlled broadcasting may also be done in a domain (area or autonomous
system) mostly as a step to achieve multicasting.
MULTICASTING BASICS
• Multicast Addresses
• When we send a unicast packet to a destination, the source address of the packet defines the
sender and the destination address of the packet defines the receiver of the packet.
• the sender is only one, but the receiver is many,sometimes thousands or millions spread all over
the world.
• We cannot include the addresses of all recipients in the packet. The destination address of a
• packet, should be only one. For this reason, we need multicast addresses.
• A multicast address defines a group of recipients, not a single one, a multicast address is an
identifier for a group.
• If a new group is formed with some active members, an authority can assign an unused multicast
address to this group to uniquely define it.
• This means that the source address of a packet in multicast communication can be a unicast
address that uniquely defines the sender, but the destination address can be the multicast address
that defines a group.
• a host, which is a member of n groups, actually has (n + 1) addresses:
• one unicast address that is used for source or destination address in unicast communication and n
multicast addresses that are used only for destination addresses to receive messages sent to a
Multicast Addresses in IPv4
• A router or a destination host needs to distinguish between a unicast and a
multicast datagram. IPv4 and IPv6 each assign a block of addresses.
• In classful addressing, all of class D was composed of these addresses; classless
addressing used the same block, but it was referred to as the block 224.0.0.0/4
(from 224.0.0.0 to 239.255.255.255).
• Four bits define the block; the rest of the bits are used as the identifier for the
group
• The number of addresses in the multicast block is huge (228).
• the block is divided into several subblocks, and each subblock is used in a
particular multicast application.
• The following gives some of the common subblocks:
1. Local Network Control Block. The subblock 224.0.0.0/24 is assigned to a
multicast routing protocol to be used inside a network, which means that the
packet with a destination address in this range cannot be forwarded by a
router.
In this subblock, the address 224.0.0.0 is reserved, the address 224.0.0.1 is used to
send datagrams to all hosts and routers inside a network, and the address
224.0.0.2 is used to send datagrams to all routers inside a network.
2. Internetwork Control Block: The subblock 224.0.1.0/24 is assigned to a multicast
routing protocol to be used in the whole Internet, which means that the packet
with a destination address in this range can be forwarded by a router.
3. Source-Specific Multicast (SSM) Block. The block 232.0.0.0/8 is used for source
specific multicast routing.
4.GLOP Block. The block 233.0.0.0/8 is called the GLOP block (not an acronym nor
an abbreviation). This block defines a range of addresses that can be used inside
an autonomous system (AS).
• One can insert the AS number as the two middle octets in the block to create a
range of 256 multicast addresses (233.x.y.0 to 233.x.y.255), in which x.y is the AS
number.
5. Administratively Scoped Block. The block 239.0.0.0/8 is called the
Administratively Scoped Block.
• The packet whose destination address belongs to this range is not supposed to
leave the area, an address in this block is restricted to an organization
Selecting Multicast Address
• The selection of address depends on the type of application.
1.Limited Group
• The administrator can use the AS number (x.y)256 and choose an address
between 239.x.y.0 and 239.x.y.255 (Administratively Scoped Block), that is not
used by any other group, as the multicast address for that particular group.
• Ex: college professors need to create group addresses to communicate with their
students.
• If the AS number that the college belongs to is 23452, which can be written as
(91.156)256, this gives the college a range of 256 addresses: 239.91.156.0 to
239.91.156.255. The college administration can grant each professor one of the
addresses in the range.
• the packets cannot go beyond the college AS territory.
• To convert 234521023452_{10}2345210​to base 256256256, we can follow
similar steps but divide by 256 instead of 16.
1.Divide 23452 by 256 and record the remainder:
1. 23452÷256=91 remainder 196.
2.Divide the quotient by 256 again:
1. 91÷256=0 remainder 91.
3.Write the remainders in reverse order to get the number in base 256.
• So, 2345210=91,196256
Selecting Multicast Address
• 2.Larger Group
• If the group is spread beyond an AS territory, The group needs to choose an
address from the SSM block (232.0.0.8).

• There is no need to get permission to use an address in this block, because the
packets in source-specific multicasting are routed based on the group and the
source address; they are unique
Two Approaches to Multicasting
• In multicast routing, as in unicast routing, we need to create routing trees to
optimally route the packets from their source to their destination.
• before, the multicast routing decision at each router depends not only on the
destination of the packet, but also on the source of the packet.
• The involvement of the source in the routing process makes multicast routing
much more difficult than unicast routing.
1.source-based trees
2.routing using group-shared trees
Two Approaches to Multicasting
1. Source-Based Tree Approach
• each router needs to create a separate tree for each source-group combination.
• if there are m groups and n sources in the internet, a router needs to create (m ×
n) routing trees.
• In each tree, the corresponding source is the root, the members of the group are
the leaves, and the router itself is somewhere on the tree.
• compare the situation with unicast routing in which a router needs only one tree
with itself as the root and all networks in the internet as the leaves.
Two Approaches to Multicasting

2. Group-Shared Tree Approach


• we designate a router to act as the phony source for each group.
The designated router, which is called the core router or the rendezvouspoint
router, acts as the representative for the group.
• Any source that has a packet to send to a member of that group sends it to the
core center (unicast communication) and the core center is responsible for
multicasting.
• The core center creates one single routing tree with itself as the root and any
routers with active members in the group as the leaves.
• In this approach, there are m core routers (one for each group) and each core
router has a routing tree, for the total of m trees.
• This means that the number of routing trees is reduced from (m × n) in the
source-based tree approach to m in this approach.
Two Approaches to Multicasting

2. Group-Shared Tree Approach


• we have divided a multicast delivery from the source to all group members into
two deliveries. The first is a unicast delivery from the source to the core router
using tunneling; the second is the delivery from the core router to all group
members.
• The multicast packet created by the source needs to be encapsulated in a unicast
packet and sent to the core router.
• The core router decapsulates the unicast packet, extracts the multicast packet,
and sends it to the group members.
• using an algorithm to select a router among all routers as the core router for a
group is an overhead
Two Approaches to Multicasting
• Example
• Change the multicast IP address 238.212.24.9 to an Ethernet multicast address.
Solution:
a. The rightmost 3 bytes in hexadecimal are D4:18:09. We need to subtract 8 from
the leftmost digit, resulting in 54:18:09.
b. We add the result of part a to the Ethernet multicast starting address.

The result is 01:00:5E:54:18:09


• Change the multicast IP address 232.43.14.7 to an Ethernet multicast physical
address.
• Solution
a. We write the rightmost 23 bits of the IP address in hexadecimal. This can be
done by changing the rightmost 3 bytes to hexadecimal and then subtracting 8
from the leftmost digit if it is greater than or equal to 8. In our example, the result
is 2B:0E:07.
b. We add the result of part a to the starting Ethernet multicast address, which is
• 01:00:5E:00:00:00.

The result is 01:00:5E:2B:0E:07


3.The AS number in an organization is 24101. Find the range of multicast addresses that the organization can use in
the GLOP block.
Soln:
• The formula for the GLOP address range is: (233.x.y.0 to 233.x.y.255),
• The first and second octets in the address range are derived by breaking the 16-bit AS number into two 8-bit
parts.
• For AS number 24101:
1. Convert 24101 to hexadecimal, which is 0x5E45.
2. Split 0x5E45 into two 8-bit parts:
1. 0x5E (94 in decimal) for the first octet
2. 0x45 (69 in decimal) for the second octet
• Thus, the GLOP address range for AS 24101 is:
• First address: 233.94.101.0
• Last address: 233.94.101.255

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy