Top Banner
Link State Routing Link State Routing Protocol Protocol W.lilakiatsakun W.lilakiatsakun
36

Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Dec 27, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Link State Routing ProtocolLink State Routing Protocol

W.lilakiatsakunW.lilakiatsakun

Page 2: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Introduction (1)Introduction (1)

• Link-state routing protocols are also known as Link-state routing protocols are also known as shortest path firstshortest path first protocols and built around protocols and built around Edsger Dijkstra's shortest path first (SPF) algorithm. Edsger Dijkstra's shortest path first (SPF) algorithm.

Page 3: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Introduction (2)Introduction (2)

• Dijkstra's algorithm Dijkstra's algorithm is commonly is commonly referred to as the referred to as the shortest path first shortest path first (SPF) algorithm. (SPF) algorithm.

• This algorithm This algorithm accumulates costs accumulates costs along each path, along each path, from source to from source to destination.destination.

Page 4: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Introduction (3)Introduction (3)

Page 5: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Introduction (4)Introduction (4)R1 ‘s Route

R5 ‘s Route

Page 6: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Link state Routing Process Link state Routing Process (1)(1)• 1. Each router learns about its own links, its own 1. Each router learns about its own links, its own

directly connected networks. directly connected networks. – This is done by detecting that an interface is in the up This is done by detecting that an interface is in the up

state.state.

• 2. Each router is responsible for meeting its 2. Each router is responsible for meeting its neighbors on directly connected networks. neighbors on directly connected networks. – Similar to EIGRP, link state routers do this by exchanging Similar to EIGRP, link state routers do this by exchanging

Hello packets with other link-state routers on directly Hello packets with other link-state routers on directly connected networks.connected networks.

• 3. Each router builds a Link-State Packet (LSP) 3. Each router builds a Link-State Packet (LSP) containing the state of each directly connected link. containing the state of each directly connected link. – This is done by recording all the pertinent information This is done by recording all the pertinent information

about each neighbor, including neighbor ID, link type, and about each neighbor, including neighbor ID, link type, and bandwidth.bandwidth.

Page 7: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Link state Routing Process Link state Routing Process (2)(2)

• 4. Each router floods the LSP to all neighbors, who 4. Each router floods the LSP to all neighbors, who then store all LSPs received in a database. then store all LSPs received in a database. – Neighbors then flood the LSPs to their neighbors until all Neighbors then flood the LSPs to their neighbors until all

routers in the area have received the LSPs. routers in the area have received the LSPs. – Each router stores a copy of each LSP received from its Each router stores a copy of each LSP received from its

neighbors in a local database.neighbors in a local database.

• 5. Each router uses the database to construct a 5. Each router uses the database to construct a complete map of the topology and computes the best complete map of the topology and computes the best path to each destination network. path to each destination network. – Like having a road map, the router now has a complete map Like having a road map, the router now has a complete map

of all destinations in the topology and the routes to reach of all destinations in the topology and the routes to reach them. them.

– The SPF algorithm is used to construct the map of the The SPF algorithm is used to construct the map of the topology and to determine the best path to each network. topology and to determine the best path to each network.

Page 8: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Learning about directly Learning about directly connected networkconnected network (1)(1)

When you correctly configure and activate the interfaces, the router learns about its own directly connected networks. Regardless of the routing protocols used, these directly connected networks are now part of the routing table.

Page 9: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Learning about directly Learning about directly connected networkconnected network (2)(2)

Page 10: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Learning about directly Learning about directly connected networkconnected network (3)(3)

• Link-State: Information about the Link-State: Information about the state of those links. state of those links.

• This information includes:This information includes:– The interface's IP address and subnet The interface's IP address and subnet

mask.mask.– The type of network, such as Ethernet The type of network, such as Ethernet

(broadcast) or Serial point-to-point link.(broadcast) or Serial point-to-point link.– The cost of that link.The cost of that link.– Any neighbor routers on that link.Any neighbor routers on that link.

Page 11: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Sending Hello Packet to Sending Hello Packet to neighbors (1)neighbors (1)

R1 sends Hello packets out its links (interfaces) to discover if there are any neighbors

Page 12: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Sending Hello Packet to Sending Hello Packet to neighbors (2)neighbors (2)

R2, R3, and R4 reply to the Hello packet with their own Hello packets because these routers are configured with the same link-state routing protocol.

There are no neighbors out the FastEthernet 0/0 interface. Because R1 does not receive a Hello on this interface, it will not continue with the link-state routing process steps for the FastEthernet 0/0 link.

Page 13: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Sending Hello Packet to Sending Hello Packet to neighbors (3)neighbors (3)

• When two link-state routers learn that they When two link-state routers learn that they are neighbors, they form an are neighbors, they form an adjacencyadjacency. .

• These small Hello packets continue to be These small Hello packets continue to be exchanged between two adjacent neighbors exchanged between two adjacent neighbors which serve as a which serve as a "keepalive""keepalive" function to function to monitor the state of the neighbor. monitor the state of the neighbor.

• If a router stops receiving Hello packets If a router stops receiving Hello packets from a neighbor, that neighbor is from a neighbor, that neighbor is considered considered unreachable and the adjacency unreachable and the adjacency is brokenis broken..

• In the figure, R1 forms an adjacency with In the figure, R1 forms an adjacency with all three routers. all three routers.

Page 14: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Building the link state Building the link state packetpacket (1)(1)• Once a router has established its adjacencies, it Once a router has established its adjacencies, it

can build its link-state packets (LSPs) that contain can build its link-state packets (LSPs) that contain the link-state information about its links. the link-state information about its links.

• A simplified version of the LSPs from R1 is:A simplified version of the LSPs from R1 is:

– 1. R1; Ethernet network 10.1.0.0/16; Cost 21. R1; Ethernet network 10.1.0.0/16; Cost 2– 2. R1 -> R2; Serial point-to-point network; 10.2.0.0/16; 2. R1 -> R2; Serial point-to-point network; 10.2.0.0/16;

Cost 20Cost 20– 3. R1 -> R3; Serial point-to-point network; 10.3.0.0/16; 3. R1 -> R3; Serial point-to-point network; 10.3.0.0/16;

Cost 5Cost 5– 4. R1 -> R4; Serial point-to-point network; 10.4.0.0/16; 4. R1 -> R4; Serial point-to-point network; 10.4.0.0/16;

Cost 20Cost 20

Page 15: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Building the link state Building the link state packetpacket (2)(2)

Page 16: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Flooding Link state Packet to Flooding Link state Packet to neighbors (1)neighbors (1)

• Each router floods its link-state information Each router floods its link-state information to all other link-state routers in the routing to all other link-state routers in the routing area. area.

• Whenever a router receives an LSP from a Whenever a router receives an LSP from a neighboring router, it immediately sends neighboring router, it immediately sends that LSP out all other interfaces except the that LSP out all other interfaces except the interface that received the LSP. interface that received the LSP.

• This process creates a This process creates a flooding effectflooding effect of LSPs of LSPs from all routers throughout the routing area. from all routers throughout the routing area.

Page 17: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Flooding Link state Packet to Flooding Link state Packet to neighbors (2)neighbors (2)

Page 18: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Flooding Link state Packet to Flooding Link state Packet to neighbors (3)neighbors (3)

Page 19: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Flooding Link state Packet to Flooding Link state Packet to neighbors (4)neighbors (4)• LSPs are flooded almost immediately after LSPs are flooded almost immediately after

being received, without any intermediate being received, without any intermediate calculations. calculations.

• Unlike distance vector routing protocols that Unlike distance vector routing protocols that must first run the Bellman-Ford algorithm to must first run the Bellman-Ford algorithm to process routing updates before sending process routing updates before sending them to other routers, them to other routers, link-state routing link-state routing protocols calculate the SPF algorithm after protocols calculate the SPF algorithm after the flooding is complete. the flooding is complete.

• As a result, link-state routing protocols As a result, link-state routing protocols reach convergence much faster than reach convergence much faster than distance vector routing protocols.distance vector routing protocols.

Page 20: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Flooding Link state Packet to Flooding Link state Packet to neighbors (5)neighbors (5)

• Remember that LSPs do not need to Remember that LSPs do not need to be sent periodically. be sent periodically.

• An LSP only needs to be sent:An LSP only needs to be sent:– During initial startup of the router or of During initial startup of the router or of

the routing protocol process on that the routing protocol process on that routerrouter

– Whenever there is a change in the Whenever there is a change in the topology, including a link going down or topology, including a link going down or coming up, or a neighbor adjacency being coming up, or a neighbor adjacency being established or brokenestablished or broken

Page 21: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Constructing a Link-state Constructing a Link-state Database (1)Database (1)

R1 has learned the link-state information for each router in its routing area. R1 also includes its own link-state information in the link-state database.

Page 22: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Constructing a Link-state Constructing a Link-state Database (2)Database (2)

With a complete link-state database, R1 can now use the database and the shortest path first (SPF) algorithm to calculate the preferred path or shortest path to each network.

Page 23: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Shortest Path First (SPF) Tree Shortest Path First (SPF) Tree (1) (1)

• Determining the Shortest PathDetermining the Shortest Path

• Because all LSPs have been processed Because all LSPs have been processed using the SPF algorithm, R1 has now using the SPF algorithm, R1 has now constructed the complete SPF tree. constructed the complete SPF tree.

• The 10.4.0.0/16 and 10.9.0.0/16 links are The 10.4.0.0/16 and 10.9.0.0/16 links are not used to reach other networks, because not used to reach other networks, because lower-cost or shorter paths exist. lower-cost or shorter paths exist.

• However these networks still exist as part However these networks still exist as part of the SPF tree and are used to reach of the SPF tree and are used to reach devices on those networks. devices on those networks.

Page 24: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Shortest Path First (SPF) Tree Shortest Path First (SPF) Tree (2)(2)• R1 determines that the shortest path for each R1 determines that the shortest path for each

network is:network is:– Network 10.5.0.0/16 via R2 serial 0/0/0 at a cost of 22Network 10.5.0.0/16 via R2 serial 0/0/0 at a cost of 22– Network 10.6.0.0/16 via R3 serial 0/0/1 at a cost of 7Network 10.6.0.0/16 via R3 serial 0/0/1 at a cost of 7– Network 10.7.0.0/16 via R3 serial 0/0/1 at a cost of 15Network 10.7.0.0/16 via R3 serial 0/0/1 at a cost of 15– Network 10.8.0.0/16 via R3 serial 0/0/1 at a cost of 17Network 10.8.0.0/16 via R3 serial 0/0/1 at a cost of 17– Network 10.9.0.0/16 via R2 serial 0/0/0 at a cost of 30Network 10.9.0.0/16 via R2 serial 0/0/0 at a cost of 30– Network 10.10.0.0/16 via R3 serial 0/0/1 at a cost of 25Network 10.10.0.0/16 via R3 serial 0/0/1 at a cost of 25– Network 10.11.0.0/16 via R3 serial 0/0/1 at a cost of 27Network 10.11.0.0/16 via R3 serial 0/0/1 at a cost of 27

Page 25: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Shortest Path First (SPF) Tree Shortest Path First (SPF) Tree (3)(3)

Page 26: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Shortest Path First (SPF) Tree Shortest Path First (SPF) Tree (4)(4)

Page 27: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Advantages of Link state Advantages of Link state Protocol (1)Protocol (1)• Builds a Topological MapBuilds a Topological Map

– Link-state routing protocols create a topological Link-state routing protocols create a topological map, or SPF tree of the network topology. map, or SPF tree of the network topology.

– Distance vector routing protocols do not have a Distance vector routing protocols do not have a topological map of the network. topological map of the network.

– Routers implementing a distance vector routing Routers implementing a distance vector routing protocol only have a list of networks, which protocol only have a list of networks, which includes the cost (distance) and next-hop routers includes the cost (distance) and next-hop routers (direction) to those networks. (direction) to those networks.

– Because link-state routing protocols exchange Because link-state routing protocols exchange link-states, the SPF algorithm can build an SPF link-states, the SPF algorithm can build an SPF tree of the network. tree of the network.

– Using the SPF tree, each router can Using the SPF tree, each router can independently determine the shortest path to independently determine the shortest path to every network.every network.

Page 28: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Advantages of Link state Advantages of Link state Protocol (2)Protocol (2)

• Fast ConvergenceFast Convergence– When receiving a Link-state Packet (LSP), link-When receiving a Link-state Packet (LSP), link-

state routing protocols immediately flood the state routing protocols immediately flood the LSP out all interfaces except for the interface LSP out all interfaces except for the interface from which the LSP was received. from which the LSP was received.

– A router using a distance vector routing protocol A router using a distance vector routing protocol needs to process each routing update and needs to process each routing update and update its routing table before flooding them out update its routing table before flooding them out other interfaces, even with triggered updates. other interfaces, even with triggered updates.

– Faster convergence is achieved for link-state Faster convergence is achieved for link-state routing protocols. routing protocols.

– A notable exception is EIGRP.A notable exception is EIGRP.

Page 29: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Advantages of Link state Advantages of Link state Protocol (3)Protocol (3)• Event-driven UpdatesEvent-driven Updates

– After the initial flooding of LSPs, link-state routing After the initial flooding of LSPs, link-state routing protocols only send out an LSP when there is a change protocols only send out an LSP when there is a change in the topology. in the topology.

– The LSP contains only the information regarding the The LSP contains only the information regarding the affected link. affected link.

– Unlike some distance vector routing protocols, link-state Unlike some distance vector routing protocols, link-state routing protocols do not send periodic updates.routing protocols do not send periodic updates.

• Note: OSPF routers do flood the own link-states Note: OSPF routers do flood the own link-states every 30 minutes. This is known as a paranoid every 30 minutes. This is known as a paranoid update. Also, not all distance vector routing update. Also, not all distance vector routing protocols send periodic updates. RIP and IGRP protocols send periodic updates. RIP and IGRP send periodic updates; however, EIGRP does not.send periodic updates; however, EIGRP does not.

Page 30: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Advantages of Link state Advantages of Link state Protocol (4)Protocol (4)

• Hierarchical DesignHierarchical Design– Link-state routing protocols such as Link-state routing protocols such as

OSPF and IS-IS use the concept of areas. OSPF and IS-IS use the concept of areas. – Multiple areas create a hierarchical Multiple areas create a hierarchical

design to networks, allowing for better design to networks, allowing for better route aggregation (summarization) and route aggregation (summarization) and the isolation of routing issues within an the isolation of routing issues within an area.area.

Page 31: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Requirements of a link state Requirements of a link state protocolprotocol (1)(1)

• Modern link-state routing protocols are Modern link-state routing protocols are designed to minimize the effects on memory, designed to minimize the effects on memory, CPU, and bandwidth. CPU, and bandwidth.

• The use and configuration of The use and configuration of multiple areasmultiple areas can reduce the size of the link-state can reduce the size of the link-state databases. databases.

• Multiple areas can also limit the amount of Multiple areas can also limit the amount of link-state information flooding in a routing link-state information flooding in a routing domain and send LSPs only to those routers domain and send LSPs only to those routers that need them.that need them.

Page 32: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Requirements of a link state Requirements of a link state protocolprotocol (2)(2)

Page 33: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Requirements of a link state Requirements of a link state protocolprotocol (3)(3)

• When there is a change in the topology, When there is a change in the topology, only those only those routers in the affected area receive the LSP and run the routers in the affected area receive the LSP and run the SPF algorithmSPF algorithm. .

• This can help isolate an unstable link to a specific area in This can help isolate an unstable link to a specific area in the routing domain. the routing domain.

• In the figure, there are three separate routing domains: In the figure, there are three separate routing domains: Area 1, Area 0, and Area 51. Area 1, Area 0, and Area 51. – If a network in Area 51 goes down, the LSP with the information If a network in Area 51 goes down, the LSP with the information

about this downed link is only flooded to other routers in that about this downed link is only flooded to other routers in that area. area.

– Only routers in Area 51 will need to update their link-state Only routers in Area 51 will need to update their link-state databases, rerun the SPF algorithm, create a new SPF tree, and databases, rerun the SPF algorithm, create a new SPF tree, and update their routing tables.update their routing tables.

– Routers in other areas will learn that this route is down, but this Routers in other areas will learn that this route is down, but this will be done with a type of link-state packet that does not cause will be done with a type of link-state packet that does not cause them to rerun their SPF algorithm.them to rerun their SPF algorithm.

– Routers in other areas can update their routing tables directly.Routers in other areas can update their routing tables directly.

Page 34: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Requirements of a link state Requirements of a link state protocolprotocol (4)(4)

• Memory RequirementsMemory Requirements– Link-state routing protocols typically require more Link-state routing protocols typically require more

memory, more CPU processing, and at times more memory, more CPU processing, and at times more bandwidth than distance vector routing protocols. bandwidth than distance vector routing protocols.

– The memory requirements are due to the use of link-state The memory requirements are due to the use of link-state databases and the creation of the SPF tree. databases and the creation of the SPF tree.

• Processing RequirementsProcessing Requirements– Link-state protocols can also require more CPU processing Link-state protocols can also require more CPU processing

than distance vector routing protocols. than distance vector routing protocols.

• Bandwidth RequirementsBandwidth Requirements– The flooding of link-state packets can adversely affect the The flooding of link-state packets can adversely affect the

available bandwidth on a network. available bandwidth on a network. – This should only occur during initial startup of routers, but This should only occur during initial startup of routers, but

can also be an issue on unstable networks.can also be an issue on unstable networks.

Page 35: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Requirements of a link state Requirements of a link state protocolprotocol (5)(5)

• There are two link-state routing protocols used for There are two link-state routing protocols used for routing IP today:routing IP today:– Open Shortest Path First (OSPF)Open Shortest Path First (OSPF)– Intermediate System-to-Intermediate System (IS-IS)Intermediate System-to-Intermediate System (IS-IS)

• OSPFOSPF• OSPF was designed by the IETF (Internet Engineering OSPF was designed by the IETF (Internet Engineering

Task Force) OSPF Working Group, which still exists Task Force) OSPF Working Group, which still exists today. today.

• The development of OSPF began in 1987 and there The development of OSPF began in 1987 and there are two current versions in use:are two current versions in use:– OSPFv2: OSPF for IPv4 networks (RFC 1247 and RFC 2328)OSPFv2: OSPF for IPv4 networks (RFC 1247 and RFC 2328)– OSPFv3: OSPF for IPv6 networks (RFC 2740)OSPFv3: OSPF for IPv6 networks (RFC 2740)

• Most of the work on OSPF was done by John Moy, Most of the work on OSPF was done by John Moy, author of most of the RFCs regarding OSPF. author of most of the RFCs regarding OSPF.

Page 36: Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.

Requirements of a link state Requirements of a link state protocolprotocol (6)(6)• IS-ISIS-IS• IS-IS was designed by ISO (International IS-IS was designed by ISO (International

Organization for Standardization) and is Organization for Standardization) and is described in ISO 10589. described in ISO 10589. – The first incarnation of this routing protocol was The first incarnation of this routing protocol was

developed at DEC (Digital Equipment Corporation) and is developed at DEC (Digital Equipment Corporation) and is known as DECnet Phase V. known as DECnet Phase V.

– Radia Perlman was the chief designer of the IS-IS routing Radia Perlman was the chief designer of the IS-IS routing protocol.protocol.

• IS-IS was originally designed for the OSI protocol IS-IS was originally designed for the OSI protocol suite and not the TCP/IP protocol suite. suite and not the TCP/IP protocol suite. – Later, Integrated IS-IS, or Dual IS-IS, included support for Later, Integrated IS-IS, or Dual IS-IS, included support for

IP networks. IP networks. – Although IS-IS has been known as the routing protocol Although IS-IS has been known as the routing protocol

used mainly by ISPs and carriers, more enterprise used mainly by ISPs and carriers, more enterprise networks are beginning to use IS-IS.networks are beginning to use IS-IS.