Dynamic Routing and Link State Routing Protocols Routing and Link State Routing Protocols CMPE 151...
Transcript of Dynamic Routing and Link State Routing Protocols Routing and Link State Routing Protocols CMPE 151...
Dynamic Routing and Link State Routing Protocols
CMPE 151 Spring 2016 Brad Smith and Rick Graziani
Routing Introduction
2
l Remember… delivery of IP packets implemented by two processes � Forwarding - deliver a packet one hop closer to destination. � Routing - compute forwarding state
l Dynamic routing process is a distributed computation � Triggered by topology changes � Processing defined by a routing protocol � Output of the computation is forwarding state – next hop router
l Goal of computation is convergence � After finite sequence of topology changes � Process should terminate updates to forwarding state � Forwarding state should be correct
� Loop-free (after convergence vs. instantaneous) � With desired characteristics: performance, possibly conform to policy
“Fate-sharing” Principle
3
l “The fate-sharing model suggests that it is acceptable to lose the state information associated with an entity if, at the same time, the entity itself is lost.” Dave Clark, “Design Philosophy of the DARPA Internet Protocols”, SIGCOMM ’88.
l Benefits � Ensures the failure of any single component of an internet does not
invalidate state located elsewhere in the internet � Localizing the effects of any failures � More robust system
l Internet routing architecture achieves fate-sharing by co-locating � Forwarding state � Routing process that computes the state
l Compared with virtual-circuit routing?
Routing Protocol
4
l A set of algorithms and messages that are used to exchange topology information and populate the forwarding table with the routing protocol’s choice of best paths.
l Purpose: � Discover remote subnets � Maintain up-to-date forwarding tables � Choose the best path to destination subnets
Routing Protocol
5
l Components of a routing protocol: � Algorithm:
� Event-driven procedures for � Processing routing information � Selecting best-paths
� The data structures needed for these steps. � Routing protocol messages:
� Discover neighboring routers � Exchange topology information
IGP and EGP
l An autonomous system (AS)— is a collection of routers under a common administration that presents a common, clearly defined routing policy to the Internet. � ISP network or Company’s internal network
l Because the Internet is based on the autonomous system concept, two types of routing protocols are required: � Interior Gateway Protocols IGP (RIP, EIGRP, OSPF, IS-IS):
� Routing inside an autonomous system � Exterior Gateway Protocols (BGP):
� Routing between autonomous systems
PAIX Palo Alto CENIC BGP
UCSC
6
IGP and EGP
l Routing domain – a collection of networked systems that operate common routing protocols and are under the control of a single administration � An AS is sometimes referred to as a routing domain � However, networks within Interior Gateway Protocols (IGP) 7
No AS
Classifying Routing Protocols
8
* OSPFv3 supports routing both IPv4 and IPv6.
Distance Vector Routing Protocols
Link State Routing Protocols
Path Vector
RIPv2 EIGRP OSPFv2 IS-IS BGP-4 RIPng EIGRP for
IPv6 OSPFv3 * IS-IS for
IPv6 BGP-4 for
IPv6 or MP-BGP
Interior Gateway Protocols
Exterior Gateway Protocols
IPv4
IPv6
l Intra-domain or internal gateway (IGP) routing � Routing inside an AS � Focus is on performance
l Inter-domain or external gateway (EGP) routing � Routing between ASs � Focus is on policy
How to Ensure Correct Routes? l Requirement for correctness of
routing protocol � Loop-free
� Routing loops can occur when inconsistent routing tables are not updated due to slow convergence in a changing network
� Convergence – All routers in routing domain have complete and accurate knowledge of the routing domain
� Desired path characteristics � Choose the best path
(metric) – varies by protocol
?
Convergence l Convergence is when a network has complete and accurate information about the
entire network l A network is not completely operable until the network has converged.
10
How to Ensure Correct Routes?
11
l Two strategies for ensuring correctness 1. Use identical algorithm for selecting paths
� Share minimal topology information � Use identical path selection algorithm at all nodes � Used for IGP/Intra-domain routing � Use shortest-path routing algorithm
2. Use custom (private) algorithm for selecting paths � Share full path information � Use policy-specific path selection algorithm at each node � Used for EGP/Inter-domain routing � Use path-vector protocol
12
Alex Zinin’s Routing Table Principles
l Principle 1: Every router makes its decision alone, based on the information it has in its own routing table.
I know about my remote networks but it is not my
responsibility if R2 and R3 know about their remote
networks.
13
Alex Zinin’s Routing Table Principles
l Principle 2: The fact that one router has certain information in its routing table does not mean that other routers have the same information.
Just because I know how to get to R3’s LAN, 192.168.2.0/24 and I send that packet to R2, doesn’t
mean R2 knows how to get there.
???
14
Alex Zinin’s Routing Table Principles
l Principle 3: Routing information about a path from one network to another does not provide routing information about the reverse, or return, path.
And if the packet for R3’s LAN reaches 192.168.2.0/24, I don’t know if R3 has a route back to 172.16.3.0/24 for any return
traffic.
???
Shortest Path Routing
l Shortest-path spanning tree is computed for each router.
l Internet routing is based on two SP algorithms � Dijkstra – used in link-state protocols � Bellman-Ford – used in distance-vector protocols 15
Algorithm Classification
l Distance-Vector – “sign-post” l Link-State – “map” l Path-Vector – “sequence of hops”
16
Algorithm Classification l Distance-Vector – “sign-post” – Which way and
how far? � Vectors of destination and distance sent to
neighbors � “Tell your neighbors about the rest
of the network” � Distance is defined in terms of a metric
� Such as hop count � Destination/Direction is simply the:
� Destination in terms of a network prefix � Next-hop router or Exit interface
� Use Distributed Bellman-Ford path selection algorithm
� Protocols: RIP and EIGRP
17 17
Algorithm Classification
l Link-State – “map” � Flood description of your links (link state) to whole network
� “Tell the rest of the network about your neighbors” � Links described by
� End-point routers of subnet in internet � Cost of subnet: delay, bandwidth
� Use Dijkstra path selection algorithm � Protocols: OSPF and IS-IS
OR
Algorithm Classification
l Path-Vector � Routes advertised as full-paths � Paths described by sequence of ASs � Protocol: BGP
19
Review l The Internet implements a distributed routing architecture that is triggered
by topology change events.
l Convergence of routing in the Internet depends on the stability of the network topology for a sufficient period of time.
l The Fate-Sharing Principle – “It is acceptable to lose the state information associated with an entity if, at the same time, the entity itself is lost.” � Ensures the failure of any single component of an internet does not invalidate
state located elsewhere in the internet � Localizing the effects of any failures � Results in a more robust system � Achieved in Internet by co-locating
� Forwarding state � Routing process that computes the state
Review l An Autonomous System (AS) is a region of the Internet that is administered
by a single entity and follows a single routing policy.
l Functional classification of routing protocols � IGP - routing inside an AS
� Share minimal topology information � Use identical path selection algorithm at all nodes
� Optimize performance
� EGP - routing between ASs � Share full path information
� Use custom path selection algorithm at each node to implement desired policies � Enforce policies
Review l Algorithmic classification of routing protocols
� Distance-vector � Send vectors of distances to destinations to neighbors
� “Tell your neighbors about the rest of the network” � “Distributed computation”
� Link-state � Flood description of your links to all routers � “Tell the rest of the network about your neighbors”
� “Distributed database”
� Path-vector � Distance-vector with full paths
Review
l Dijkstra � Iterates on “next shortest path” � Requires centralized computation
l LS protocols � Is an IGP � Implements a centralized routing model � Floods link-state updates describing current state of its links
� “Tell the rest of the network about your neighbors” � Use Dijkstra algorithm because it is most efficient shortest-path
algorithm
OSPF
25
l Link states - Information about the state of a router’s links l This information includes interface’s:
� IP address/mask � Type of network
� Ethernet (broadcast) or serial point-to-point link � Cost of that link � Any neighbor routers on that link
Link 2 • Network: 10.2.0.0/16 • IP address: 10.2.0.1 • Type of network: Serial • Cost of that link: 20 • Neighbors: R2
Link 3 • Network: 10.3.0.0/16 • IP address: 10.3.0.1 • Type of network: Serial • Cost of that link: 5 • Neighbors: R3
Link 4 • Network: 10.4.0.0/16 • IP address: 10.4.0.1 • Type of network: Serial • Cost of that link: 20 • Neighbors: R4
Link 1 • Network: 10.1.0.0/16 • IP address: 10.1.0.1 • Type of network: Ethernet • Cost of that link: 2 • Neighbors: None
Link State Concepts
Link State Concepts
26
27
Building the Shortest Path First (SPF) Tree
l At first, the tree (topology) only includes its directly connected neighbors.
l Using the link-state information from all other routers, R1 can now begin to construct an SPF tree of the network with itself at the root of the tree.
Link State Database for R1
28
l The SPF algorithm begins by processing the following LSP information from R2: � Connected to neighbor R1 on network 10.2.0.0/16, cost of 20 � Connected to neighbor R5 on network 10.9.0.0/16, cost of 10 � Has a network 10.5.0.0/16, cost of 2
R1 Processes the LSPs from R2 Red: New information for tree.
29
l The SPF algorithm begins by processing the following LSP information from R3: � Connected to neighbor R1 on network 10.3.0.0/16, cost of 5 � Connected to neighbor R4 on network 10.7.0.0/16, cost of 10 � Has a network 10.6.0.0/16, cost of 2
R1 Processes the LSPs from R3 Red: New information for tree.
30
l The SPF algorithm begins by processing the following LSP information from R4: � Connected to neighbor R1 on network 10.4.0.0/16, cost of 20 � Connected to neighbor R3 on network 10.7.0.0/16, cost of 10 � Connected to neighbor R5 on network 10.10.0.0/16, cost of 10 � Has a network 10.8.0.0/16, cost of 2
R1 Processes the LSPs from R4 Red: New information for tree.
31
l The SPF algorithm begins by processing the following LSP information from R5: � Connected to neighbor R2 on network 10.9.0.0/16, cost of 10 � Connected to neighbor R4 on network 10.10.0.0/16, cost of 10 � Has a network 10.11.0.0/16, cost of 2
R1 Processes the LSPs from R5 Red: New information for tree.
32
SPF Tree
l R1 has now constructed the complete SPF tree.
33
Determining the Shortest Path
l Using the SPF tree, SPF algorithm results in the shortest path to each network. � Note: Only the LANs are shown in the table, but SPF can also be used
to determine the shortest path to each WAN link network.
34
20
2 Determining the Shortest Path
Network 10.5.0.0/16 via R2 Serial 0/0/0 at a cost of 22
35
5 2
Determining the Shortest Path
Network 10.6.0.0/16 via R3 Serial 0/0/1 at a cost of 7
36
Determining the Shortest Path
l Each router constructs its own SPF tree independently from all other routers.
l Link-state databases must be identical on all routers.
37
Generating a Routing Table from the SPF Tree
l These paths listed previously can now be added to the routing table. l The routing table will also include
� Directly connected networks � Routes from any other sources, such as static routes.
l Packets will now be forwarded according to these entries in the routing table.
SPF Tree for R1
Link State Concepts
38
Addressing Disadvantages l Create areas to minimize the router memory requirements,
processing requirements, and bandwidth requirenments.
39
OSPF
l OSPF = Open Shortest Path First l The most widely used routing protocol l The complexity of OSPF is significant
l History: � 1989: RFC 1131 OSPF Version 1 � 1991: RFC1247 OSPF Version 2 � 1994: RFC 1583 OSPF Version 2 (revised) � 1997: RFC 2178 OSPF Version 2 (revised) � 1998: RFC 2328 OSPF Version 2 (current version)
40
What we cover….
l Messages
l Router IDs
l Flooding process
l Metrics
l Designated routers
l Areas
41
42
OSPF Message Encapsulation
l In the IP packet header: � Protocol field is set to 89 (OSPF) � Destination address is typically set to one of two multicast addresses:
� 224.0.0.5 � 224.0.0.6
l Destination MAC address is also a multicast address: � 01-00-5E-00-00-05 � 01-00-5E-00-00-06
OSPF Packet Types l Hello: Used to establish and maintain adjacency with other OSPF
routers.
l DBD: The database description (DBD) packet contains an abbreviated list of the sending router’s link-state database and is used by receiving routers to check against the local link-state database.
l LSR: Receiving routers can then request more information about any entry in the DBD by sending a link-state request (LSR).
l LSU: Link-state update (LSU) packets are used to reply to LSRs and to announce new information. LSUs contain seven different types of link-state advertisements (LSA).
l LSAck: When an LSU is received, the router sends a link-state acknowledgment (LSAck) to confirm receipt of the LSU. 43
OSPF Message Header
source router IP address
authentication
authentication32 bits
version type message length
Area ID
checksum authentication type
Body of OSPF MessageOSPF MessageHeader
2: current version is OSPF V2
Message types: 1: Hello (tests reachability) 2: Database description 3: Link Status request 4: Link state update 5: Link state acknowledgement
ID of the Area from which the packet originated
Standard IP checksum taken over entire packet
0: no authentication 1: Cleartext password 2: MD5 checksum (added to end packet)
Authentication passwd = 1: 64 cleartext password Authentication passwd = 2: 0x0000 (16 bits)
KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits)
Prevents replay attacks
Spring 2015 CE 151 - Advanced Networks
44
45
l Router ID plays an important role in OSPF � Uniquely identifies each router in a routing domain � Used in Designated Router election process (explained later)
l Router ID is an IP address of a router l Cisco routers use following algorithm to determine Router ID:
1. IP address configured with the OSPF router-id command. 2. Highest IP address of any of its loopback interfaces (can’t fail like physical
interface). 3. Highest active IP address of any of its physical interfaces.
� The interface does not need to be enabled for OSPF, i.e. it does not need to be included in one of the OSPF network commands.
OSPF Router ID
OSPF Hello Packets l Used to
� Discover OSPF neighbors and establish neighbor adjacencies � Elect the Designated Router and Backup Designated Router on multiaccess
networks such as Ethernet and Frame Relay � Provide information to negotiate
� Hello interval (e.g. 10 sec on Ethernet segments) � Dead interval: time to declare neighbor down (4x Hello interval) � Network type
l Five network types � Point-to-point � Point-to-multipoint � Broadcast multiaccess (Ethernet) � Nonbroadcast multiaccess (Frame Relay) � Virtual links
46
47
l Before an OSPF router can flood its link states, must discover neighbors. l Before two routers can form an OSPF neighbor adjacency, they must agree on three
values: � Hello interval � Dead interval � Network type � MTU
l Both the interfaces must be part of the same network, including having the same subnet mask.
Neighbor Establishment, OSPF Hello and Dead Intervals
Hello, I’m R1
Hello, I’m R2
Hello, I’m R3
48
l By default, OSPF Hello packets are sent: � 10 seconds on multiaccess and point-to-point segments � 30 seconds on nonbroadcast multiaccess (NBMA) segments (Frame
Relay, X.25, ATM). l Sent to ALLSPFRouters at 224.0.0.5
Hello Intervals
Hello, I’m R1
Hello, I’m R2
Hello, I’m R3
49
Dead Intervals
l Dead interval - Period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor “down.”
l Cisco uses a default of four times the Hello interval. � 40 seconds - Multiaccess and point-to-point segments. � 120 seconds - NBMA networks.
l Dead interval expires � OSPF removes that neighbor from its link-state database. � Floods the link-state information about the “down” neighbor out all OSPF-enabled
interfaces.
Hello, I’m R1
Hello, I’m R2
Hello, I’m R3
OSPF LSU Packets l Link State Update (LSU) packets
� Used for OSPF routing updates � Contain one or more LSAs
l Link State Advertisements (LSAs) � Contain route information for destination networks � There are 11 types of LSAs
51
OSPF packet types
Partial list: More later!
Link State Advertisement (LSA) l The LSA of router 10.10.10.1 is as follows:
l Link State ID: 10.10.10.1 = can be Router ID l Advertising Router: 10.10.10.1 = Router ID l Number of links: 3 = 2 links plus router itself
l Description of Link 1: Link ID = 10.1.1.1, Metric = 4 l Description of Link 2: Link ID = 10.1.2.1, Metric = 3 l Description of Link 3: Link ID = 10.10.10.1, Metric = 0
10.1.1.0 / 24.1 .2 .2
10.10.10.1
10.1.4.0 / 24
10.1.2.0 / 24
.1
.4
10.1.7.0 / 24
10.1
.6.0
/ 24
10.1
.3.0
/ 24
10.1.5.0/24
10.1.
8.0 / 2
4
.3
.3 .5
.2
.3
.5
.5
.4
.4
.6
.6
10.10.10.2 10.10.10.4 10.10.10.6
10.10.10.3 10.10.10.5
Each router sends its LSA to all routers in the network (using a method called reliable flooding)
LSA Format
Link State ID
link sequence number
advertising router
Link Age Link Type
checksum length
Link ID
Link Data
Link Type Metric#TOS metrics
LSA
LSAHeader
LSAData
Link ID
Link Data
Link Type Metric#TOS metrics
LSA Header
Link 1
Link 2
54
OSPF Metric
l The OSPF metric is called cost. The following passage is from RFC 2328: � A cost is associated with the output side of each router interface. This cost is
configurable by the system administrator. The lower the cost, the more likely the interface is to be used to forward data traffic.
l RFC 2328 does not specify which values should be used to determine the cost.
55
OSPF Metric
l Cisco IOS software uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value.
l 108 is known as the reference bandwidth � So that interfaces with the higher bandwidth values will have a lower
calculated cost.
Cisco IOS Cost for OSPF = 108/bandwidth in bps
R1(config-router)# auto-cost reference-bandwidth 10000
Accommodating 10Gig Interfaces
In Mb/s
56
Link State Database l The collection of all LSAs is called the link-state database l Each router has an identical link-state database
� Useful for debugging: Each router has a complete description of the network
l If neighboring routers discover each other for the first time, they will exchange their link-state databases
l The link-state databases are synchronized using reliable flooding
Link State Database
10.1.1.0 / 24.1 .2 .2
10.10.10.1
10.1.4.0 / 24
10.1.2.0 / 24
.1
.4
10.1.7.0 / 24
10.1
.6.0
/ 24
10.1
.3.0
/ 24
10.1.5.0/24
10.1.
8.0 / 2
4
.3
.3 .5
.2
.3
.5
.5
.4
.4
.6
.6
10.10.10.2 10.10.10.4 10.10.10.6
10.10.10.2 10.10.10.5
Each router has a database which contains the LSAs from all other routers
LS Type Link StateID Adv. Router Checksum LS SeqNo LS Age
Router-LSA 10.1.10.1 10.1.10.1 0x9b47 0x80000006 0
Router-LSA 10.1.10.2 10.1.10.2 0x219e 0x80000007 1618
Router-LSA 10.1.10.3 10.1.10.3 0x6b53 0x80000003 1712
Router-LSA 10.1.10.4 10.1.10.4 0xe39a 0x8000003a 20
Router-LSA 10.1.10.5 10.1.10.5 0xd2a6 0x80000038 18
Router-LSA 10.1.10.6 10.1.10.6 0x05c3 0x80000005 1680
59
Hello 10.6.0.1
Hello 10.5.0.1
Hello 10.6.0.1 10.5.0.1
Hello 10.5.0.1 10.6.0.1
Down Init Down Init 2-way 2-way
Down State - Init State – Two Way State l Down State - OSPF routers send Hello packets at regular intervals (10 sec.) to establish
neighbors. l When a router (sends or) receives its first Hello packet, it enters the init state.
� Hello packet contains a list of known neighbors. l When the router sends a Hello packet (unicast reply) to the neighbor with its RouterID and
the neighbor sends a Hello packet packet back with that Router ID, the router’s interface will transition to the two-way state.
l Now, the router is ready to take the relationship to the next level.
Establishing Adjacencies
60
Dissemination of LSA-Update l OSPF is a link state routing protocol and does not send periodic updates like RIP. l OSPF only floods link state state advertisements when there is a change in
topology (this includes when a routers are first booted). l OSPF uses hop-by-hop flooding of LSAs; an LSA received on one interface are
flooded out other OSPF enabled interfaces. l If a link state entry in the LSDB (Link State DataBase) reaches an age of 60 minutes
(MaxAge) without being updated, it is removed and SPF is recalculated. l Every 30 minutes (LSRefreshTime), OSPF routers flood only their link states to all
other routers (in the area). � This is known as a “paranoid update” � These do not trigger SPF recalculations.
l Special note: When a link goes down and a router wants to send a LSA to tell other routers to remove this link state, it sends this link state with a value of 60 minutes (MAXAGE).
l Acknowledgements of LSA-updates: � Explicit ACK, or � Implicit via reception of an LSA-Update
62
Challenges in Multiaccess Networks
l Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs: � Creation of multiple adjacencies, one adjacency for every pair of routers � Extensive flooding of LSAs
63
Flooding of LSAs l Link-state routers flood their link-
state packets when OSPF is initialized or when there is a change in the topology.
l In a multiaccess network, this flooding can become excessive.
l Not shown in the figures are the required acknowledgments sent for every LSA received.
64
Solution: Designated Router
l Designated Router (DR) is the collection and distribution point for LSAs sent and received.
l A Backup Designated Router (BDR) is also elected in case the DR fails. l All other routers become DROthers.
Here are my LSAs.
Here are LSAs from
R1.
DROther
DROther DROther DROther
DROther
DROther
65
l DROthers only form full adjacencies with the DR and BDR. � Send their LSAs to the DR and BDR � Multicast address 224.0.0.6 (ALLDRouters, all DR routers).
l R1 sends LSAs to the DR. � BDR listens, too.
l DR is responsible for forwarding the LSAs from R1 to all other routers. l DR uses the multicast address 224.0.0.5 (AllSPFRouters, all OSPF routers). l The result is that there is only one router doing all the flooding of all LSAs in the
multiaccess network.
Solution: Designated Router
Here are my LSAs.
Here are LSAs from
R1.
DROther
DROther DROther DROther
DROther
DROther
To: 224.0.0.5
To: 224.0.0.6
66
DR/BDR Election Process
l DR/BDR elections do not occur in point-to-point networks.
67
DR/BDR Election
l The following criteria are applied: 1. DR: Router with the highest OSPF interface priority. 2. BDR: Router with the second highest OSPF interface priority. 3. If OSPF interface priorities are equal, the highest router ID is used to break the
tie. l Default OSPF interface priority is 1. l Current configuration, the OSPF router ID is used to elect the DR and BDR.
Highest Router ID
Next Highest Router ID
DR
BDR
DROther
Electing Designated Router
l Further elections only occur on failure of DR/BDR l On DR failure
� BDR promoted to DR � New BDR elected
l On BDR failure � New BDR elected
l Live (B)DR not replaced by election. � If DR dies
� BDR replaces DR � Election held to replace BDR
� If BDR dies � Election held to replace BDR
69
Issues with large OSPF nets l Large link-state table
� Each router maintains a LSDB for all links in the area � The LSDB requires the use of memory
l Frequent SPF calculations � A topology change in an area causes each router to re-run SPF to rebuild
the SPF tree and the routing table. � A flapping link will affect an entire area.
� SPF re-calculations are done only for changes within that area. l Large routing table
� Typically, the larger the area the larger the routing table.
� A larger routing table requires more memory and takes more time to perform the route look-ups.
Solution: Divide the network into multiple areas
70
OSPF Router Types
Internal: Routers with all their interfaces within the same area Backbone: Routers with at least one interface connected to area 0 ASBR: (Autonomous System Boundary Router): Routers that have at
least one interface connected to an external internetwork (another autonomous system)
ABR: (Area Border Router): Routers with interfaces attached to multiple areas.
71
OSPF packet types
OSPF Type-4 packets has LSA packets (later)
72
LSAs
ASBR
ABR ABR Internal
Internal Internal
Internal
Backbone Area
What are the router types?
73
l LSA 1 – Router LSA l Generated by each router for each area it belongs to. l Describes the states of the links in the area to which this router belongs.
l Flooded only within the area. On multi-access networks, sent to the DR. l ABR will include a set of LSA 1’s for each area it belongs to. l When a new LSA 1 is received and installed in the LSDB, the router forwards
that LSA, using hop-by-hop or asynchronous flooding.
A C
D
2
5
B
15 Router A’s LSA 1s which are flooded to all other routers in this area.
“Leaf” network
LSA 1 - Router Link States
74
LSA 1 – Router Link States
LSA 1’s LSA 1’s LSA 1’s
l Flooded only within the area – Used by SPF to create topology map l Each router floods their LSA 1s ONLY within their own area. l LSA 1s only announce the links (networks) within the area. l Router receives LSA 1s from neighbor, floods those LSA 1s to other
neighbors within the same area.
75
LSA 3 – Summary LSA l Originated by the ABR. l Describes links between ABR and Internal Routers of the Local Area l ABR will include a set of LSA 3’s for each area it belongs to. l LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. l Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the
routing table.
LSA 3 – Summary Net Link States
76
LSA 3 – Summary LSA l Originated by the ABR. l Describes links between ABR and Internal Routers of the Local Area l ABR will include a set of LSA 3’s for each area it belongs to. l LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. l Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the
routing table.
LSA 3’s LSA 1’s LSA 3’s
ABR ABR
LSA 3 – Summary LSAs
77
• Routers only see the topology of the area they belong to. • When a link in one area changes, the adjacent routers originate in LSA 1’s and
flood them within the area, causing intra-area (internal) routers to re-run the SPF and recalculating the routing table.
• ABRs do not announce topological information between areas. • ABRs only inject routing information into other areas, which is basically a
distance-vector technique.
LSA 3’s LSA 1’s LSA 3’s
Process using DV technique not LSA 1 Link States.
New or change, do not run SPF algorithm.
X
78
• ABRs calculate intra-area routes and announce them to all other areas as inter-area routes, using LSA 3’s.
• OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0.
• The backbone area serves as a repository for inter-area routes. • This keeps OSPF safe from routing loops.
LSA 3’s LSA 1’s LSA 3’s
79
LSA 4 – ASBR Summary LSA l Originated by the ABR. l Flooded throughout the area. l Describes the reachability to the ASBRs
� Advertises an ASBR (Router ID) not a network l Included in routing table as an “IA” route. Exceptions l Not flooded to Stub and Totally Stubby networks. l More on this later
LSA 4 – ASBR Summary Link States
80
LSA 4 – ASBR Summary Link States
l How does the ABRs know about the ASBR? l ASBR sends a type 1 Router LSA with a bit (external bit – e bit) that
is set to identify itself as the ASBR.
LSA 1’s (e bit)
LSA 4
LSA 4
81
LSA 5 – AS External LSA l Originated by the ASBR. l Describes destination networks external to the Autonomous System (This
OSPF Routing Domain) l Flooded throughout the OSPF AS except to stub and totally stubby areas l Denoted in routing table as E1 or E2 (default) route (soon) l ASBR – Router which “redistributes” routes into the OSPF domain. Exceptions l Not flooded to Stub and Totally Stubby networks. l More on this later
LSA 5 - AS External Link States
82
R2 (ASBR) router ospf 1 redistribute static
ip route 57.0.0.0 255.0.0.0 ser 0/3
Added ->
ASBR
83
l redistribute command or default-information originate command creates an ASBR router.
l LSA 5s � Originated by the ASBR. � Describes destination networks external to the OSPF Routing Domain � Flooded throughout the OSPF AS except to stub and totally stubby
areas
R2 (ASBR) router ospf 1 redistribute static
ip route 57.0.0.0 255.0.0.0 ser 0/3
LSA 5’s LSA 5
LSA 5
84
Stub Area LSA 4 LSA 4 Blocked
LSA 5 Blocked LSA 5
LSA 3 LSA 3
• Sent by ABR: LSA 3s (Inter-Area routes) • Blocked:
• LSA 4s (reachability to ASBR) • LSA 5s (External routes)
• The ABR injects a default route into the stub area, pointing to the ABR. • This does not mean the ABR has a default route of its own.
• Changes in External routes no longer affect Stub Area routing tables.
We only see routes in our area, other areas, and a
default route. No external routes.
Stub Area LSA 1s still sent within each area.
Default route to ABR injected
85
Stub Area LSA 4 LSA 4 Blocked
LSA 5 Blocked LSA 5
LSA 3 LSA 3
• Blocked: • LSA 3s (Inter-Area routes) • LSA 4s (reachability to ASBR) • LSA 5s (External routes)
• The ABR injects a default route into the stub area, pointing to the ABR. • This does not mean the ABR has a default route of its own.
• Changes in other areas and external routes no longer affect Stub Area routing tables.
We only see routes in our area, other areas, and a default route. No external routes.
Totally Stubby Area Blocked
Blocked Blocked
Default route to ABR injected
We only see routes in our area and a default route.
No inter-area or external routes.
Totally Stubby Area LSA 1s still sent within each area.
Default route to ABR injected
Review l OSPF message types
� Hello - establish and maintain adjacency with OSPF routers � DataBase Description (DBD) - summary of my database � Link-State Request (LSR) - request for detailed entry � Link-State Update (LSU) - response to LSR � Link-State Ack (LSAck) - acknowledge receipt of LSU
l Router IDs… � Uniquely identifies each router in a routing domain � Used in Designated Router election process � Best practice is to use loopback interface... it can’t fail
Review l OSPF metrics…
� “Cost is associated with the output side of each router interface.” � In IOS is 108 / link bandwidth (inversely proportional to bandwidth)
l Designated routers… � Mitigate impact of “full-mesh” on # of adjacencies in topology (n(n-1)/2) � DR is collection and distribution point for LSAs on network
l OSPF deals with scaling problem by using “areas,” area 0 is the backbone.