networks and protocols ce00997-3 week 8b. link state routing

40
Networks and Protocols CE00997-3 Week 8b

Upload: blaze-christian-cain

Post on 04-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Networks and Protocols CE00997-3 Week 8b. Link state Routing

Networks and Protocols CE00997-3

Week 8b

Page 2: Networks and Protocols CE00997-3 Week 8b. Link state Routing

Link state Routing

Page 3: Networks and Protocols CE00997-3 Week 8b. Link state Routing

3

Distance Vector Verses Link State Routing Protocols.

•Views network topology from neighbour’s perspective

•Adds distance vectors from router to router

•Frequent, periodic updates – slow convergence.

•Passes entire routing table to neighbour’s

•Has a common view of the entire network topology

•Calculates shortest path to other routes

•Event-triggered updates – faster convergence

•Passes link-state routing updates to other routers.

Distance Vector Link State

Page 4: Networks and Protocols CE00997-3 Week 8b. Link state Routing

4

Link-state routing has the following advantages over distance vector protocols:

– Quick convergence – Periodic updates– Incremental updates– Network knowledge

Link State Protocols.

Link-state protocols work best in situations where:

•The network design is hierarchical, usually occurring in large networks.

•The administrators have a good knowledge of the implemented link-state routing protocol.

•Fast convergence of the network is crucial.

Page 5: Networks and Protocols CE00997-3 Week 8b. Link state Routing

5

• A link-state routing protocol maintains full knowledge of distant routers and how they interconnect.

• Link-state routing uses: – Link-state advertisements

(LSAs), – Topological database,– SPF protocol,– SPF tree, – A routing table of paths and

ports to each network

Link State Protocols.

Routing Table

Routing Table

LSA

Topological Database

Topological Database

SPF Protocol

SPF Protocol

SPF Tree

Page 6: Networks and Protocols CE00997-3 Week 8b. Link state Routing

6

Link State Protocols.

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

Page 7: Networks and Protocols CE00997-3 Week 8b. Link state Routing

7

Link-state routing has the following advantages over distance vector protocols:

– Each router builds its own topological map of the network to determine the shortest path.

– Immediate flooding of LSPs achieves faster convergence.

– LSPs are sent only when there is a change in the topology and contain only information regarding the change.

– Hierarchical design used when implementing multiple areas.

Advantages of Link State Protocols.

Page 8: Networks and Protocols CE00997-3 Week 8b. Link state Routing

8

OSPF Router Types

Page 9: Networks and Protocols CE00997-3 Week 8b. Link state Routing

9

OSPF Message Format•The OSPF packet header and packet type-specific data are encapsulated in an IP packet. In the IP packet header, the protocol field is set to 89 to indicate OSPF, and the destination address is set to one of two multicast addresses: 224.0.0.5 or 224.0.0.6.

•If the OSPF packet is encapsulated in an Ethernet frame, the destination MAC address is also a multicast address: 01-00-5E-00-00-05 or 01-00-5E-00-00-06.

Page 10: Networks and Protocols CE00997-3 Week 8b. Link state Routing

10

OSPF Packet TypesThere are five different types of OSPF Link-State Packets (LSPs). Each packet serves a specific purpose in the OSPF routing process:

Page 11: Networks and Protocols CE00997-3 Week 8b. Link state Routing

11

OSPF Message Format – Hello Packet

16 3180

Packet Length

24

Router ID

Bandwidth

Area ID

Authentication

Authentication

Network Mask

Version Type = 1

Checksum Au Type

Hello Interval Option Router Priority

Router Dead Interval

Designated Router (DR)

Backup Designated Router (BDR)

List of Neighbours

OSPFPacketHeader

OSPFHello

Packet

Page 12: Networks and Protocols CE00997-3 Week 8b. Link state Routing

12

• In most cases, OSPF Hello packets are sent as multicast to an address reserved for SPF Routers at 224.0.0.5. Using a multicast address allows a device to ignore the packet if its interface is not enabled to accept OSPF packets, saving CPU processing time on non-OSPF devices.

• The Dead interval is the period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor "down." Cisco uses a default of four times the Hello interval. For multiaccess and point-to-point segments, this period is 40 seconds. For NBMA networks, the Dead interval is 120 seconds.

• If the Dead interval expires before the routers receive a Hello packet, OSPF will remove that neighbor from its link-state database. The router floods the link-state information about the "down" neighbor out all OSPF enabled interfaces.

Hello Protocol

Page 13: Networks and Protocols CE00997-3 Week 8b. Link state Routing

13

Hello Protocol

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

R3

Fa0/0 Fa0/0

S0/0/1S0/0/0DCE

Fa0/0

Hello – I am Router ID10.2.2.2

Hello – I am Router ID10.3.3.3

Hello – I am Router ID10.2.2.2

OSPF Hello packets are sent every 10 seconds on multi-access networks and point-to-point serial links

The following interface values must match in order for OSPF to form an adjacency:

1. Hello Interval 2. Dead Interval3. Network Type

Page 14: Networks and Protocols CE00997-3 Week 8b. Link state Routing

14

Link-State Protocol Requirements

• Memory Requirements - typically require more memory, more CPU processing, and at times more bandwidth than distance vector routing protocols. The memory requirements are due to the use of link-state databases and the creation of the SPF tree.

• Processing Requirements - require more CPU processing than distance vector routing protocols. The SPF algorithm requires more CPU time than distance vector algorithms such as Bellman-Ford because link-state protocols build a complete map of the topology.

• Bandwidth Requirements - flooding of link-state packets can adversely affect the available bandwidth on a network. This should only occur during initial startup of routers, but can also be an issue on unstable networks.

Page 15: Networks and Protocols CE00997-3 Week 8b. Link state Routing

15

Link State-Protocol Comparison

• OSPF - designed by the IETF (Internet Engineering Task Force) OSPF Working Group, which still exists today. The development of OSPF began in 1987 and there are two current versions in use:

1. OSPFv2: OSPF for IPv4 networks (RFC 1247 and RFC 2328)OSPFv3: 2. OSPF for IPv6 networks (RFC 2740)

• IS-IS - designed by ISO and is described in ISO 10589. The first incarnation of this routing protocol was developed at DEC (Digital Equipment Corporation) and is known as DECnet Phase V. Radia Perlman was the chief designer of the IS-IS routing protocol.

• IS-IS was originally designed for the OSI protocol suite and not the TCP/IP protocol suite. Later, Integrated IS-IS, or Dual IS-IS, included support for IP networks. Although IS-IS has been known as the routing protocol used mainly by ISPs and carriers, more enterprise networks are beginning to use IS-IS.

Page 16: Networks and Protocols CE00997-3 Week 8b. Link state Routing

16

OSPF “Areas”• Hierarchical routing enables division of autonomous

systems into smaller internetworks that are called areas. • With this technique, routing still occurs between the areas

(called inter-area routing), but many of the smaller internal routing operations, such as recalculating the database – re-running the SPF algorithm, are restricted within an area.

Page 17: Networks and Protocols CE00997-3 Week 8b. Link state Routing

17

Dijkstra's SPF algorithm

R2 to R3 Path Cost = 20 + 5 = 25

R5 to R3 Path Cost = 10 + 20 + 5 = 35

Page 18: Networks and Protocols CE00997-3 Week 8b. Link state Routing

18

Link State Routing Process1. Each router learns about its own links, its own directly connected networks – detects interfaces in the ‘up’ state.

2. Each router is responsible for meeting its neighbors on directly connected networks - exchanges Hello packets with other link-state routers on directly connected networks.

3. Each router builds a Link-State Packet (LSP) containing the state of each directly connected link.

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

5. Each router uses the database to construct a complete map of the topology and computes the best path to each destination network - the router now has a complete map of all destinations in the topology and the routes to reach them.

Page 19: Networks and Protocols CE00997-3 Week 8b. Link state Routing

19

1. Learn Directly Connected Networks

10.1.0.0/16(2)

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

10.5.0.0/16(2)

10.6.0.0/16(2)

10.7.0.0/16(10)

10.8.0.0/16(2)

10.9.0.0/16(10)

10.10.0.0/16(10)

10.11.0.0/16(2)R1

R2

R3

R4

R5

Page 20: Networks and Protocols CE00997-3 Week 8b. Link state Routing

20

10.1.0.0/16(2)

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

Link 2:•Network – 10.2.0.0/16•IP Address – 10.2.0.1•Type – Serial•Cost – 20•Neighbours – R2

Link 1:•Network – 10.1.0.0/16•IP Address – 10.1.0.1•Type – Ethernet•Cost – 2•Neighbours – None

Link 3:•Network – 10.3.0.0/16•IP Address – 10.3.0.1•Type – Serial•Cost – 5•Neighbours – R3

Link 4:•Network – 10.4.0.0/16•IP Address – 10.4.0.1•Type – Serial•Cost – 20•Neighbours – R4

Fa0/0.1

S0/0/0.1

S0/0/1.1

S0/1/0.1

1. Learn Directly Connected Networks

Page 21: Networks and Protocols CE00997-3 Week 8b. Link state Routing

21

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

Fa0/0.1

S0/00.1

S0/0/1.1

S0/1/0.1

2. Sending Hello Packets

R1

R2

R4

R3

Hello

Hello

HelloHello

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

Page 22: Networks and Protocols CE00997-3 Week 8b. Link state Routing

22

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

Fa0/0.1

S0/00.1

S0/0/1.1

S0/1/0.1

2. Sending Hello Packets

R1

R2

R4

R3

Hello

Hello

Hello

•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. •R1 does not receive a Hello on this interface, so doesn’t continue with the link-state routing process steps for the Fa0/0 link.

Page 23: Networks and Protocols CE00997-3 Week 8b. Link state Routing

23

3. Build Link State Packet (LSP)

10.1.0.0/16(2)

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

10.5.0.0/16(2)

10.6.0.0/16(2)

10.7.0.0/16(10)

10.8.0.0/16(2)

10.9.0.0/16(10)

10.10.0.0/16(10)

10.11.0.0/16(2)

R1

R2

R3

R4

R5

R1 LSP1. R1; Ethernet network 10.1.0.0/16; Cost 2

2. R1 -> R2; Serial point-to-point network; 10.2.0.0/16; Cost 20

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

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

Page 24: Networks and Protocols CE00997-3 Week 8b. Link state Routing

24

4. Flood LSP to Neighbours

10.1.0.0/16(2)

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

10.5.0.0/16(2)

10.6.0.0/16 (2)

10.7.0.0/16(10)

10.8.0.0/16(2)

10.9.0.0/16(10)

10.10.0.0/16(10)

10.11.0.0/16(2)

R1

R2

R3

R4

R5

R1 LSP1. R1; Ethernet network 10.1.0.0/16; Cost 2

2. R1 -> R2; Serial point-to-point network; 10.2.0.0/16; Cost 20

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

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

R1LSP

R1LSP

R1LSP

R1LSP

•Each router floods its link-state information to all other link-state routers in the routing area. •Whenever a router receives an LSP from a neighboring router, it immediately sends that LSP out all other interfaces except the interface that received the LSP.

Page 25: Networks and Protocols CE00997-3 Week 8b. Link state Routing

25

LSPs do not need to be sent periodically. An LSP only needs to be sent:

1. During initial startup of the router or of the routing protocol process on that router

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

4. Flood LSP to Neighbours

Page 26: Networks and Protocols CE00997-3 Week 8b. Link state Routing

26

5a. Build Link-State Database

•As a result of the flooding process, router R1 has learned the link-state information for each router in its routing area.

•Note that R1 also includes its own link-state information in the link-state database.

Page 27: Networks and Protocols CE00997-3 Week 8b. Link state Routing

27

5b. Build SPF Tree10.5.0.0/16(2)

10.1.0.0/16(2)

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

10.6.0.0/16(2)

10.7.0.0/16(10)

10.8.0.0/16(2)

10.9.0.0/16(10)

10.10.0.0/16(10)

10.11.0.0/16(2)

R1

R2

R3

R4

R5

•Each router uses the database to construct a complete map of the topology and computes the best path to each destination network.

R1 SPF Tree

Page 28: Networks and Protocols CE00997-3 Week 8b. Link state Routing

28

Creating a Routing Table

10.2.0.0/16(20)

10.3.0.0/16(5)

10.4.0.0/16(20)

Fa0/0.1

S0/00.1

S0/0/1.1

S0/1/0.1

R1

R2

R4

R3

10.1.0.0/16(2)

•Using the shortest path information determined by the SPF algorithm, these paths can now be added to the routing table

Page 29: Networks and Protocols CE00997-3 Week 8b. Link state Routing

29

OSPF Metric•The Cisco IOS uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value. At each router, the cost for an interface is calculated as follows:

1 x 108 / bandwidth in bps

•Note that in routing metrics, the lowest cost route is the preferred route

Page 30: Networks and Protocols CE00997-3 Week 8b. Link state Routing

30

OSPF Metric

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

192.168.10.8/30

10.10.10.0/24

172.16.1.32/29R3172.16.1.16/28

Fa0/0 Fa0/0

192.168.10.0/30

.17 .1

.2 .9

.10

.1

.33

S0/0/1

.5192.168.10.4/30

S0/0/0DCE .6

Fa0/0

Lo010.1.1.1

Lo010.3.3.3

Lo010.2.2.2

Cost = 64

Cost = 1

•The cost of an OSPF route is the accumulated value from one router to the destination network.

Page 31: Networks and Protocols CE00997-3 Week 8b. Link state Routing

31

OSPF Metric - Bandwidth

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

192.168.10.8/30

10.10.10.0/24

172.16.1.32/29R3172.16.1.16/28

Fa0/0 Fa0/0

192.168.10.0/30

.17 .1

.2 .9

.10

.1

.33

S0/0/1

.5192.168.10.4/30

S0/0/0DCE .6

Fa0/0

Lo010.1.1.1

Lo010.3.3.3

Lo010.2.2.2

64kbps 128kbps

256kbps

Page 32: Networks and Protocols CE00997-3 Week 8b. Link state Routing

32

Multi-access Networks

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

10.10.10.0/24

172.16.1.32/29R3172.16.1.16/28

Fa0/0 Fa0/0

.17 .1

.2 .9

.10

.1

.33

S0/0/1

.5S0/0/0DCE .6

Fa0/0

Lo010.1.1.1

Lo010.3.3.3

Lo010.2.2.2

OSPF defines five network types:

1. Point-to-point (no DR/BDR)2. Broadcast Multi-access (Needs DR/BDR)3. Non-broadcast Multi-access (Needs DR/BDR) 4. Point-to-multipoint (no DR/BDR) 5. Virtual links

Broadcast Multi-access

Broadcast Multi-access

Broadcast Multi-access

Page 33: Networks and Protocols CE00997-3 Week 8b. Link state Routing

DR and BDR on Multi-Access Networks

• DR - Designated Router

• BDR – Backup Designated Router

• DR’s serve as collection points for Link State Advertisements (LSAs) on multi-access networks

• A BDR back ups the DR.

• If the IP network is multi-access, the OSPF routers will elect one DR and one BDR

• On multi-access, broadcast links (Ethernet), a DR and BDR (if there is more than one router) need to be elected.

Page 34: Networks and Protocols CE00997-3 Week 8b. Link state Routing

Electing the DR and BDR

• DR - Designated Router

• BDR – Backup Designated Router

• DR’s serve as collection points for Link State Advertisements (LSAs) on multi-access networks

• A BDR back ups the DR.

• If the IP network is multi-access, the OSPF routers will elect one DR and one BDR

• On multi-access, broadcast links (Ethernet), a DR and BDR (if there is more than one router) need to be elected.

Page 35: Networks and Protocols CE00997-3 Week 8b. Link state Routing

35

Multi-access Networks

R2

R1

R3

R4

R5

R5 - LSA224.0.0.6 DR

BDR

Instead of flooding LSAs to all routers in the network, DROthers only send their LSAs to the DR and BDR using the multicast address 224.0.0.6

R5 - LSA224.0.0.5

DRother

DRother

DRother

R5 - LSA224.0.0.5

R5 - LSA224.0.0.5

The DR is responsible for forwarding the LSAs from R1 to all other routers. The DR uses the multicast address 224.0.0.5

R5 - LSA224.0.0.6

Page 36: Networks and Protocols CE00997-3 Week 8b. Link state Routing

36

OSPF Default Route

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

192.168.10.8/30

10.10.10.0/24

172.16.1.32/29R3

Fa0/0

192.168.10.0/30

.1

.2 .9

.10

.1

.33

S0/0/1

.5192.168.10.4/30

S0/0/0DCE .6

Fa0/0

Lo010.3.3.3

Lo010.2.2.2ISP

Lo0172.30.1.1/30

•OSPF requires the use of the default-information originate command to advertise the 0.0.0.0/0 static default route to the other routers in the area.

Page 37: Networks and Protocols CE00997-3 Week 8b. Link state Routing

37

OSPF Default Route

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

192.168.10.8/30

10.10.10.0/24

172.16.1.32/29R3

Fa0/0

192.168.10.0/30

.1

.2 .9

.10

.1

.33

S0/0/1

.5192.168.10.4/30

S0/0/0DCE .6

Fa0/0

Lo010.3.3.3

Lo010.2.2.2R1

Lo0172.30.1.1/30

•E2 route is always the external cost, irrespective of the interior cost to reach that route

Page 38: Networks and Protocols CE00997-3 Week 8b. Link state Routing

38

172.16.1.16/28

Fa0/0

.17

Lo010.1.1.1

OSPF Reference Bandwidth

S0/0/0 S0/0/1DCE

R2

R1

S0/0/0DCE

S0/0/1

192.168.10.8/30

10.10.10.0/24

172.16.1.32/29R3

Fa0/0

192.168.10.0/30

.1

.2 .9

.10

.1

.33

S0/0/1

.5192.168.10.4/30

S0/0/0DCE .6

Fa0/0

Lo010.3.3.3

Lo010.2.2.2

•Using a reference bandwidth of 100,000,000 results in interfaces with bandwidth values of 100 Mbps and higher having the same OSPF cost of 1 – auto-cost reference-bandwidth used to set higher reference.

Page 39: Networks and Protocols CE00997-3 Week 8b. Link state Routing

39

Link State Updates (LSU)

•Link-state updates (LSUs) are the packets used for OSPF routing updates, and can contain 10 different types of Link-State Advertisements (LSAs):

Page 40: Networks and Protocols CE00997-3 Week 8b. Link state Routing

40

OSPF Administrative Distance•Administrative Distance (AD) is the trustworthiness (or preference) of the route source. OSPF has a default administrative distance of 110. •When it’s AD is compared to other interior gateway protocols (IGPs), OSPF is preferred over IS-IS and RIP.