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

Unit 3 - Dynamic Routing

Advance Interneworking notes

Uploaded by

prafren
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Unit 3 - Dynamic Routing

Advance Interneworking notes

Uploaded by

prafren
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Unit 3: Dynamic Routing LH 8

Basic routing
Levels of abstraction
Partitioning: AS and areas
Autonomous systems- RFC1930
Simple internet architecture
Reachability and metrics
IP aggregation
Redistribution of routing information
Load balancing
Popular routing protocols
Distance vector
RIP(Routing Information Protocol),
RIP problem (count to infinity),
Solution (Triggered Update, split horizon, poison reserve, and hold
down))
Disadvantage with RIP.
Link State Protocols
Dijkstra algorithm (shortest path first)
Overview of OSPF
OSPF Network Topology
OSPF protocols (hello, exchange, flooding)
Distribution of link state advertisement
IS-IS
Path vector
Overview of path vector
BGP (overview and architecture)
BGP router model
Routing
 Routing is the process of selecting path along which the data can be transferred from
source to the destination. Routing is performed by a special device known as a router.
 A Router works at the network layer (layer 3) in the OSI model and internet layer in
TCP/IP model
 A router is a networking device that forwards the packet based on the network layer
information available in the packet header and forwarding table.
 The routing algorithms/protocols are used for routing the packets. The routing protocol
is nothing but a software responsible for deciding the optimal path through which
packet can be transmitted.
 The routing protocols use the metric to determine the best path for the packet delivery.
The metric is the standard of measurement such as hop count, bandwidth, delay, current
load on the path, etc. used by the routing algorithm to determine the optimal path to the
destination.
 The routing algorithm initializes and maintains the routing table for the process of path
determination.

Routing Types

Static Routing Dynamic Routing

Interior Gateway Protocol Exterior Gateway Protocol

Distance Vector Link State Path Vector


eg. RIP eg. OSPF, IS-IS eg. BGP

Static Routing
 Static Routing is also known as Nonadaptive Routing.
 It is a technique in which the administrator manually adds the routes in a routing table.
 A Router can send the packets for the destination along the route defined by the
administrator.
 In this technique, routing decisions are not made based on the condition or topology of
the networks

Advantages of Static Routing


 No Overhead: It has ho overhead on the CPU usage of the router. Therefore, the
cheaper router can be used to obtain static routing.
Bandwidth: It has not bandwidth usage between the routers.
Security: It provides security as the system administrator is allowed only to have
control over the routing to a particular network.

Disadvantages of Static Routing:


 For a large network, it becomes a very difficult task to add each route manually to the
routing table.
 The system administrator should have a good knowledge of a topology as he has to
add each route manually.
 If a link fails, a static route cannot reroute traffic.

Default Routing
Default Routing is a special case of Static Routing
 Default Routing is a technique in which a router is configured to send all the packets to
the same hop device, and it doesn't matter whether it belongs to a particular network or
not. A Packet is transmitted to the device for which it is configured in default routing.
 Default Routing is used when networks deal with the single exit point.
 It is also useful when the bulk of transmission networks have to transmit the data to the
same device.
 When a specific route is mentioned in the routing table, the router will choose the
specific route rather than the default route. The default route is chosen only when a
specific route is not mentioned in the routing table

Dynamic Routing
 It is also known as Adaptive Routing.
 It is a technique in which a router adds a new route in the routing table for each packet
in response to the changes in the condition or topology of the network.
 Dynamic protocols are used to discover the new routes to reach the destination.
 If any route goes down, then the automatic adjustment will be made to reach the
destination.

The Dynamic protocol should have the following features:


 All the routers must have the same dynamic routing protocol in order to exchange the
routes.
 If the router discovers any change in the condition or topology, then router broadcast
this information to all other routers.

Advantages of Dynamic Routing:


 It is easier to configure.
 It is usually independent of the network size.
 It is more effective in selecting the best route in response to the changes in the
condition or topology.

Disadvantages of Dynamic Routing:


 It is more expensive in terms of CPU and bandwidth usage.
 It is less secure as compared to default and static routing.

Homework
1. Compare between static and dynamic routing.
Distance Vector Routing Protocol

RIP (Routing Information Protocol)


RIP is a standardized Distance Vector protocol, designed for use on smaller
networks. RIP was one of the first true Distance Vector routing protocols, and is supported on
a wide variety of systems.
RIP adheres to the following Distance Vector characteristics:
 RIP sends out periodic routing updates (every 30 seconds)
 RIP sends out the full routing table every periodic update
 RIP uses a form of distance as its metric (in this case, hop-count)
 RIP uses the Bellman-Ford Distance Vector algorithm to determine the” best path”
to a particular destination
Other characteristics of RIP include:
• RIP utilizes UDP port 520
• RIP routes have an administrative distance of 120.
• RIP has a maximum hop-count of 15 hops.
Any network that is 16 hops away or more is considered unreachable to RIP, thus the
maximum diameter of the network is 15 hops. A metric of 16 hops in RIP is considered a
poison route or infinity metric.
If multiple paths exist to a particular destination, RIP will load balance between those
paths only if the metric (hop-count) is equal. RIP uses a round-robin system of load-
balancing between equal metric routes, which can lead to pinhole congestion.

RIP Versions
RIP has two versions, Version 1 (RIPv1) and Version 2 (RIPv2).
 RIPv1 (RFC 1058) is classfull, and thus does not include the subnet mask with its
routing table updates. Because of this, RIPv1 does not support Variable Length Subnet
Masks (VLSMs). RIPv1 sends updates as broadcasts to address 255.255.255.255.

 RIPv2 (RFC 2543) is classless, and thus does include the subnet mask with its routing
table updates. RIPv2 fully supports VLSMs, allowing discontiguous networks and
varying subnet masks to exist. Other enhancements offered by RIPv2 include:
• Routing updates are sent via multicast, using address 224.0.0.9
• Encrypted authentication can be configured between RIPv2 routers
Count to Infinity Problem in RIP

Let’s assume no loop avoidance mechanisms are configured on either router. If the
172.18.0.0 network fails, Router B will send out an update to Router A within 30 seconds
(whenever its update timer expires) stating that route is unreachable (metric = 16).
But what if an update from Router A reaches Router B before this can happen? Router
A believes it can reach the 172.18.0.0 network in one hop (through Router B). This will cause
Router B to believe it can reach the failed 172.18.0.0 network in two hops, through Router A.
Both routers will continue to increment the metric for the network until they reach a hop
count of 16, which is unreachable. This behaviour is known as count to infinity and is an
undesired event.

How can we tackle this problem? There are several loop avoidance mechanisms:
Split-Horizon
It prevents a routing update from being sent out the interface it was received on. In
other words, routers do not report information back to the router from which their
information originated.
In our above example, split-horizon would prevent Router A from sending an update
for the 172.18.0.0 network back to Router B, as it originally learned the route from
Router B. Split-horizon is enabled by default on most of the Routers.
Poison Reverse + Split Horizon
In case of a failed link it advertises the reverse routes with a metric of 16 (i.e.
unreachable). When learning of a failed route, it suspends split-horizon rules for that
route, and advertises a poisoned route. It does not add information but helps to break
the loop faster.
Route-Poisoning / Triggered Update
It triggers an automatic update for the failed network, without waiting for the update
timer to expire. This update is sent out all interfaces with an infinite metric (hop-count
16) for that network.
Hold-Down Timers
Prevents RIP from accepting any new updates for routes in a hold-down state, until
the hold-down timer expires. If Router A sends an update to Router B with a higher
metric than what is currently in Router B’s routing table, that route will be placed in a
hold-down state. (Router A’s metric for the 172.18.0.0 network is 1; while Router B’s
metric is 0).

Advantages of RIP
• Easy to understand and configure
• Supports load balancing
• Usually Loop Free
• Supported by most of the routers.

Disadvantages of RIP
• Inefficient (consumes significant bandwidth as whole routing table is exchanged)
• Not suitable for larger network (i.e. max hop count =15)
• Slow convergence.
• Support only equal-cost load balancing (Pinhole congestion)
• The smallest hop may not be the fastest route as it doesn’t consider bandwidth of link.
Convergence in RIP (*for explanation only)

Fig 1: Initial
Routing Table
Before exchange of
RIP updates

Based on this topology, a listing of the different updates that R1, R2, and R3 send and receive during initial
convergence is provided

R1:
 Sends an update about network 10.1.0.0 out the Serial 0/0/0 interface
 Sends an update about network 10.2.0.0 out the FastEthernet 0/0 interface
 Receives update from R2 about network 10.3.0.0 and increments the hop count by 1
 Stores network 10.3.0.0 in the routing table via Serial 0/0/0 with a metric of 1

R2:
 Sends an update about network 10.3.0.0 out the Serial 0/0/0 interface
 Sends an update about network 10.2.0.0 out the Serial 0/0/1 interface
 Receives an update from R1 about network 10.1.0.0 and increments the hop count by 1
 Stores network 10.1.0.0 in the routing table via Serial 0/0/0 with a metric of 1
 Receives an update from R3 about network 10.4.0.0 and increments the hop count by 1
 Stores network 10.4.0.0 in the routing table via Serial 0/0/1 with a metric of 1

R3:
 Sends an update about network 10.4.0.0 out the Serial 0/0/1 interface
 Sends an update about network 10.3.0.0 out the FastEthernet 0/0 interface
 Receives an update from R2 about network 10.2.0.0 and increments the hop count by 1
 Stores network 10.2.0.0 in the routing table via Serial 0/0/1 with a metric of 1

Fig 2: Routing
Table after Initial
Exchange
After this first round of update exchanges, each router knows about the connected networks of its
directly connected neighbors. However, did you notice that R1 does not yet know about 10.4.0.0 and that R3
does not yet know about 10.1.0.0? Full knowledge and a converged network do not take place until there is
another exchange of routing information.

After initial discovery is complete, each router continues the convergence process by sending and
receiving the following updates.

R1:
 Sends an update about network 10.1.0.0 out the Serial 0/0/0 interface
 Sends an update about networks 10.2.0.0 and 10.3.0.0 out the FastEthernet 0/0 interface
 Receives an update from R2 about network 10.4.0.0 and increments the hop count by 1
 Stores network 10.4.0.0 in the routing table via Serial 0/0/0 with a metric of 2
 Same update from R2 contains information about network 10.3.0.0 with a metric of 1. There is no
change; therefore, the routing information remains the same.

R2:
 Sends an update about networks 10.3.0.0 and 10.4.0.0 out of Serial 0/0/0 interface
 Sends an update about networks 10.1.0.0 and 10.2.0.0 out of Serial 0/0/1 interface
 Receives an update from R1 about network 10.1.0.0. There is no change; therefore, the routing
information remains the same.
 Receives an update from R3 about network 10.4.0.0. There is no change; therefore, the routing
information remains the same.

R3:
 Sends an update about network 10.4.0.0 out the Serial 0/0/1 interface
 Sends an update about networks 10.2.0.0 and 10.3.0.0 out the FastEthernet 0/0 interface
 Receives an update from R2 about network 10.1.0.0 and increments the hop count by 1
 Stores network 10.1.0.0 in the routing table via Serial 0/0/1 with a metric of 2
 Same update from R2 contains information about network 10.2.0.0 with a metric of 1. There is no
change; therefore, the routing information remains the same.

Fig 3: Routing
Table After
Convergence
RIP Timers(*for explanation only)
RIP has four basic timers:
1. Update Timer (default 30 seconds) – indicates how often the router will send out a routing table
update.
2. Invalid Timer (default 180 seconds) – indicates how long a route will remain in a routing table
before being marked as invalid, if no new updates are heard about this route.
The invalid timer will be reset if an update is received for that particular route before the
timer expires. A route marked as invalid is not immediately removed from the routing table.
Instead, the route is marked (and advertised) with a metric of 16, indicating it is unreachable, and
placed in a hold-down state.
3. Hold-down Timer (default 180 seconds) – indicates how long RIP will “suppress” a route that it
has placed in a hold-down state. RIP will not accept any new updates for routes in a hold-down
state, until the hold-down timer expires. A route will enter a hold-down state for one of three
reasons:
• The invalid timer has expired.
• An update has been received from another router, marking that route with a metric of 16 (or
unreachable).
• An update has been received from another router, marking that route with a higher metric
than what is currently in the routing table. This is to prevent loops.
4. Flush Timer (default 240 seconds) – indicates how long a route can remain in a routing table
before being flushed, if no new updates are heard about this route. The flush timer runs
concurrently with the invalid timer, and thus will flush out a route 60 seconds after it has been
marked invalid.
Note: RIP timers must be identical on all routers on the RIP network, otherwise massive instability
will occur.

Administrative Distance
Administrative Distance (AD) is a value that routers use in order to select the best path when
there are two or more different routes to the same destination from two different routing protocols.
Administrative Distance counts the reliability of a routing protocol. Administrative Distance (AD) is a
numeric value which can range from 0 to 255. A smaller Administrative Distance (AD) is more trusted
by a router, therefore the best Administrative Distance (AD) being 0 and the worst, 255.

Administrative Distance (AD) Route Type


0 Connected Interface
0 or 1 Static Route
110 OSPF Route
115 IS-IS
120 RIP

Link State Routing Protocols


-eg: OSPF & IS-IS

Link- State Routing


• Each router spreads information about its links to its neighbours.
• This information is flooded to every router in the routing domain so that every router
has the knowledge of entire network topology.
• Using Dijkstra algorithm, the shortest path to each prefix in the network is
calculated.
Dijkstra algorithm (*important for numerical)
1. Remove all the loops (Any edge that starts and ends at the same vertex is loop)
2. Remove all parallel edges between two vertices except the one with least weight.
3. Create the weight matrix table
i. Set 0 to the source vertex and infinite to the remaining vertices.
ii. Mark the smallest unmarked value and also mark that vertex.
iii. Find those vertices which are directly connected with marked vertex and update
value as following Update value formula.
New Destination value = minimum (Old Destination value, Marked value+ Edge Weight)
For all vertices, repeat (ii) and (iii)
4. Find the shortest path from source to destination using backtracking.
Put destination vertex in ‘shortest path’
i. Set pointer to the last marked value and put that vertex to the ‘shortest path’
list.
ii. Move the pointer up until marked value is change.
iii. If the last marked value has been changed then move the pointer to the
marked value in that row and put that vertex to the ‘shortest path’ list.
Repeat (ii) and (iii) until the pointer will move to source vertex.
Example: Find the shortest path between A and F using Dijkstra Algorithm.
Solution:
After step 1 i.e remove all loops (in this case loops at C and F) and step 2 i.e. remove
all parallel edges except one with the minimum cost, we have the following topology.

Step3: Create the weight matrix table Marke A B C D E F


i. Set 0 to the source vertex and infinite to d
the remaining vertices. (i.e. set A to 0 & 0 ∞ ∞ ∞ ∞ ∞
all others to ∞)
Iteration 1:
ii. Mark the smallest unmarked value and also mark that vertex. (Since, smallest value in first
row is 0; we mark 0 and also mark its corresponding vertex A.)
iii. Find those vertices which are directly connected with marked vertex and update value as
following Update value formula.
New Destination value = minimum (Old Destination value, Marked value+ Edge Weight)
Since the marked vertex is A, its directly connected vertices are B, D and E. So, new
destination values of B, D and E are:
New Value of B = min (∞, 0+2) = 2 Marke A B C D E F

New Value of D = min (∞, 0+3) = 3 d

New Value of E = min (∞, 0+2) = 2. A 0 ∞ ∞ ∞ ∞ ∞

Others value remain same. 2 ∞ 3 2 ∞

Table: After iteration 1.

Iteration 2:
Since the smallest value is in 2nd row is 2 (for both B and E), we can mark any of them, and
for this example we mark B and also mark its value 2.
The vertices which are directly connected with B are A, C and D. But A is already marked, so
we will not choose A. Hence, update new destination values of C &D.
New Destination value = minimum (Old Destination value, Marked value+ Edge Weight)
New Value of C = min (∞, 2+2) = 4
Marke A B C D E F
New Value of D = min (3, 2+4) = 3
d
Others value remain same.
A 0 ∞ ∞ ∞ ∞ ∞
B 2 ∞ 3 2 ∞
4 3 2 ∞
Table: After iteration 2.

Iteration 3:
Since the smallest value in 3rd row is 2 (for E), we mark E and also mark its value 2.
The vertices which are directly connected with E are A and F. But A is already marked, so we
will not choose A. Hence, update new destination value of F.
New Destination value = minimum (Old Destination value, Marked value+ Edge Weight)
New Value of F = min (∞, 2+3) = 5
Marke A B C D E F
Others value remain same.
d
A 0 ∞ ∞ ∞ ∞ ∞
B 2 ∞ 3 2 ∞
E 4 3 2 ∞
4 3 5
Table: After iteration 3.

Iteration 4:
Since the smallest value in 4th row is 3 (for D), we mark D and also mark its value 3.
The vertices which are directly connected with D are A, B, C & F. But A & B are already
marked, so we will not choose A & B. Hence, update new destination value of C & F.
New Destination value = minimum (Old Destination value, Marked value+ Edge Weight)
New Value of C = min (4, 3+2) = 4
New Value of F = min (5, 4+3) = 5
Marke A B C D E F
Others value remain same.
d
A 0 ∞ ∞ ∞ ∞ ∞
B 2 ∞ 3 2 ∞
E 4 3 2 ∞
D 4 3 5
4 5
Table: After
iteration 4.

Iteration 5:
Since the smallest value in 5th row is 4 (for C), we mark C and also mark its value 4.
The vertices which are directly connected with C are B, D & F. But B & D are already
marked, so we will not choose B & D. Hence, update the new destination value of F.
New Destination value = minimum (Old Destination value, Marked value+ Edge Weight)
New Value of F = min (5, 4+2) = 5
Others value remain same.
Marke A B C D E F
d
A 0 ∞ ∞ ∞ ∞ ∞
B 2 ∞ 3 2 ∞
E 4 3 2 ∞
D 4 3 5
C 4 5
5

Table: After iteration 5.

Iteration 6:
As there is only one unmarked vertex remaining i.e. F. So, we mark F and its value 5.

Marke A B C D E F
d
A 0 ∞ ∞ ∞ ∞ ∞
B 2 ∞ 3 2 ∞
E 4 3 2 ∞
D 4 3 5
C 4 5
F 5
Table:
After iteration 6.
Since, all the vertices are marked. Step 3 is over.

Step 4: Find the shortest path from source to destination using backtracking.
Put destination vertex in ‘shortest path’
i. Set pointer to the last marked value and put that vertex to the ‘shortest path’ list.
ii. Move the pointer up until marked value is change.
iii. If the last marked value has been changed then move the pointer to the marked value in
that row and put that vertex to the ‘shortest path’ list.
Repeat (ii) and (iii) until the pointer will move to source vertex.

The last marked value is 5 so put F to the ‘shortest path’ list. Shortest path: F
Now, move the pointer up, the value is same. So again move the pointer up again, the value is
same. So again move the pointer, the value has changed (infinity). So now, move the pointer
to the marked value in that row which is 2 and put the vertex E to the ‘shortest path’ list.
Shortest path: F -> E
Now again, Move the pointer up, the value is same. So again move the pointer up again, the
value has changed (infinity). So now, move the pointer to the marked value in that row which
is 0 and put the vertex A to the ‘shortest path’ list.
Shortest path: F -> E -> A
And, the minimum cost from A to F is: 2 + 3 = 5

OSPF (Open Shortest Path First)


OSPF is a standardized Link-State routing protocol, designed to scale efficiently to support
larger networks. OSPF adheres to the following Link State characteristics:
• OSPF employs a hierarchical network design using Areas.
• OSPF will form neighbor relationships with adjacent routers in the same Area.
• Instead of advertising the distance to connected networks, OSPF advertises the status
of directly connected links using Link-State Advertisements (LSAs).
• OSPF sends updates (LSAs) when there is a change to one of its links, and will only
send the change in the update. LSAs are additionally refreshed every 30 minutes.
• OSPF traffic is multicast either to address 224.0.0.5 (all OSPF routers) or 224.0.0.6
(all Designated Routers).
• OSPF uses the Dijkstra Shortest Path First algorithm to determine the shortest
path.
• OSPF is a classless protocol, and thus supports VLSMs.
Other characteristics of OSPF include:
• OSPF routes have an administrative distance is 110.
• OSPF uses cost as its metric, which is computed based on the bandwidth of link.
• OSPF has no hop-count limit.

The OSPF process builds and maintains three separate tables:


• A neighbor table – contains a list of all neighboring routers.
• A topology table – contains a list of all possible routes to all known networks within
an area.
• A routing table – contains the best route for each known network.

OSPF Areas:

Figure: Typical OSPF network topology showing different areas


OSPF divides an autonomous system (AS) into Areas which is a collection of networks, hosts
and routers.
Routers inside the area flood the area with routing information. The four separate OSPF
router types are as follows:
• Internal Router – All router interfaces belong to only one Area.
• Backbone Routers– This router is located within the backbone area.
• Area Border Router (ABR) – contains interfaces in at least two separate areas.
• Autonomous System Border Router (ASBR) – contain a connection to a separate
Autonomous System (AS).
Note: All the areas inside one AS must connect to the backbone Area.

OSPF Process:
1. Become neighbours – Two routers running OSPF on the same link agree to form a
neighbour relationship.
2. Exchange DB information and LSAs – The neighbour routers swap their LSDB and LSAs
information with each other.
3. Choose the best routes – Each router chooses the best routes to add to its routing table
based on the learned LSDB information. (Using Dijkstra algorithm)

OSPF discovers neighbors by sending Hello packets through the router interfaces.
OSPF uses Link State Advertisement (LSA) to exchange information about the network
topology between routers. When a router receives an LSA, it is stored in the Link-State
DataBase (LSDB). Once the LSDBs between routers are in sync, OSPF uses the Shortest
Path First (SPF) algorithm to calculate the best routes for each network. It is important to
understand that LSAs are information about a route that is transported inside Link State
Update (LSU) packets.

Each single Link State Update (LSU) packet can contain one or more LSAs inside it
and when an LSU is sent between OSPF routers, it floods the LSA information through the
network.

All routers within the same Area have the same topology table i.e. same Link State
Database- but different routing table as OSPF calculates different best paths for each router
depending on its location within the network topology.
Step 1: Become neighbours
HOW OSPF FORMS NEIGHBOR RELATIONS?
OSPF discovers neighbors by sending Hello packets through the router interfaces and
meeting certain criteria.
HELLO PACKET
An OSPF router generates a Hello packet at an interval of every 10 seconds for Peer-
to-Peer (P2P) networks by default. And advertises it through multicast address 224.0.0.5 to
all routers connected to its interfaces while it searches for potential OSPF neighbors. The
Hello message contains a list of information needed to form an OSPF neighbor relation
between two neighboring routers. Some of the information contained in the Hello messages
are:
 Router ID. The router’s ID which is manually configured or automatically selected by
OSPF.
 Hello Interval. Time Interval upon which Hello packets are sent.
 Dead Interval. Defines how long we should wait for hello packets before we declare the
neighbor as dead.
 Router Priority. Used to help determine the Designated Router (DR).
 Area ID
 Authentication Password (if configured)
 Subnet Mask

The following conditions must be met for two routers to become neighbors:
1. They must have the same IP network/subnet
2. The Hello and Dead Interval timers must be identical.
3. Router interfaces connecting two routers must have the same Area ID
4. Authentication password (if used) must be identical

Step 2: Exchange DB information and LSAs


OSPF LINK STATE PACKET TYPES
OSPF is a link-state routing protocol, i.e. routers keep track of the status of links
within their respective areas. A link is simply a router interface. From these lists of links and
their respective statuses, the topology database is created. OSPF routers forward link-state
advertisements (LSAs) to ensure the topology database is consistent on each router within
an area.
1. Link State Advertisement (LSA): The primary means of communication between OSPF
routers, it's the packet that carries all fundamental information about the topology and is
flooded between areas to perform different functions; there are 11 types of LSA packets. The
following is a list of the most frequently used OSPF packets:
• Router LSA (Type 1) – Contains a list of all links local to the router, and the status
and “cost” of those links. Type 1 LSAs are generated by all routers in OSPF, and are flooded
to all other routers within the local area.
• Network LSA (Type 2) – Generated by all Designated Routers in OSPF, and
contains a list of all routers attached to the Designated Router.
• Network Summary LSA (Type 3) – Generated by all ABRs in OSPF, and contains
a list of all destination networks within an area. Type 3 LSAs are sent between areas to allow
inter-area communication to occur.
• ASBR Summary LSA (Type 4) – Generated by ABRs in OSPF, and contains a
route to any ASBRs in the OSPF system. Type 4 LSAs are sent from an ABR into its local
area, so that Internal routers know how to exit the Autonomous System.
• External LSA (Type 5) – Generated by ASBRs in OSPF, and contain routes to
destination networks outside the local Autonomous System. Type 5 LSAs can also take the
form of a default route to all networks outside the local AS. Type 5 LSAs are flooded to all
areas in the OSPF system.

2. Link State DataBase (LSDB): LSDB packet contains all updated link-state information
exchanged among the network, and all routers within the same area have identical LSDB, and
when two routers form new neighbor adjacency, they sync their LSDB to be fully adjacent.

3. Link State Request (LSR): Once neighbor adjacency is formed and LSDB is exchanged,
neighbor routers may locate missing LSDB information, they then send a request packet to
claim the missing piece. Neighbors receive this packet and respond with LSU.

4. Link State Update (LSU): A response packet sends a specific piece of LSDB information
requested by an OSPF neighbor via LSR packet.

5. Link State Acknowledgment (LSAcK): The router that sends the LSR packet confirms
receiving the LSU from neighbor by sending a confirmation packet acknowledging receiving
the requested LSUs.
Students are encouraged to read more about OSPF Network Types, DR/BDR-role and
election process, States of router during neighbour adjacencies, Cost calculation, Virtual
Link.

Homework
Q. Compare Link State routing protocol with Distance Vector routing protocol.
IS-IS (Intermediate System -to- Intermediate System)
IS-IS (Intermediate System -to- Intermediate System) is a standardized link-state protocol.
IS-IS shares many similarities to OSPF. IS-IS is predominantly used by ISPs, due to its
scalability.

IS-IS adheres to the following Link State characteristics:


• IS-IS allows for a hierarchical network design using Areas.
• IS-IS will form neighbor relationships with adjacent routers of the same IS-IS type.
• IS-IS will only send out updates when there is a change to one of its links, and will only
send the change in the update.
• IS-IS uses the Dijkstra Shortest Path First algorithm to determine the shortest path.
• IS-IS is a classless protocol, and thus supports VLSMs.
• It uses cost as the default metric but can also use optional metrics, such as Delay, Expense,
and Error.
Other characteristics of IS-IS includes:
• IS-IS was originally developed to route the ISO address space, and thus is not limited to IP
routing.
• IS-IS routes have an administrative distance is 115.
• IS-IS has no hop-count limit.

The IS-IS process builds and maintains three separate tables:


• A neighbor table – contains a list of all neighboring routers.
• A topology table – contains a list of all possible routes to all known networks within an
area.
• A routing table – contains the best route for each known network.

IS-IS Network Topology

Figure: IS-IS Network Topology

IS-IS defines three types of routers:


• Level-1 Router – contained within a single area, with a topology table limited to only its
local area (called the Level-1 Database)
• Level-2 Router - a backbone router that routes between areas, and builds a Level-2
Database.
• Level-1-2 Router – similar to an area border router. Interfaces between a local area and
the backbone area, and builds both a Level-1 and a Level-2 database.

There are two types of adjacencies:


• Level-1 adjacency – for routing within an area (intra-area routing)
• Level-2 adjacency – for routing between areas (inter-area routing)

Each type of IS-IS router will form only specific adjacencies:


• Level-1 routers form Level-1 adjacencies with other Level-1 routers and Level-1-2
routers.
• Level-2 routers form Level-2 adjacencies with other Level-2 routers and Level-1-2
routers.
• Level-1-2 routers form both Level-1 and Level-2 adjacencies with other Level-1-2
routers.
Note: Level-1 routers will never form adjacencies with Level-2 routers. An OSPF router
can belong to multiple areas whereas an IS-IS router can belong to only one area

Path Vector
Path vector routing is exterior routing protocol proved to be useful for inter-domain or
inter-AS routing. Path vector routing protocol extends distance vector routing protocol. In
distance vector routing, a router has a list of networks that can be reachable in the same AS
with the corresponding cost (number of hops). In path vector routing, a router has a list of
networks that can be reached with the path (list of AS to pass) to reach each one.
In other words, the domain of operation of the distance vector routing is a single AS
whereas the domain of operation of the path vector is the whole internet. The distance vector
routing tells us the distance to each network and the path vector routing tells the path.

BGP (Border Gateway Protocol)


BGP is a standardized exterior gateway protocol (EGP), as opposed to RIP, OSPF,
and EIGRP which are interior gateway protocols (IGP’s).
BGP is considered a “Path Vector” routing protocol. BGP was not built to route
within an Autonomous System (AS), but rather to route between different AS. BGP
maintains a separate routing table based on shortest AS Path and various other attributes, as
opposed to IGP metrics like distance or cost.
BGP is the routing protocol of choice on the Internet. Essentially, the Internet is a
collection of interconnected Autonomous Systems. BGP Autonomous Systems are assigned
an Autonomous System Number (ASN), which is a 16-bit number ranging from 1 – 65535. A
specific subset of this range, 64512 – 65535, has been reserved for private (or internal) use.
BGP utilizes TCP for reliable transfer of its packets, on port 179.

 For each TCP connection, the two routers at the end of connection are called BGP
peers, and the TCP connection along with all the BGP messages sent over the
connection is called a BGP session.
 For BGP to function, BGP routers must form a neighbor relationship (called peer).
There are two types of BGP relationships:
o iBGP Peers - BGP neighbors within the same AS.
o eBGP Peers - BGP neighbors connection different AS.
A BGP session that spans two AS is called an external BGP (eBGP) session¸ and a
BGP session between routers in the same AS is called an internal BGP (iBGP)
session. In above figure Router B and Router C both in AS200 will form iBGP peer
relationship and RouterA in AS100 & RouterB in AS2200 will form eBGP Peers
relationship.
 The Administrative Distance (AD) for routes learned outside the Autonomous
System (eBGP routes) is 20, while the AD for iBGP route is 200.
 Two of the more important attributes are AS-PATH and NEXT-HOP.
o AS-Path – This defines the list of AS through the destination can be reached.
o Next-Hop – This defines the next router to which the data packet should be
sent.
 BGP supports CIDR.
 BGP also supports Security.
 When a gateway router receives a router receives a route advertisement, it uses its
Import Policy to decide whether to accept or decline the route though its AS. Such
routing policy is referred as Policy Based Routing.

Q. What is the aggregated network of the following subnets: 199.1.1.0/26, 199.1.1.64/26,


199.1.1.128/26, 199.1.1.192/26? [1-2016]

Q. A, B, C, D, E, F, G & H are interconnected routers as shown in the figure below. Each link
represents a physical link directly between each two routers. Assume that a link state protocol
is used in all routers, and that the number on each link represents the cost of each link. Find
the shortest path from node F to all other nodes and based on the result, write down F’s
forwarding table (on the format destination/next_hop) for all destinations. [4-2016]

H 2
14
4 B
G 9 1
1 A
6 D 2
3 1
F 1 4

1 C
E 3
Q. Define Routing [1]

Q. If you are assigned an IP address 92.16.1.0/24 and plans to deploy CIDR. Here are some
requirements which you have to fulfil: for Subnet A= 120 hosts, Subnet B= 60 hosts, Subnet C=30
hosts, Subnet D= 10 hosts and Subnet E= 5 hosts. You are required to calculate subnet mask, range,
network id and broadcast id for each subnet. [4]

Q. Write down the disadvantages of static routing [1-2017]

Q. Write aggregated address of 10.10.10.0/24, 10.10.11.0/24 and 10.10.12.0/24. [1-2017]

Q. Illustrate count to infinity problem and its solution. [4-2017]

Q. What is the aggregated network of the following subnets: 172.16.0.0/18, 172.16.64.0/18,


172.16.128.0/18 and 172.16.192.0/18? [1-2018]

Q. Write down the first IP and last IP of given IP address 192.168.100.197/27. Also write the subnet
mask of given IP. [1-2018]

Q. The Asia Pacific Network Information Center (APNIC) has to provide service to 8 Local ISPs
from the network pool of 215.10.0.0/20. From the available pool each Local ISP has to provide
service to their 4 dedicated clients. Design the complete IP Address Plan which includes IP Pool,
Usable IP Pool and Subnet Mask for each network. [4-2018]

Q. What is count to infinity problem? Explain any two solutions to the problem.[5-2018]

Q. What is the aggregated network of the following subnets: 10.0.0.0/10, 10.64.0.0/10, 10.128.0.0/10
and 10.192.0.0/10? [1-2019]

Q. Write down the first IP and last IP address of 192.168.20.132/26. [1-2019]

Q. Use Dijkstra Algorithm to calculate the shortest path from A to D. [4-2019]

7
B C
2 3
2 3
A E 2 F D
1 2
6 2
G 4 H

You might also like