Unicast Routing
Unicast Routing
Unicast Routing
In unicast routing, a packet is routed, hop by hop, from its source to its destination
bythe help of forwarding tables. The source host needs no forwarding table because
itdelivers its packet to the default router in its local network.
The destination host needsno forwarding table because it receives the packet from its
default router in itslocal network.
Routing a packet from its source to its destination means routing the packet from a
source router to a destination router.
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.
That is, the source router chooses a route to the destination router insuch a way that
the total cost for the route is the least cost among all possible routes.
In Figure (below) the best route between A and E is A-B-E, with the cost of 6.
This meansthat each router needs to find the least-cost route between itself and all the
other routersto be able to route a packet towards the destination.
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.
For example, If we have only 10 routers in an internet, we need 90 least-cost paths.
A least-cost treeis 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.
Figure (below) shows the seven least-cost trees for the internet
Fig: Seven least-cost trees for the internet .[Source : Data Communications and
Networking by Behrouz A. Forouzan].
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.
For example, inFigure, the route from A to F in A’s tree is (A -B-E-F), but
the routefrom F to A in F’s tree is (F -E-B-A), which is the inverse of the first
route.The cost is 8 in each case.
The combination of the two routes in the second case is the same route as in
the first case. The cost in the first case is 9; the cost in the second case is also 9
(6 3).
ROUTING ALGORITHMS
Distance-Vector Routing
Bellman-Ford Equation
The following shows the general case in which Dijis the shortest distance and cijis the
cost between nodes i and j.
In distance-vector routing, we want to update an existing least cost with aleast cost
through an intermediary node, such as z, ie,if the intermediate node is shorter.
In the Figure (above), we can think of (a-y),(b-y), and (c-y) as previously established
least-cost paths and (x-y) as the newleast-cost path.
We can even think of this equation as the builder of a new least-cost treefrom
previously established least-cost trees if we use the equation repeatedly.
Distance Vectors
The concept of a distance vector is the reason 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.
Figure shows the tree for node A in the internet in Figure and the corresponding
distance vector.
A distance vector does not give the path to the destinations as the least-cost tree
does; itgives only the least costs to the destinations.
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.
Fig: Seven least-cost trees for the internet . [Source : Data Communications and
Networking by Behrouz A. Forouzan].
Each node in an internet, when it starts its function, creates a very basic 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
ofthe immediate neighbors and the distance between itself and each neighbor.
It then makes a simple distance vector by inserting the discovered distances in the
correspondingcells and leaves the value of other cells as infinity.
Fig: First distance vector for internet .[Source : Data Communications and Networking by
Behrouz A. Forouzan].
Consider (For example), Node A thinks that it is not connected to node G because the
correspondingcell shows the least cost of infinity.
To improve these vectors, the nodes in the internetneed 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 adistance vector from a
neighbor, it updates its distance vector using the Bellman-Fordequation (second case).
The figure(below) 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 cBA2. In the second event, node E has sent its vector to node
B.Node B updates its vector using the cost cEA4.
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
hasone more improvement in its vector; its least cost to node F has changed from
infinityto 6 (via node E).
By exchanging the vectors,we can stabilize the system and allows all nodes to find
the ultimate least costbetween themselves and any other node.
After updating a node, it immediately sends its updated vector to all neighbors.
Count to Infinity
Initially both nodes A and B know how to reach node X. But suddenly, the link
between A and X fails. Node Achanges its table.
Fig:Two node instability.[Source : Data Communications and Networking by Behrouz
A. Forouzan].
Now B thinks that something has been changed around A and updates its
forwardingtable. The cost of reaching X increases gradually until it reaches infinity.
At thismoment, both A and B know that X cannot be reached. However, during this
time thesystem is not stable. Node A thinks that the route to X is via B; node B thinks
that theroute to X is via A. If A receives a packet destined for X, the packet goes to B
and thencomes back to A. Similarly, if B receives a packet destined for X, it goes to A
andcomes back to B. Packets bounce between A and B, creating a two-node loop
problem.
Split Horizon
One solution to instability is called split horizon. In this method, instead of
floodingthe table through each interface, each node sends only part of its table through
eachinterface.
If, according to its table, node B thinks that the optimum route to reach X isvia A, it
does not need to advertise this piece of information to A; the information hascome
from A (A already knows).
Taking information from node A, modifying it, andsending it back to node A is what
creates the confusion. In thismethod, node B eliminatesthe last line of its forwarding
table before it sends it to A. In this case, node Akeeps the value of infinity as the
distance to X.
Later, when node A sends its forwardingtable to B, node B also corrects its forwarding
table. The system becomes stableafter the first update: both node A and node B know
that X is not reachable.
Link-State Routing
A routing algorithm that directly creates least-cost trees andforwarding 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.
Fig: Example Link state data base.[Source : Data Communications and Networking by
Behrouz A. Forouzan].
Each node cansend 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: theidentity of the node and the cost of the link.
The combination of these two pieces ofinformation is called the LS packet (LSP); the
LSP is sent out of each interface, asshown in Figure .
When a node receives an LSPfrom one of its interfaces, it compares the LSP with the
copy it may already have. If thenewly 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 oldLSP (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 floodingstops somewhere in
the network (where a node has only one interface).
After receiving all new LSPs, each node creates the comprehensiveLSDB as shown
in Figure(below). This LSDB is the same for each node and shows thewhole map of
the internet.
In other words, a node can make the whole map if it needsto, using this LSDB.
Note:
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
tellsthe whole internet what it knows about its neighbors.
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.
UNICAST ROUTING PROTOCOLS
The Internet today is made of a huge number of networks and routers that
connectthem.
Routing in the Internet cannot be done using a single protocolfor two reasons:
Scalability problem means that the size of the forwarding tables becomes huge,
searching for a destination in a forwarding table becomes time-consuming, and
updating creates a huge amount of traffic.
Each AS can run a routing protocol that meets its needs, but the global Internet runs
a global protocol to join and connect all ASs together.
The Routing Information Protocol (RIP) is one of the most widely used
intradomainrouting protocols based on the distance-vector routing algorithm.
Hop Count
A router in this protocol implements the distance-vector routing algorithm.
First, since a router in an AS needs to know how to forward a packet to different
networks(subnets) in an AS, RIP routers advertise the cost of reaching
differentnetworks instead of reaching other nodes in a theoretical graph.
The cost is defined between a router and the network in which the destination host
islocated.
Note that the network in which the source host is connected is not counted inthis
calculation because the source host does not use a forwarding table; the packet
isdelivered to the default router.
Figure (below) shows the concept of hop count advertisedby three routers from a
source host to a destination host.
For this reason, RIP can be used only in autonomous systems in which the diameterof
the AS is not more than 15 hops.
Fig: Hop counts in RIP .[Source : Data Communications and Networking by Behrouz A.
Forouzan].
Forwarding Table
Note that the first and the third columnstogether convey the same information as does
a distance vector, but the costshows the number of hops to the destination networks.
For example, R1 definesthat the next router for the path to N4 is R2; R2 defines that
the next router to N4 isR3; R3 defines that there is no next router for this path. The
tree is then R1 -R2-R3-N4.
The third column is not needed for forwarding the packet, but it is needed for
updating the forwarding table when there is a change in the route.
RIP Implementation
RIP is implemented as a process that uses the service of UDP on the portnumber 520.
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 areencapsulated
inside IP datagrams.
That is, RIP runs at the application layer, butcreates forwarding tables for IP at the
network layer.
RIP Messages
Request and response. A request message is sentby a router that has just come up or
by a router that has some time-out entries.
Arequest message can ask about specific entries or all entries.
RIP Algorithm
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.
The received router selects the old routes as the new ones except in the
followingthree cases:
1. If the received route does not exist in the old forwarding table, it should be addedto
the route.
2. If the cost of the received route is lower than the cost of the old one, the
receivedroute 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.
Timers in RIP
RIP uses three timers to support its operation.
The periodic timer controls the advertisingof regular update messages. Each router has
one periodic timer that is randomly setto a number between 25 and 35 seconds (to
prevent all routers sending their messagesat the same time and creating excess traffic).
The timer counts down; when zero isreached, 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
informationfor a route, the expiration timer is set to 180 seconds for that particular
route. Everytime a new update for the route is received, the timer is reset.
If there is a problem on aninternet and no update is received within the allotted 180
seconds, the route is consideredexpired and the hop count of the route is set to 16,
which means the destination isunreachable.
Every route has its own expiration timer. The garbage collection timer isused to purge
a route from the forwarding table.
The garbage collection timer isused to purge a route from the forwarding table. When
the information about a routebecomes 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
reacheszero, the route is purged from the table.
Open Shortest Path First (OSPF) is an intradomain routing protocol like RIP.It is
based on the link-state routing protocol.
Metric
In OSPF, like RIP, the cost of reaching a destination from the host is calculated
fromthe source router to the destination network.
However, each link (network) can beassigned a weight based on the throughput,
round-trip time, reliability, and so on
Figure (below) shows the idea of the cost from a router to the destination
hostnetwork.
Fig:Metric in OSPF.[Source : Data Communications and Networking by Behrouz A.
Forouzan].
Forwarding Tables
Each OSPF router can create a forwarding table after finding the shortest-path
treebetween itself and the destination using Dijkstra’s algorithm.
Areas
The formationof shortest-path trees in OSPF requires that all routers flood the whole
AS with theirLSPs to create the global LSDB.
This may not create a problem in a small AS, but create traffic in large AS.
To prevent this, the ASneeds to be divided into small sections called areas.
For this reason, one of the areas in the AS isdesignated 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 areato 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.
OSPF Implementation
OSPF is implemented as a program in the network layer, using the service of the IP
forpropagation. An IP datagram that carries a message from OSPF sets the value of
theprotocol field to 89. This means that, the OSPF messages are encapsulated inside
datagrams.
OSPF Messages
OSPF is a very complex protocol; it has five different types of messages.
Fig: OSPF message format .[Source : Data Communications and Networking by
Behrouz A. Forouzan].
The hello message (type 1) isused by a router to introduce itself to the neighbors.
The database description message (type 2) is sent in responseto the hello message to
allow a newly joined router to acquire the full LSDB.
The link state request message (type 3) is sent by a router that needs information
about a specificLS.
The link-state update message (type 4) is the main OSPF message used for buildingthe
LSDB. This message, has five different versions (router link, networklink, summary
link to network, summary link to AS border router, and external link).
After each router has created the shortest-path tree, the algorithm needs to use it
tocreate the corresponding routing algorithm.
The algorithm needs to be augmented to handle sending and receiving all five
types of messages.
___________________________________________
The Border Gateway Protocol version 4 (BGP4) is the only inter domain routing
protocol used in the Internet today.
Here,data exchange between AS2, AS3, and AS4 should pass through AS1.
Each router in each AS knows how to reach a network that isin 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, we first
install a variation of BGP4, called external BGP (eBGP), on each border router
(theone at the edge of each AS which is connected to a router at another AS).
We theninstall the second variation of BGP, called internal BGP (iBGP), on all
routers.
The two routers that run the BGP processes are calledBGP peers or BGP speakers.
The eBGP variation of BGP allows two physically connected border routers in
twodifferent ASs to form pairs of eBGP speakers and exchange messages.
The routers that we use in Figure has 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 overthe physical
connection to make the exchange of information possible.
Each logical connection in BGP is referred to as a session. This means that we need
threesessions, as shown in Figure (below).
Fig: EBGP operation .[Source : Data Communications and Networking by Behrouz A.
Forouzan].
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
correspondingintradomain forwarding table).
Router R5 can now add these pieces ofinformation at the end of its forwarding table.
When R5 receives any packet destinedfor these four networks, it can use its
forwarding table and find that the next router is R1.
Messages
BGP four types of messages for communication between the BGP speakers acrossthe
ASs and inside an AS:
Update Message.
The update message is usedby a router to withdraw destinations that have been
advertised previously, toannounce a route to a new destination, or both.
Note that BGP can withdraw severaldestinations that were advertised before, but it
can only advertise one new destinationin a single update
message.
Keepalive Message. The BGP peers that are running exchange keepalive
messagesregularly (before their hold time expires) to tell each other that they are alive.
BGP performance can be compared with RIP. BGP speakers exchange a lot of
messagesto create forwarding tables, but BGP is free from loops and count-to-infinity.
_______________________________________
Multicasting
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.
Note thatonly a single copy of the packet travels between any two routers.
Multicast Applications
Most of the large databases today are distributed.That is, the information is stored in
more than one location, usually at the time ofproduction.
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, andthe 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.In this way a business
can send one message that can reach many customers.
Teleconferencing.Teleconferencing involves multicasting. The individuals attendinga
teleconference all need to receive the same information at the same time.
MULTICASTING BASICS
In multicast communication, the sender is only one, but the receiver is many,
sometimes thousands or millions spread all over the world. It should be clear that
wecannot include the addresses of all recipients in the packet.
The destination address of a packet, as described in the Internet Protocol (IP) should
be only one. For this reason,we need multicast addresses. A multicast address defines
a group of recipients, not asingle 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 multicastaddress to this group to
uniquely define it.
Multicast Forwarding
To reach all of the destinations, the router may have to send the packet out of
more than one interface.
In unicasting, the destination network N1 cannot be in more than one part of the
internet; in multicasting, the group G1 is in more than one part of the internet.
In part a of the figure, the source is in a sectionof the internet where there is no group
member. In part b, the source is in asection where there is a group member.
In part a, the router needs to send out thepacket from two interfaces; in part b, the
router should send the packet only fromone interface to avoid sending a second copy
of the packet from the interface it hasarrived at.
If there are m groupsand 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 therouter itself is somewhere on the tree.
In the group-shared tree approach, a router act like a 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 tosend 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 routingtree with itself as the root and any routers
with active members in the group as theleaves.
In this approach, there are m core routers (one for each group) and each corerouter
has a routing tree, for the total of m trees. Therefore the number of routingtrees is
reduced from (m *n) in the source-based tree approach to m in this approach.
1. The router uses an algorithm called reverse path forwarding (RPF) to simulate
creating part of the optimal source-based tree between the source and itself.
2. The router uses an algorithm called reverse path broadcasting (RPB) to create a
broadcast (spanning) tree whose root is the router itself and whose leaves are all
networks in the internet.
3. The router uses an algorithm called reverse path multicasting (RPM) to create a
multicast tree by cutting some branches of the tree that end in networks with no
member in the group.
The first algorithm, reverse path forwarding (RPF), forces the router to forward
amulticast packet from one specific interface: the one which has come through the
shortestpath from the source to the router.
The router does not know the shortest path from the source to itself, but it can find
which is thenext router in the shortest path from itself to the source (reverse path).
The router simplyconsults its unicast forwarding table, pretending that it wants to send
a packet to thesource; the forwarding table gives the next router and the interface the
message that thepacket should be sent out in this reverse direction.
The router uses this information toaccept a multicast packet only if it arrives from this
interface. This is needed to preventlooping. In multicasting, a packet may arrive at the
same router that has forwarded it.
Ifthe router does not drop all arrived packets except the one, multiple copies of the
packetwill be circulating in the internet.
The RPF algorithm helps a router to forward only one copy received from a source
anddrop the rest.
When we think about broadcasting in the second step, we need toremember that
destinations are all the networks (LANs) in the internet. To be efficient,we need to
prevent each network from receiving more than one copy of the packet.
If anetwork is connected to more than one router, it may receive a copy of the packet
fromeach router. RPF cannot help here, because a network does not have the
intelligence toapply the RPF algorithm; we need to allow only one of the routers
attached to a networkto pass the packet to the network.
There are several ways that the parent of the network related to a network can be
selected; one wayis to select the router that has the shortest path to the source (using
the unicast forwardingtable, again in the reverse direction).
In other words, after this we have ashortest-path tree with the source as the root and
all networks (LANs) as the leaves.
Every packet started from the source reaches all LANs in the internet travelling
theshortest path. Figure shows how RPB can avoid duplicate reception in a
networkby assigning a designated parent router, R1, for network N.
Fig: Reverse path broadcasting.[Source : Data Communications and Networking by
Behrouz A. Forouzan].
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 change the broadcast shortest-path tree to a multicast shortest-path tree, each router
needs to prune (make inactive) the interfaces that do not reach a network with active
members corresponding to a particular source-group combination.
This step can be done bottom-up, from the leaves to the root. At the leaf level, the
routersconnected to the network collect the membership information using the IGMP
protocol.
The parent router of the network can then disseminate thisinformation upward using
the reverse shortest-path tree from the router to the source, thesame way as the
distance vector messages are passed from one neighbor to another.
Fig:RPB vs RPF .[Source : Data Communications and Networking by Behrouz A.
Forouzan].
Multicast Open Shortest Path First (MOSPF) is the extension of the Open
ShortestPath First (OSPF) protocol, which is used in unicast routing. It uses the
sourcebasedtree approach to multicasting.
A router follow these steps to forward amulticast packet received from source S and
to be sent to destination G (a group ofrecipients):
The router uses the Dijkstra algorithm to create a shortest-path tree with S as the
root and all destinations in the internet as the leaves. Note that this shortest-path
tree is different from the one the router normally uses for unicast forwarding, in
which the root of the tree is the router itself.
Here, the root of the tree is thesource of the packet defined in the source address of the
packetThe router finds itself in the shortest-path tree created in the first step. In
otherwords, the router creates a shortest-path subtree with itself as the root of the
subtree.
The shortest-path subtree is actually a broadcast subtree with the router as the root and
all networks as the leaves.
The IGMP protocol is used to find the information at the leaf level. The router can
now forward the received packet out of only those interfaces that correspond to the
branches of the multicast tree.
Fig: Tree formation in MOSPF.[Source : Data Communications and Networking by
Behrouz A. Forouzan].
PIM uses theforwarding table of a unicast routing protocol to find the next router in a
path to thedestination, but it does not matter how the forwarding table is created.
Feature of PIM:
The term dense means that the number of active members of a group in the internet is
large;the probability that a router has a member in a group is high.
The term sparse, means that only a few routers in the internet have active members
in the group; the probability that a router has a member of the group is low.
When the number of routers with attached members is large relative to the number
ofrouters in the internet, PIM works in the dense mode and is called PIM-DM.
PIM-DM uses only two strategies described in DVMRP: RPF and RPM.
1. A router that has received a multicast packet from the source S destined for the
group G first uses the RPF strategy to avoid receiving a duplicate of the packet.
It consults the forwarding table of the unicast protocol to find the next router if
it wants to send a message to the source S (in the reverse direction).
If the packet has not arrived from the next router in the reverse direction, it
drops the packet and sends a prune (remove things which are not needed)
message in that direction to prevent receiving future packets related to (S, G).
Fig: Idea behind PIM- DM.[Source : Data Communications and Networking by Behrouz
A. Forouzan].
2. If the packet in the first step has arrived from the next router in the reverse
direction, the receiving router forwards the packet from all its interfaces except
the one from which the packet has arrived .
Note that this is broadcasting instead of a multicasting if the packet is the first packet
from the source S to group G.
Each router downstream that receives an unwanted packet sends a prune message to
the router upstream, and eventually the broadcasting is changed to multicasting.
When the number of routers with attached members is small relative to the number
ofrouters in the internet, PIM works in the sparse mode and is called PIM-SM.
PIM-SM uses a complex algorithm to select one router among all routers in the
internet as the RP for a specific group. This means that if we have m active groups,
weneed m RPs, although a router may serve more than one group.
After the RP for eachgroup is selected, each router creates a database and stores the
group identifier and theIP address of the RP for tunneling multicast packets to it.
PIM-SM uses a spanning multicast tree rooted at the RP with leaves pointing to
designated routers connected to each network with an active member. A very
interestingpoint in PIM-SM is the formation of the multicast tree for a group.
To create a multicast tree rooted at the RP, PIM-SM uses join and prune messages.
Figure (below) shows the operation of join and prune messages in PIM-SM.
First, threenetworks join group G1 and form a multicast tree. Later, one of the
networks leaves thegroup and the tree is pruned.
The join message is used to add possible new branches to the tree; the prune
messageis used to cut branches that are not needed.
When a designated router finds outthat a network has a new member in the
corresponding group (via IGMP), it sends ajoin message in a unicast packet destined
for the RP.
The packet travels through the unicastshortest-path tree to reach the RP. Any router in
the path receives and forwards thepacket, but at the same time, the router adds two
pieces of information to its multicastforwarding table.
Fig: Join and Prune message format .[Source : Data Communications and Networking by
Behrouz A. Forouzan].
The number of the interface through which the join message was sent to the RP is
marked(if not already marked) as the only interface through which the multicast
packet destinedfor the same group should be received.
In this way, the first join message sent by a designated router creates a path from the
RP to one of the networks with groupmembers.
To avoid sending multicast packets to networks with no members, PIM-SM uses
the prune message.
When the members of the groups are spread among different domains (ASs), we need
an interdomain multicast routing protocol.
One common protocol for interdomain multicast routing is called Multicast Border
Gateway Protocol (MBGP), which is the extension of BGP .
MBGP provides two paths between ASs: one for unicasting and one for
multicasting.
The problem with MBGP protocol is that it is difficult to inform an RP about the
sources of groups in other ASs. The Multicast Source Discovery Protocol (MSDP) is
anew suggested protocol that assigns a source representative router in each AS to
informall RPs about the existence of sources in that AS.
__________________________________________________________
Switch basics
Ethernet switches link Ethernet devices together by relaying Ethernet frames between
thedevices connected to the switches. By moving Ethernet frames between the switch
ports, aswitch links the traffic carried by the individual network connections into a
larger Ethernetnetwork.
Ethernet switches perform their linking function by bridging Ethernet frames between
Ethernet segments. To do this, they copy Ethernet frames from one switch port to
another, basedon the Media Access Control (MAC) addresses in the Ethernet frames.
Ethernet bridging wasinitially defined in the 802.1D IEEE Standard for Local and
Metropolitan Area Networks: MediaAccess Control (MAC) Bridges.
Frames are nothing more than arbitrary sequences of information whose format is
defined in a standard.
The format for an Ethernet frame includes a destination address at the beginning,
containing the address of the device to which the frame is being sent.
Next comes a source address, containing the address of the device sending the frame.
The addresses are followed by various other fields, including the data field that carries
the data being sent between computers
A router that is a member of both the backbone and a non-backbone area (R1) is
calleda area router.
• Border routers “summarize” routing information and make it available to other
areas -- act like proxies --reflect costs to reach networks from an area.
• When there are many possible routes, routers choose cost info to forward packets.
• Trade-offs -- Optimality versus scalability -- All packet have to pass through the
backbone area (may not be optimal).
BGP Messages:
BGP has four types of messages
– OPEN: Establish a connection with a BGP peer
• Note: BGP connection is TCP based ! (Port no. 179).
– UPDATE -- advertise or withdraw routes to a destination
• Note --BGP speaker needs to be able to cancel previously advertised
paths if nodes or links fail. This form of negative advertisements are
said to advertise “withdrawn routes”.
• KEEPALIVE: Inform a peer that the sender is still alive but has no information to
send.
• NOTIFICATION: Notify that errors are detected.
• 16 byte fields.
• For more detail look at book.
• Important thing --- BGP updates are of the type prefix/length
– 192.4.16/20
___________________________________________________________________
_________________________________________________________________
IPv6 ADDRESSING
An IPv6 address is 128 bits or 16 bytes(octets) long, four times the address length in
IPv4.
IPv6 address, in hexadecimal format, is very long, many of the digits
are zeros.
In this case, the leading zeros of a section canbe omitted. Using this form of
abbreviation, 0074 can be written as 74, 000F as F, and0000 as 0.
Address Space
The address space of IPv6 contains 2128 addresses. This address space is 296 times
theIPv4 address—definitely no address depletion—as shown, the size of the space is
Unicast Address
A unicast address defines a single interface (computer or router). The packet sent to
aunicast address will be routed to the intended recipient (Receiver).
Anycast Address
An anycast address defines a group of computers that all share a single address.
Apacket with an anycast address is delivered to only one member of the group, the
mostreachable one.
An anycast communication is used, for example, when there are severalservers that
can respond to an inquiry. The request is sent to the one that is most reachable.
Multicast Address
In anycasting, only one copy of the packet is sentto one of the members of the group;
in multicasting each member of the group receivesa copy.
Address Space Allocation
Like the address space of IPv4, the address space of IPv6 is divided into several
blocksof 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.
Each packet has a base header followedby the payload. The base header occupies 40
bytes, payload is upto 65,535 bytes of information.
Version.The 4-bit version field defines the version number of the IP. For IPv6,
thevalue is 6.
Traffic class.The 8-bit traffic class field is used to distinguish different payloadswith
different delivery requirements. It replaces the type-of-service field in IPv4.
Flow label. The flow label is a 20-bit field that is designed to provide special
handlingfor a particular flow of data.
Payload length.The 2-byte payload length field defines the length of the IP
datagram excluding the header.
Note that IPv4 defines two fields related to the length: header length and total length.
In IPv6, the length of the base header isfixed (40 bytes); only the length of the
payload needs to be defined.
Next header.The next header is an 8-bit field defining the type of the first extension
header (if present) or the type of the data that follows the base header in thedatagram.
Hop limit. The 8-bit hop limit field serves the same purpose as the TTL field in IPv4.
Source and destination addresses. The source address field is a 16-byte (128-
bit)Internet address that identifies the original source of the datagram.
The destinationaddress field is a 16-byte (128-bit) Internet address that identifies the
destination ofthe datagram.
Extension Header
An IPv6 packet is made of a base header and some extension headers. The length of
thebase header is fixed at 40 bytes.
Hop-by-Hop Option
The hop-by-hop option is used when the source needs to pass information to all
routersvisited by the datagram. For example, routers must be informed about
certainmanagement, debugging, or control functions.
Destination Option
The destination option is used when the source needs to pass information to the
destinationonly.
Source Routing
The source routing extension header combines the concepts of the strict source route
and the loose source route options of IPv4.
Fragmentation
In IPv6, only the original source can fragment. A source must use aPath MTU
Discovery technique to find the smallest MTU supported by any network
on the path. The source then fragments using this knowledge.
If the source does not use a Path MTU Discovery technique, it fragments the
datagramto a size of 1280 bytes or smaller. This is the minimum size of MTU required
foreach network connected to the Internet.
Authentication
It validates the messagesender and ensures the integrity of data. It is needed so the
receiver can besure that a message is from the genuine sender and not others.
Strategies
Three strategies are used 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.
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 encapsulatedin an IPv4 packet when it enters the region, and it leaves its capsule
when itexits the region.
It seems as if the IPv6 packet enters a tunnel at one end and emerges atthe other end.
To make it clear that the IPv4 packet is carrying an IPv6 packet as data,
the protocol value is set to 41.
Header Translation
Header translation is necessary when the majority of the Internet has moved to
IPv6but some systems still use IPv4.
The sender wants to use IPv6, but the receiver does notunderstand IPv6. Tunneling
does not work in this situation because the packet must bein 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 convertedto an IPv4 header.
___________________________________________________________