0% found this document useful (0 votes)
38 views

4 Module

The document discusses routing and forwarding in computer networks. It describes routing as the process of moving packets from source to destination by passing them along between intermediary computers. Routing algorithms can be static or dynamic, with dynamic routing preferred as it automatically updates routes in response to network changes. Common dynamic routing algorithms discussed include distance vector routing and link state routing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

4 Module

The document discusses routing and forwarding in computer networks. It describes routing as the process of moving packets from source to destination by passing them along between intermediary computers. Routing algorithms can be static or dynamic, with dynamic routing preferred as it automatically updates routes in response to network changes. Common dynamic routing algorithms discussed include distance vector routing and link state routing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

ROUTING

• Routing and Forwarding


• Static and Dynamic Routing
• Routing Algorithms
• Routing Protocols

EK AP, VISAT 1
Routing and Forwarding
• Routing - the process of moving a packet of data from source to destination.
• Routing is a key feature of the Internet because it enables messages to pass from
one computer to another and eventually reach the target machine.
• Each intermediary computer performs routing by passing along the message to the
next computer.
• The network layer is responsible for routing the packet from its source to the
destination.
• A physical network is a combination of networks (LANs and WANs) and routers
that connect them.
• This means that there is more than one route from the source to the destination.
• The network layer is responsible for finding the best one among these possible
routes.
• The network layer needs to have some specific strategies for defining the best route.
EK AP, VISAT 2
• This is done by running some routing protocols to help the routers coordinate
their knowledge about the neighborhood and to come up with consistent tables to
be used when a packet arrives.
• Forwarding - If routing is applying strategies and running some routing protocols
to create the decision-making tables for each router, forwarding can be defined as
the action applied by each router when a packet arrives at one of its interfaces.
• The decision-making table a router normally uses for applying this action is
sometimes called the forwarding table and sometimes the routing table.
• When a router receives a packet from one of its attached networks, it needs to
forward the packet to another attached network (in unicast routing) or to some
attached networks (in multicast routing).
• To make this decision, the router uses a piece of information in the packet header,
which can be the destination address or a label, to find the corresponding output
interface number in the forwarding table.

EK AP, VISAT 3
EK AP, VISAT 4
Static and Dynamic Routing
• Routing algorithms can be classified variously.
• The prior classification is based on the building and modification of a routing
table.
• This can be done in two manners statically or dynamically.
• More precisely these are known as static and dynamic routing respectively.
• Static routing, the table is set up and modified manually whereas in the Dynamic
routing the table is built automatically with the help of the routing protocols.
• Dynamic routing is preferred over static routing because of the major issue in
static routing where in case of link/node failure the system cannot recover.
• The dynamic routing overcomes from the static routing limitations.

EK AP, VISAT 5
Static Routing
• Static routing does not involve any change in routing table unless the network
administrator changes or modify them manually.
• Static routing algorithms function well where the network traffic is predictable.
This is simple to design and easy to implement.
• There is no requirement of complex routing protocols.
• The routing decisions are not made by current topology or traffic because the
static routing systems can not react to network changes hence it doesn’t require
extra resources to learn the changes.
• That is the reason, static routing is considered as inappropriate for large and
constantly changing networks.
• Static routing is also known as non-adaptive routing which enables a pre-
computed route to be fed into the routers offline.
• Static routes can be considered as an efficient method for a small and simple
network that does not change frequently.
EK AP, VISAT 6
Dynamic Routing
• Dynamic routing is a superior routing technique which alters the routing
information according to the altering network circumstances by examining the
arriving routing update messages.
• When the network change occurs, it sends out a message to the router to specify
that change, then the routes are recalculated and sent as a new routing update
message.
• These messages enabling the router to change their routing tables correspondingly.
• The technique uses routing protocols such as RIP, OSPF, BGP, etc.
• Unlike static routing, it does not require manual updation instead its automatic in
manner and updates the routing table information periodically relying upon
network conditions.
• Dynamic routing or otherwise called as adaptive routing.
• The routing decisions are altered in these algorithms to mirror the changes in the
topology or traffic. EK AP, VISAT 7
• There are various adaptive algorithms which can be classified according to the
✓Source of information (from where router get the information, adjacent routers or
from all routers),
✓Change in routes (whether the route is changing when load changes or when
topology changes),
✓Optimization metrics used (distance, number of hops, residual bandwidth).
• The routes on which dynamic routing is performed are known as dynamic routes
where the information is responsive to changes in the network so that it is
consistently being updated.
• Though, there is always a slack between the period that a network changes and
when all the routers are informed about the change.
• The router tries to match the network change, and it causes a delay which is also
known as convergence time.
• The convergence time must be shorter.
• The larger network requires dynamic routing because with static routing larger
networks could not be manageable andEK AP,result
VISAT in loss of connectivity. 8
Advantages and Disadvantages Static Routing

Advantages -
• Easily implemented in a small network.
• No overheads are produced on router CPU.
• Secure because the routes are managed statically.
• It is predictable as the route to the destination is fixed.
• Extra resources (such as CPU and memory) are not required as update mechanisms
are not needed.
Disadvantages -
• Unsuitable for complex topologies and large networks.
• Large networks increase configuration complexity and time consumption.
• Link failure can hinder traffic rerouting.
• The administrator must be extra careful while configuring the routes.
EK AP, VISAT 9
Advantages and Disadvantages of Dynamic Routing

Advantages -
• Suitable for all the topologies.
• Network size doesn’t affect the router operations.
• Issues due to link failure can be overcome.
• Topologies are adapted automatically to reroute the traffic.
Disadvantages -
• Initially, it could be complicated to implement.
• The broadcasting and multicasting of routing updates make it less secure.
• Routes rely on current topologies.
• Additional resources are required such as CPU, memory and link bandwidth.
EK AP, VISAT 10
ROUTING ALGORITHMS
• Distance Vector Routing Algorithm
• Link State Routing Algorithm
• Dijkstra’s Algorithm

EK AP, VISAT 11
Least-Cost Routing
• 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 Figure 20.1, 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.

EK AP, VISAT 12
• If we have only 10 routers in an internet, we need 90 least-cost paths. A better way to see all
of these paths is to combine them in a least-cost tree.
• A least-cost tree is a tree with the source router as the root that spans the whole network.

EK AP, VISAT 13
Distance Vector Routing
• Modern computer networks generally use dynamic routing algorithms rather
than the static ones described above because static algorithms do not take
the current network load into account.
• Two dynamic algorithms in particular, distance vector routing and link
state routing, are the most popular.
• Distance vector routing algorithms operate by having each router maintain a
table (i.e, a vector) giving the best known distance to each destination and
which line to use to get there. These tables are updated by exchanging
information with the neighbours.
• The distance vector routing algorithm is sometimes called by other names,
most commonly the distributed Bellman-Ford routing algorithm and the
Ford-Fulkerson algorithm
EK AP, VISAT 14
• 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.
• Figure 20.4 shows the tree for node A in the internet in Figure 20.1 and the
corresponding distance vector.
• Note that the name of the distance vector defines the root, the indexes define the
destinations, and the value of each cell defines the least cost from the root to the
destination.
• A distance vector does not give the path to the destinations as the least-cost tree
does; it gives only the least costs to the destinations.
• Each node in an internet, when it is booted, creates a 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. EK AP, VISAT 15
• It then makes a simple distance vector by inserting the discovered distances
in the corresponding cells and leaves the value of other cells as infinity. (fig
next slide)

Figure 20.4

EK AP, VISAT 16
EK AP, VISAT 17
• These simple 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 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.
• 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 cEB = 4.
EK AP, VISAT 18
EK AP, VISAT 19
Count to infinity problem
• One of the important issue in Distance Vector Routing is County of Infinity Problem.
• Counting to infinity is just another name for a routing loop.
• In distance vector routing, routing loops usually occur when an interface goes down.
• It can also occur when two routers send updates to each other at the same time.
• Example:

EK AP, VISAT 20
• Imagine a network with a graph as shown above in figure (fig a)
• In this graph, there is only one link between A and the other parts of the
network.
• Now imagine that the link between A and B is cut. (fig b)
• At this time, B corrects its table.
• After a specific amount of time, routers exchange their tables, and so B receives
C's routing table.
• Since C doesn't know what has happened to the link between A and B, it says
that it has a link to A with the weight of 2 (1 for C to B, and 1 for B to A -- it
doesn't know B has no link to A).
• B receives this table and thinks there is a separate link between C and A, so it
corrects its table and changes infinity to 3 (1 for B to C, and 2 for C to A, as C
said).
• Once again, routers exchange their tables.
EK AP, VISAT 21
• When C receives B's routing table, it sees that B has changed the weight of its
link to A from 1 to 3, so C updates its table and changes the weight of the link to
A to 4 (1 for C to B, and 3 for B to A, as B said).
• This process loops until all nodes find out that the weight of link to A is infinity.
• This situation is shown in the fig.
• In this way, Distance Vector Algorithms have a slow convergence rate.
• Split Horizon - One way to solve this problem is for routers to send
information only to the neighbours that are not exclusive links to the
destination.
• For example, in this case, C shouldn't send any information to B about A,
because B is the only way to A.

EK AP, VISAT 22
Link State Routing
• Distance vector routing was replaced by link state routing.
• Two primary problems caused its demise.
• First, since the delay metric was queue length, it did not take line bandwidth into account
when choosing routes.
• Second problem also existed, namely, the algorithm often took too long to converge (the
count-to-infinity problem).
• The idea behind link state routing is simple and can be stated as five parts. Each router must
do the following:
• Discover its neighbours and learn their network addresses.
• Measure the delay or cost to each of its neighbours. Building Link state
• Construct a packet telling all it has just learned. Database
• Send this packet to all other routers.
• Compute the shortest path to every other router. Formation of Least Cost Trees

• Then Dijkstra's algorithm can be run to find the shortest path (Least Cost Tree)
EK AP, VISAT 23
a) Learning about the Neighbours
• When a router is booted, its first task is to learn who its neighbours are.
• It accomplishes this goal by sending a special HELLO packet on each point-
to-point line.
• The router on the other end is expected to send back a reply telling who it is.
b) Measuring Line Cost
• The link state routing algorithm requires each router to know, or at least
have a reasonable estimate of, the delay to each of its neighbours.
• The most direct way to determine this delay is to send over the line a special
ECHO packet that the other side is required to send back immediately.
• By measuring the round-trip time and dividing it by two, the sending router
can get a reasonable estimate of the delay.
• For even better results, the test can be conducted several times, and the
average used.
EK AP, VISAT 24
c) Building Link State Packets
• After the initial two steps each node collect two pieces of information about its 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, as shown in Figure 20.9 for our internet in Figure 20.1.

EK AP, VISAT 25
d) Distributing the Link State Packets
• The trickiest part of the algorithm is distributing the link state packets reliably.
• The fundamental idea is to use flooding to distribute the link state packets.
• To keep the flood in check, each packet contains a sequence number that is
incremented for each new packet sent.
• Routers keep track of all the (source router, sequence) pairs they see.
• When a new link state packet comes in, it is checked against the list of packets already
seen.
• If it is new, it is forwarded on all lines except the one it arrived on.
• If it is a duplicate, it is discarded.
• After receiving all new LSPs, each node creates the comprehensive LSDB as shown in
Figure (Next).
• This LSDB is the whole map of the internet.
• In other words, a node can make the whole map if it needs to, using this LSDB.
EK AP, VISAT 26
EK AP, VISAT 27
• We can compare the link-state routing algorithm with the distance-vector routing
algorithm.
• 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.

e) Computing the New Routes (Formation of Least Cost Trees)


• Once a router has accumulated a full set of link state packets, it can construct the whole
map of the internet.
• Dijkstra's algorithm can be run locally to construct the shortest path to all possible
destinations.
• The results of this algorithm can be installed in the routing tables, and normal operation
resumed.

EK AP, VISAT 28
Dijkstra Algorithm
• To create a least-cost tree for itself, using the shared LSDB, each node needs to run
the famous Dijkstra Algorithm. This iterative algorithm uses the following steps:
1. The node chooses itself as the root of the tree, creating a tree with a single node, and
sets the total cost of each node based on the information in the LSDB.
2. The node selects one node, among all nodes not in the tree, which is closest to the root,
and adds this to the tree. After this node is added to the tree, the cost of all other nodes
not in the tree needs to be updated because the paths may have been changed.
3. The node repeats step 2 until all nodes are added to the tree.

EK AP, VISAT 29
EK AP, VISAT 30
EK AP, VISAT 31
ROUTING PROTOCOL
• Routing Information Protocol (RIP)
• Open Shortest Path First (OSPF)
• Border Gateway Protocol (BGP)
• Multi-Protocol Label Switching (MPLS)

EK AP, VISAT 32
Autonomous System (Inter-domain & Intra-domain)
• An autonomous system (AS) is a network or a collection of networks that are all managed
and supervised by a single entity or organization.
• Autonomous systems were introduced to regulate organizations such as Internet service
providers (ISP), educational institutions and government bodies.
• These systems are made up of many different networks but are operated under the umbrella
of a single entity for easy management.
• An autonomous system is considered as a domain.
• Inter-domain (between domains) is any routing protocols that you have setup between two
different networks (AS). The main inter-domain protocol is BGP.
• Intra-domain(within domain) is any routing with in a network. (With in an AS)
• For that you can use OSPF, RIP, EIGRP Intra-domain routing protocols.
• The routing protocol run in each AS is also referred to as intra-AS routing protocol or
interior gateway protocol (IGP)
• The global routing protocol is also referred to as inter-AS routing protocol or exterior
gateway protocol (EGP). EK AP, VISAT 33
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.
• A router in this protocol basically implements the distance-vector routing algorithm.
• The modified algorithm described as –
• 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 different
networks instead of reaching other nodes in a theoretical graph.
• Second, to make the implementation of the cost simpler, 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.
• Figure 20.15 shows the concept of hop count advertised by three routers from a source
host to a destination host. In RIP, the maximum cost of a path can be 15, which means 16
is considered as infinity (no connection).
• For this reason, RIP can be used only in autonomous systems in which the diameter of
the AS is not more than 15 hops. EK AP, VISAT 34
EK AP, VISAT 35
• 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.
• Figure 20.16 shows the three forwarding tables for the routers in Figure 20.15.

EK AP, VISAT 36
• Although a forwarding table in RIP defines only the next router in the second
column, it gives the information about the whole least-cost tree based on the second
property of these trees, discussed in the previous section.
• For example, R1 defines that the next router for the path to N4 is R2; R2 defines that
the next router to N4 is R3; R3 defines that there is no next router for this path.
• The tree is then R1 → R2 → R3 → N4.
• RIP Messages - RIP-2 defines the format of the message, as shown in Figure 20.17.
• 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 request message can ask about specific entries or all entries.
• A response (or update) message can be either solicited or unsolicited.
EK AP, VISAT 37
• A solicited response message is sent only in answer to a request message.
• It contains information about the destination specified in the corresponding 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.

EK AP, VISAT 38
• 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.
• 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. EK AP, VISAT 39
Performance
• Update Messages. The update messages in RIP have a very simple format and are
sent only to neighbors; they are local.
• They do not normally create traffic because the routers try to avoid sending them
at the same time.
• 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.
• Robustness. As we said before, distance-vector routing is based on the concept
that each router sends what it knows about its neighbors.
• This means that 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.
EK AP, VISAT 40
Open Shortest Path First (OSPF)
• It is also an intradomain routing protocol like RIP.
• Based on the link-state routing protocol.
• 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 administration can also decide to use the hop count as the cost.
• An interesting point about the cost in OSPF is that different service types (TOSs)
can have different weights as the cost.
• Figure 20.19 shows the idea of the cost from a router to the destination host
network.

EK AP, VISAT 41
EK AP, VISAT 42
• 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 20.20 shows the forwarding tables for the simple AS in Figure 20.19.
• Comparing the forwarding tables for the OSPF and RIP in the same AS, we find that the
only difference is the cost values.
• In other words, if we use the hop count for OSPF, the tables will be exactly the same.

EK AP, VISAT 43
• 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.
• In OSPF all routers flood the whole AS with their LSPs to create the global
LSDB.
• 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.
• Each router in an area needs to know the information about the link states not
only in its area but also in other areas.
• For this 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.
EK AP, VISAT 44
EK AP, VISAT 45
• Link-State Advertisement –
• Five types of link-state advertisements: router link, network link, summary link to
network, summary link to AS border router, and external link.
• Figure 20.22 shows these five advertisements and their uses.
• 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.
• A stub link advertises a link to a stub network, a network that is not a through
network.
• 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.
• 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.
EK AP, VISAT 46
• Summary link to AS. This is done by an AS router that advertises the summary
links from other ASs to the backbone area.
• 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.
• 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. EK AP, VISAT 47
• 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.
• Robustness. The OSPF protocol is more robust than RIP because, after
receiving the completed LSDB, each router is independent and does not
depend on other routers in the area. Corruption or failure in one router does
not affect other routers as seriously as in RIP.

EK AP, VISAT 48
Exterior Routing Protocol

• A type of routing protocol used to distribute routing information between


different autonomous systems in large internetworks based on the TCP/IP
protocol.
• It specify how networks within an autonomous system are advertised to
routers outside the given autonomous system.
• It facilitate the exchange of inter-autonomous-system routing information
between different autonomous systems, independent of whether these
autonomous systems employ the same Interior Gateway Protocols (IGPs)
within their networks.

EK AP, VISAT 49
Border Gateway Protocol Version 4 (BGP4)
• The Border Gateway Protocol version 4 (BGP4) is the only interdomain routing
protocol (Exterior Routing Protocol) used in the Internet today.
• BGP, and in particular BGP4, is a complex protocol.
• Figure (next) shows an example of an internet with four autonomous systems.
• AS2, AS3, and AS4 are stub (only one connection to the BGP graph) autonomous
systems; AS1 is a transient one (backbones, which are willing to handle third-party
packets ).
• In our example, data exchange between AS2, AS3, and AS4 should pass through
AS1.
• Each autonomous system in this 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.
EK AP, VISAT 50
EK AP, VISAT 51
• 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
(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)
• The eBGP variation of BGP allows two physically connected border routers in
two different ASs to form pairs of eBGP and exchange messages.
• The routers that are eligible in our example in Figure (next) form three pairs:
R1-R5, R2-R6, and R4- R9.
EK AP, VISAT 52
• The connection between these pairs is established over three physical WANs
(N5, N6, and N7).
• However, 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 is referred to as a session.
• This means that we need three sessions in our example, as shown in Figure
(next).
• The figure also shows the simplified update messages sent by routers involved
in the eBGP sessions.
• The circled number defines the sending router in each case.
• 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).
EK AP, VISAT 53
EK AP, VISAT 54
• 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.
• Messages exchanged during three eBGP sessions help some routers know how
to route packets to some networks in the internet.
• But the reachability information is not complete.
• Some border routers do not know how to route a packet destined for non
neighbour 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.
EK AP, VISAT 55
• To address the problems, we need to allow all pairs of routers (border or
nonborder) to run the second variation of the BGP protocol, iBGP.
Operation of Internal BGP (iBGP)
• The iBGP protocol is similar to the eBGP protocol in that it uses the service of
TCP on the well-known port 179, but it creates a session between any possible
pair of routers inside an autonomous system.
• However, some points should be made clear.
• 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.
• In other words, 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.
• Figure (next) shows the combination of eBGP and iBGP sessions in our
internet.
EK AP, VISAT 56
EK AP, VISAT 57
• 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 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.
• At this time, each router combines the information received from eBGP and
iBGP and creates what we may call a path table.
EK AP, VISAT 58
EK AP, VISAT 59
• To demonstrate, we show the path tables in Figure (previous) for the routers.
• For example, router R1 now knows that any packet destined for networks N8
or N9 should go through AS1 and AS2 and the next router to deliver the
packet to is router R5.
• Similarly, router R4 knows that any packet destined for networks N10, N11,
or N12 should go through AS1 and AS3 and the next router to deliver this
packet to is router R1, and so on.
Injection of Information into Intradomain Routing
• The role of an interdomain routing protocol such as BGP is to help the routers
inside the AS to augment their routing information.
• In other words, the path tables collected and organized by BPG are not used,
for routing packets; they are injected into intradomain forwarding tables (RIP
or OSPF) for routing packets.
• This can be done in several ways depending on the type of AS.
EK AP, VISAT 60
EK AP, VISAT 61
Address Aggregation
• The reader may have realized that intradomain forwarding tables obtained
with the help of the BGP4 protocols may become huge in the case of the
global Internet because many destination networks may be included in a
forwarding table.
• So the address will be aggregated. For example, prefixes 14.18.20.0/26,
14.18.20.64/26, 14.18.20.128/26, and 14.18.20.192/26, can be combined into
14.18.20.0/24 if all four subnets can be reached through one path.
Path Attributes
• 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.

EK AP, VISAT 62
• The following gives a brief description of each attribute.
• ORIGIN (type 1). This is a well-known mandatory attribute, which defines the
source of the routing information.
• AS-PATH (type 2). This is a well-known mandatory attribute, which defines the list
of autonomous systems through which the destination can be reached.
• NEXT-HOP (type 3). This is a well-known mandatory attribute, which defines the
next router to which the data packet should be forwarded.
• MULT-EXIT-DISC (type 4). The multiple-exit discriminator is an optional
intransitive attribute, which discriminates among multiple exit paths to a destination.
• LOCAL-PREF (type 5). The local preference attribute is a well-known
discretionary attribute. Indicate the preference of the route.
• ATOMIC-AGGREGATE (type 6). This is a well-known discretionary attribute,
which defines the destination prefix as not aggregate; it only defines a single
destination network.
• AGGREGATOR (type 7). This is an optional transitive attribute, which
emphasizes that the destination prefix is an
EK AP, VISATaggregate. 63
Route Selection
• In the case where multiple routes are received to a destination, BGP needs to
select one among them.
• The route selection process in BGP is not as easy as the ones in the
intradomain routing protocol that is based on the shortest-path tree.
• A route in BGP has some attributes attached to it and it may come from an
eBGP session or an iBGP session.
• The router extracts the routes which meet the criteria.
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.

EK AP, VISAT 64
• 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.

EK AP, VISAT 65
Multiprotocol Label Switching (MPLS)
• Multiprotocol Label Switching (MPLS) is a protocol designed to speed up and
shape traffic flows across enterprise wide area and service provider networks.
• MPLS allows most data packets to be forwarded at Layer 2 -- the switching level
-- rather than having to be passed up to Layer 3 -- the routing level.
• For this reason, it is often informally described as operating at Layer 2.5.
• MPLS was created in the late 1990s as a more efficient alternative to traditional
IP routing.
• In IP routing each router to independently determine a packet's next hop by
inspecting the packet's destination IP address before consulting its own routing
table.
• This process consumes time and hardware resources, potentially resulting in
degraded performance for real-time applications such as voice and video.
EK AP, VISAT 66
• In an MPLS network, the very first router to receive a packet determines the packet's
entire route upfront, the identity of which is quickly conveyed to subsequent routers
using a label in the packet header.
• While router hardware has improved exponentially since MPLS was first developed -
- somewhat diminishing its significance as a more efficient traffic management
technology.
• It remains important and popular due to its various other benefits, particularly
security, flexibility and traffic engineering.
Components of MPLS
• One of the defining features of MPLS is its use of labels -- the L in MPLS.
• Sandwiched between Layers 2 and 3, a label is a four-byte -- 32-bit -- identifier that
conveys the packet's predetermined forwarding path in an MPLS network.
• Labels can also contain information related to quality of service (QoS), indicating a
packet's priority level.
EK AP, VISAT 67
• MPLS labels consist of four parts:
▪ Label value: 20 bits
▪ Experimental: 3 bits
▪ Bottom of stack: 1 bit
▪ Time to live: 8 bits
• The paths, which are called label-switched paths (LSPs), enable service providers
to decide ahead of time the best way for certain types of traffic to flow within a
private or public network.
How an MPLS network works
• In an MPLS network, each packet gets labeled on entry into the service provider's
network by the ingress router, also known as the label edge router (LER).
• This is also the router that decides the LSP the packet will take until it reaches its
destination address.
• All the subsequent label-switching routers (LSRs) perform packet forwarding
based only on those MPLS labels -- they never look as far as the IP header.
• Finally, the egress router removes the labels and forwards the original IP packet
toward its final destination. EK AP, VISAT 68
69
• When an LSR receives a packet, it performs one or more of the following actions:
• Push: Adds a label. This is typically performed by the ingress router.
• Swap: Replaces a label. This is usually performed by LSRs between the
ingress and egress routers.
• Pop: Removes a label. This is most often done by the egress router.
Advantages of MPLS
• Service providers and enterprises can use MPLS to implement QoS by
defining LSPs that can meet specific service-level agreements on traffic
latency, jitter, packet loss and downtime.
• For example, a network might have three service levels that prioritize
different types of traffic -- e.g., one level for voice, one level for time-
sensitive traffic and one level for best effort traffic.
• MPLS also supports traffic separation and the creation of virtual private
networks (VPNs), virtual private LAN services and virtual leased lines.
70
• One of the most notable benefits of MPLS is that it is not tied to any one
protocol or transport medium.
• It supports transport over Internet Protocol (IP), Ethernet, Asynchronous
Transfer Mode (ATM) and frame relay; any of these protocols can be used
to create an LSP.
• Generalized Multi-Protocol Label Switching (GMPLS) extends MPLS to
manage time-division multiplexing (TDM), lambda switching and other
classes of switching technologies beyond packet switching.

EK AP, VISAT 71

You might also like