189
Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Embed Size (px)

Citation preview

Page 1: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Chapter 13

Routing Protocols (RIP, OSPF, and BGP)

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 2: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Outlineo INTERIOR AND EXTERIOR ROUTINGo RIPo OSPFo BGP

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 3: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Introductiono An internet is a combination of networks connected

by routers

o How to pass a packet from source to destination ?n Which of the available pathways is the optimum pathway ?

o Depends on the metric: n Metric: a cost assigned for passing through a networkn A router should choose the route with the smallest metric

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 4: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Introduction (Cont.)o The metric assigned to each network depends on the

type of protocoln RIP (Routing Information Protocol)

o Treat each network as equalso The cost of passing through each network is the same: one hop

countn Open Shortest Path First (OSPF)

o Allow administrator to assign a cost for passing through a network based on the type of serviced requiredn For example, maximum throughput or minimum delay

n Border Gateway Protocol (BGP)o The criterion is the policy, which can be set by the administrator

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 5: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Introduction (Cont.)o Routing table can be static or dynamicn An internet needs dynamic routing tables

o Dynamic routing table is achieved by the routing prococols

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 6: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

INTERIORAND

EXTERIORROUTING

13.113.1

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 7: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Interior and Exterior Routingo An internet can be so large that one routing

protocol cannot handle the task of updating routing table of all routers

o Thus, an internet is divided into autonomous systems (AS)n AS is a group of networks and routers under the

authority of a single administration

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 8: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Interior and Exterior Routingo Interior routingn Routing inside an autonomous systemn Each AS can chose its own interior routing

protocoln Examples: RIP and OSPF

o Exterior routingn Routing between autonomous systemsn Only one exterior routing protocol is usually used

for exterior routingn Examples: BGP

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 9: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-1

Popular Routing Protocols

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 10: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Exampleo R1, R2, R3 and R4 use an interior and an

exterior routing protocol

o Solid thin linesn Interior routing protocol

o Broken thick linesn Exterior routing protocol

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 11: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-2

Autonomous Systems

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 12: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP:Routing

InformationProtocol

13.213.2

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 13: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIPo RIP: Routing Information Protocoln Based on distance vector routing

n Use the Bellman-Ford algorithm for calculating the routing tables

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 14: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Distance Vector Routingo Each router periodically shares its knowledge

about the entire internet with its neighborsn Sharing knowledge about the entire AS

o At the start, a router’s knowledge may be sparseo But, how much it knows is unimportant, it sends

whatever it has

n Sharing only with neighborso Sends its knowledge only to neighbors

n Sharing at regular intervals

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 15: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP Updating Informationo Routing table is updated on receipt of a RIP response messageo Receipt: a response RIP messageo Add one hop to the hop count for each advertised destinationo Repeat the following steps for each advertised destination

n If (destination not in the routing table)o Add the advertised information to the table

n Elseo If (next-hop field is the same)

n Replace retry in the table with the advertised oneo Else

n If (advertised hop count smaller than one in the table)o Replace entry in the routing table

o Return

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 16: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Example of Updating a Routing Table

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 17: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Initializing the Routing Tableo When a router is added to a networkn It initializes a routing table for itself using its

configuration file

n The table contains only the directly attached networks and the hop count (= 1)

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 18: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Updating the Routing Tableo Each routing table is updated upon receipt of

RIP message n Using the RIP updating message algorithm shown

above

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 19: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Initial Routing Tables in a Small Autonomous System

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 20: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Final Routing Tables for the Previous Figure

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 21: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP Message Formato Command: 8-bit

n The type of message: request (1) or response (2)o Version: 8-bit

n Define the RIP versiono Family: 16-bit

n Define the family of the protocol usedn TCP/IP: value is 2

o Address: 14 bytes n Defines the address of the destination networkn 14 bytes for this field to be applicable to any protocoln However, IP currently uses only 4 bytes, the rest are all 0s

o Distance: 32-bitn The hop count from the advertising router to the destination network

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 22: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-6

RIP Message Format

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 23: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Requests and Responseo RIP uses two type of messagesn Request and response

o Requestn Sent by a router that has just come up or has some

time-out entriesn Can ask specific entries or all entries

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 24: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-7

Request Messages

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 25: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Requests and Response (Cont.)o Response: solicited or unsolicitedn A solicited response: sent only in answer to a

requesto Contain information about the destination specified in

the corresponding requestn An unsolicited response: sent periodically

o Every 30so Contains information about the entire routing tableo Also called update packet

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 26: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

o What is the periodic response sent by router R1 in the next slide?

o Assume R1 knows about the whole autonomous system.

Example 1Example 1

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 27: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-8

Example 1

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 28: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

o R1 can advertise three networks 144.2.7.0, 144.2.9.0, and 144.2.12.0.

o The periodic response (update packet) is shown in the next slide.

SolutionSolution

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 29: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-9

Solution to Example 1

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 30: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Timers in RIPo RIP uses three timersn Periodic timer

n Expiration timer

n Garbage collection timer

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 31: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-10

RIP Timers

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 32: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Periodic Timero Periodic timern Control the advertising of regular update message

n Although protocol specifies 30 s, the working model uses a random number between 25 and 35 so Prevent routers update simultaneously

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 33: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Expiration Timero Govern the validity of a routeo Set to 180 s for a route when a router receives update

information for a routen If a new update for the route is received, the timer is resetn In normal operation, this occurs every 30 s

o If timer goes off, the route is considered expiredn The hop count of the route is set to 16, which means

destination is unreachable

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 34: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Garbage Collection Timero When a route becomes invalid, the router does not

immediately purge that route from its tableo It continues advertise the route with a metric value of

16o A garbage collection timer is set to 120 s for that

routeo When the count reaches zero, the route is purged from

the tableo Allow neighbors to become aware of the invalidity of

a route prior to purging

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 35: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

o A routing table has 20 entries. o It does not receive information about five

routes for 200 seconds. o How many timers are running at this time?

Example 2Example 2

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 36: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

o The timers are listed below:n Periodic timer: 1n Expiration timer: 20 - 5 = 15n Garbage collection timer: 5

SolutionSolution

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 37: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Problems in RIPo Slow Convergence

o Instability

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 38: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Slow Convergenceo A change somewhere in the internet

propagates very slowly through the rest of the internet

o For examplen A change is Net1, R1 updates itself immediatelyn R1->R2: an average of 15 sn R2->R3: an average of 15 sn …n Thus, R1-Rn: an average of 15 x n s

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 39: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-11

Slow Convergence

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 40: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Solutiono Limit the hop count to 15n Prevent data packet from wandering around

forever

o Thus, an autonomous system using RIP is limited to a diameter of 15n The number 16 is considered infinity and

designates an unreachable network

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 41: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-12

Hop count

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 42: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Instabilityo An internet running RIP can become unstablen A packet could go from one router to another in a

loop

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 43: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Instability

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 44: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Solutionso Triggered Update

o Split Horizons

o Poison Reverses

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 45: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Triggered Updateo If there is no change, updates are sent at the

30-s intervals

o If there is a change, the routers sends out its new table immediately

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 46: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Split Horizonso A router must distinguish between different interfaceo If a router received route updating message from an

interfacen This same updated information must not be sent back

through this interfaceo Example

n B receives information about Net1 and Net2 through its left interface

n This information is updated and passed on through the right interface but not to the left

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 47: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-14

Split Horizon

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 48: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Poison Reverseo A variation of split horizonso Information received is used to update routing table

and then passed out to all interfaceo However, a table entry that has come through one

interface is set to a metric of 16 as it goes out through the same interface

o For examplen Router B has received information about Net1 and Net2

through its left interfacen Thus, it sends information out about Net1 and Net2 with a

metric of 16

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 49: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-15

Poison Reverse

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 50: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP Version 2o Does not augment the length of the message

of each entry

o Only replace those fields in version 1 that were filled with 0s with some new fields

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 51: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP Version 2o New fieldsn Routing Tag: carries information such as the

autonomous system numbero Enable RIP to receive information from an exterior

routing tablen Subnet mask: carries the subnet mask (or prefix)

o RIP2 support classless addressing and CIDRn Next-hop address: show the address of the next

hop

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 52: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-16

RIP-v2 Format

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 53: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP version 2 supports RIP version 2 supports CIDR.CIDR.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 54: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Authenticationo Protect the message against unauthorized

advertisement

o The first entry of the message is set aside for authentication informationn Family field = FFFF16

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 55: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-17

Authentication

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 56: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Multicastingo Version 1 of RIP uses broadcasting to send

RIP message to every neighborn All the router and the hosts receive the packets

o RIP version 2n Uses the multicast address 224.0.0.9 to multicast

RIP message only to RIP routers in the network

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 57: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Encapsulationo RIP message are encapsulated in UDP user

datagram

o The well-known port assigned to RIP in UDP is port 520

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 58: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

RIP uses the services of UDP RIP uses the services of UDP on wellon well--known port 520.known port 520.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 59: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

OSPF:Open Shortest

Path First

13.313.3

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 60: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

OSPFo OSFP: Open Shortest Path Firsto Another interior routing protocolo OSPF divides an autonomous system into

areasn To handle routing efficiently and in a timely

manner

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 61: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Areaso A collection of networks, hosts, and routers

all contained within an autonomous system

o Thus, an autonomous system can be divided into many different areas

o All networks inside an area must be connected

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 62: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Areas (Cont.)o Routers inside an area flood the area with

routing information

o Each area has a special router called area border routersn Summarize the information about the area and

sent it to other areas

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 63: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Areas (Cont.)o Among the area inside an autonomous system

is a special area called backbonen All of the areas inside an AS must be connected

to the backboneo The routers inside the backbone are called the

backbone routersn A backbone router can also be an area border

router

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 64: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Areas (Cont.)o If the connectivity between a backbone and an

area is brokenn A virtual link must be created by the

administration

o Each area has an area identificationn The area identification of the backbone is zero

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 65: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-18

Areas in an Autonomous System

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 66: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Metricso OSPF allows the administrator to assign a

cost, called the metric, to each routeo Metric can be based on a type of servicen Minimum delayn Maximum throughput

o A router can have multiple routing tablesn Each based on a different type of service

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 67: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Routingo OSPF uses link state routing to update the

routing table in an area

o Link state routing: a process by which each router shares its knowledge about its neighbor with every router in the area

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 68: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Routing (Cont.)o Three keysn Sharing knowledge about the neighborhood

o Each router sends the state of its neighborhood to every other router in the area

n Sharing with every other routero Each router sends the state of its neighborhood to

every other router in the area by floodingn Sharing when there is a change

o Each router shares the state of its neighborhood only when there is a change

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 69: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Routing (Cont.)o The idea behind link state routingn Each router should have the exact topology of the

internet at every momento Thus, every router should have the whole

picture of the internetn A router can calculate the shortest path between

itself and each networko But, how to represent an internet by graph?

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 70: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Types of Linkso In OSPF, a connection is called a link

o Four types of linksn Point-to-pointn Transientn Stubn Virtual

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 71: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-19

Types of Links

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 72: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Point-to-Point Linko Connect two routers without any other host or router

in betweeno Example

n Telephone linen T-line

o Graphically representationn The routers are represented by nodesn The link is represented by a bidirectional edge

o The metricn Usually the same at the two ends

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 73: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-20

Point-to-Point Link

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 74: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Transient Linko A network with several routers attached to itn Data can enter through any of the routers and

leave through any router

o Examplen All LANs and some WANs with two or more

routers

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 75: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Transient Link (Cont.)o Graphically representation

n Figure b in the next slide. However, it iso Not efficient: each router need to advertise the neighborhood of

four other routersn For a total of 20 advertisement

o Not realistic: there is no single network (link) between each pair of routersn There should be only one network that serves as a crossroad

between all five routers

o Solution: one of the routers acts as a single networkn This router has a dual purpose: a true router and a

designated routero The link is represented as a bidirectional edgeo Figure c in the next slide

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 76: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-21

Transient Link

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 77: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Stub Linko A network that is connected to only one routern Data packet enter and leave through this only one

routero A special case of transient networko Graphically representationn The router as a noden The designed router as the networkn Note, the link is only one-directional

o From the router to the network

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 78: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-22

Stub Link

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 79: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Virtual Linko When the link between two routers is brokenn The administrator may create a virtual path

between them using a longer path and may go through several routers

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 80: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-23

Example of an internet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 81: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-24

Graphical Representation of an internet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 82: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Advertisementso Each entity distributes Link State Advertisement to

share information about their neighborso An LSA announces the states of entity linkso Five LSAs, depend on the type of entity

n Router linkn Network linkn Summary link to networkn Summary link to AS boundary routern External link

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 83: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-25

Types of LSAs

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 84: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Router Linko Define the links of a true router

o A true router uses this advertisement to announce information about n All of its links n What is at the other side of the links (neighbors)

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 85: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-26

Router Link

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 86: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Network Linko Defines the links of a network

o A designated router, on behalf of the transient network, distributes this type of LSA packet

o Announce the existence of all of the routersconnected to the network

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 87: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-27

Network Link

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 88: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Summary Link to Networko Router link and network link advertisements

n Flood the area with information inside an areao But a router must also know about the networks

outside its arean The area border routers provide this information

o An area border is active in more than one arean Receive router link and network link advertisementsn Create a router table for each arean Provide one area’s information to other areas by the

summary link to network advertisement

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 89: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Exampleo R1 is an area border routern Two routing table: one for area 1 and one for area

0o R1 will flood area 1 with information about

how to reach a network located in area 0

o R2 plays the same role

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 90: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-28

Summary Link to Network

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 91: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Summary Link to AS Boundary Routero Previous advertisement lets every router know the

cost to reach all of the networks inside the ASo But, how to reach a network outside an AS?o A router must know how to reach the autonomous

boundary router firsto The summary link to AS boundary router provides

this informationn The area border routers flood their area with this

information

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 92: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-29

Summary Link to AS Boundary Router

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 93: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

External Linko How a router inside an AS know which

networks are available outside the AS ?

o The AS boundary routers floods the autonomous system with the cost of each network outside the ASn Using a routing table created by an exterior

routing protocol

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 94: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

External Link (Cont.)o Notably, each advertisement announces one

single networkn Separate announcements are made if more than

one network exists

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 95: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-30

External Link

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 96: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

o In Figure 13.31 (next slide), which router(s) sends out router link LSAs?

Example 3Example 3

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 97: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-31

Example 3 and Example 4

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 98: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

SolutionSolution

All routers advertise router link LSAs.

R1 has two links, Net1 and Net2.

R2 has one link, Net2 in this AS.

R3 has two links, Net2 and Net3.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 99: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Example 4Example 4

In Figure 13.31, which router(s) sends out the network link LSAs?

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 100: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

SolutionSolution

All three network must advertise network links:

Advertisement for Net1 is done by R1 because it is the only router and therefore the designated router.

Advertisement for Net2 can be done by either R1, R2, or R3, depending on which one is chosen as the designated router.

Advertisement for Net3 is done by R3 because it is the only router and therefore the designated router.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 101: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Databaseo Every router in an arean Receive the router link and network link LSA

from every other routern And form a link state database

o A tabular representation of the topology of the internet inside an area

o Notably, every router in the same area has the same link state database

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 102: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

In OSPF, all routers have In OSPF, all routers have the same link state database.the same link state database.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 103: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Dijkstra Algorithmo Each router applies the Dijkstra algorithm to

from its link state database

o Dijkstra algorithmn Calculate the shortest path between two points

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 104: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-32-Part 1

Shortest Path Calculation

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 105: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-32-Part 2

Shortest Path Calculation

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 106: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-32 Part 3

Shortest Path Calculation

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 107: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Routing Tableo Each routers uses the shortest path tree method to

construct its routing tableo Routing table in OSPF includes the cost of reaching

each network in the areao To find the cost of reaching network outside of the

area, the routers use then Summary link to networkn Summary link to boundary routern External link advertisements

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 108: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Types of Packetso OSPF uses five different packets

n Hello packetn Database description packetn Link state request packetn Link state update packet

o Router linko Network linko Summary link to networko Summary link to AS boundary routero External link

n Link state acknowledgment packet

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 109: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-33

Types of OSPF Packets

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 110: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Packet Formato All OSPF packets share the same headern Version: 8-bit

o The version of the OSPF protocol. Currently, it is 2n Type: 8-bit

o The type of the packetn Message length: 16-bit

o The length of the total message including the headern Source route IP address: 32-bit

o The IP address of the router that sends the packet

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 111: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-34

OSPF Packet Header

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 112: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Packet Format (Cont.)n Area identification: 32-bit

o The area within which the routing take place

n Checksum: 16-bito Error detection on the entire packet excluding the authentication

type and authentication data field

n Authentication type: 16-bito Define the authentication method used in this areao 0: none, 1: password

n Authentication: 64-bito The actual value of the authentication datao Filled with 0 if type = 0; eight-character password if type = 1

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 113: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Hello Messageo OSPF uses the hello message ton Create neighborhood relationshipsn Test the reachability of neighbors

o First step in link state routingn It must first greet its neighbors

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 114: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-35

Hello Packet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 115: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Hello Packet Formato Network mask: 32-bit

n Define the network mask of the network over which the hello message is sent

o Hello interval: 16-bitn Define the number of seconds between hello message

o E flag: 1-bitn If it is set, the area is a stub area

o F flag: 1-bitn If it is set, the router supports multiple metrics

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 116: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Hello Packet Format (Cont.)o Priorityn The priority of the router. Used for the selection

of the designated routern The router with the highest priority is chosen as

the designated routern The router with the second highest priority is

chosen as the backup designated routern If it is 0, the router never wants to be a designated

or backup designated router

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 117: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Hello Packet Format (Cont.)o Dead interval: 32-bitn The number of seconds before a router assumes

that a neighbor is deado Designated router IP address: 32-bito Backup designated router IP address: 32-bito Neighbor IP address: a repeated 32-bit fieldn A current list of all the neighbors from which the

sending router has received the hello message

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 118: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Database Description Messageo When a router is connected to the system for

the first time or after a failuren It needs the complete link state database

immediatelyo Thus, it sends hello packets to greet its

neighborso If this is the first time that the neighbors hear

from the routern They send a database description packet

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 119: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Database Description Message (Cont.)o The database description message does not contain

complete database informationn It only gives an outline, the title of each line in the

databaseo The newly router examines the outline and find out

which lines it does not haven Send one or more link state request packets to get full

information about that particular linkn The content of the database may be divided into several

message

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 120: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Database Description Message (Cont.)o When two routers want to exchange database

description packetsn One of them acts as matern The other is the slave

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 121: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-36

Database Description Packet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 122: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Database Description Message Formato E flag: 1-bit

n Set to 1 if the advertising router is an autonomous boundary router

o B flag: 1-bitn Set to 1 if the advertising router is an area border router

o I flag: 1-bit, the initialization flagn Set to 1 if the message is the first message

o M flag: 1-bit, more flagn Set to 1 if this is not the last message

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 123: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Database Description Message Format (Cont.)o M/S flag: 1-bit, master/slave flag

n Indicate the origin of the packet. Master = 1, Slave = 0o Message sequence number: 32-bit

n Contain the sequence number of the messageo LSA header: 20-bit

n Used in each LSAn The format of this header is discussed in the link state

update messageo Only give the outline of each link

n It is repeated for each link in the link state database

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 124: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Request Packeto Sent by a router that needs information about

a specific route or routesn Answered with a link state update packet

o Used by a newly connected router to request more information after receiving the database description packet

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 125: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-37

Link State Request Packet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 126: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Update Packeto Used by a router to advertise the state of its

linkso Each update packet may contain several

different LSAso Packet formatn Number of link state advertisements: 32-bitn Link state advertisement

o There are five different LSAs, as discussed beforeo All have the same header format, but different bodies

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 127: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-38

Link State Update Packet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 128: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

LSA Formato Link state age: the number of seconds elapsed

since this message was first generatedn LSA goes from router to router, i.e., floodingn When a router create a message, age = 0n When each successive router forwards this message

o Estimate the transmit time and add it to the age field

o E flag: if 1, the area is a stub arean i.e., an area that is connected to the backbone area

by only one path

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 129: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

LSA Format (Cont.)o T flag: if 1, the router can handle multiple

types of serviceo Link state typen 1: router linkn 2: network linkn 3: summary link to networkn 4: summary link to AS boundary routern 5: external link

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 130: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

LSA Format (Cont.)o Link state ID: depend on the type of linkn Router link: IP address of the routern Network link: IP address of the designed routern Summary link to network: address of the networkn Summary link to AS boundary router: IP address

of the AS boundary routern External link: address of the external network

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 131: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

LSA Format (Cont.)o Advertisement router:

n IP address of the router advertising this messageo Link state sequence number:

n Sequence number assigned to each link state update message

o Link state checksum: n A special checksum algorithm: Fletcher’s checksum

o Length: n Total packet length

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 132: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-39

LSA Header

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 133: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Router Link LSAo Advertise all of the links of a router o Format

n Link ID: o Depend on the type of link, see Table 13.3

n Link data: o Give additional information about the link, also depend on the

type of link, see Table 13.3n Link type:

o Four different types of links are defined based on the type of network, see Table 13.3

n Number of types of services (TOS)o The number of type of services announced for each link

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 134: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Router Link LSA (Cont.)n Metric for TOS 0:

o Define the metrics for the default type of service (TOS 0)

n TOS: o Define the type of service

n Metric: o Define the metric for the corresponding TOS

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 135: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-40

Router Link LSA

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 136: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Table 13.3

Router addressAddress of neighbor router

Type 4: virtual link

Network maskNetwork addressType 3: connection to stub network

Router addressAddress of designed router

Type 2: connection to any-to-any network

Interface numberAddress of neighbor router

Type 1: point-to-point connection to another network

Link DataLink IdentificationLink Type

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 137: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Example 5Example 5

Give the router link LSA sent by router 10.24.7.9 in Figure 13.41.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 138: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-41

Example 5

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 139: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

o This router has three linksn Two of type 1 (point-to-point)n One of type 3 (stub network)

o Figure 13.42 shows the router link LSA

SolutionSolution

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 140: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-42

Solution to Example 5

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 141: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Network Link LSAo Announce the links connected to a networko Formatn Network mask

o Define the network maskn Attached router

o Define the IP addresses of all attached routers

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 142: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-43

Network Link Advertisement Format

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 143: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Example 6Example 6

Give the network link LSA in Figure 13.44.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 144: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-44

Example 6

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 145: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

SolutionSolution

The network, for which the network link advertises, has three routers attached. The LSA shows the mask and the router addresses. See Figure 13.45.

Note that only one of the routers, the designated router, advertises the network link.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 146: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-45

Solution to Example 6

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 147: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Summary Link to Network LSAo Used by the area router to announce the existence of

other networks outside the areao Each advertisement announces only one network

n If more than one network, a separate advertisement must be issued for each

o Formatn Network maskn TOS:

o Type of servicen Metric:

o Metric for the type of service defined in the TOS field

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 148: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-46

Summary Link to Network LSA

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 149: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Summary Link to AS Boundary Router LSAo Announce the route to an AS boundary routern Define the network to which the AS boundary

router is attached

o Formatn The same as the summary link to network LSA

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 150: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-47

Summary Link to AS Boundary LSA

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 151: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

External Link LSAo Announce all the networks outside the ASo Format: similar to the summary link to AS

boundary router LSA but add two fieldsn Forwarding address

o Define a forward router than can provide a better route to the destination

n External route tago Used by other protocol, but not by OSPF

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 152: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-48

External Link LSA

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 153: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Link State Acknowledgment Packeto OSPF forces every router to acknowledge the

receipt of every link state update packetn Make routing more reliable

o Formatn Common headern Link state header

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 154: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-49

Link State Acknowledgment Packet

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 155: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Encapsulationo OSPF packets are encapsulated in IP

datagramn OSPF contains the acknowledgment mechanism

for flow and error control

n Doe not need a transport layer protocol to provide these services

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 156: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

OSPF packets are OSPF packets are encapsulated in IP encapsulated in IP datagramsdatagrams..

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 157: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

BGP:Border Gateway

Protocol

13.413.4

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 158: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

BGPo BGP: Border Gateway Protocol

o An inter-autonomous system routing protocol

o Based on the path vector routing method

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 159: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

BGP (Cont.)o Why the distance vector routing and link state

routing are not good candidates for inter-autonomous system routing?

o Distance vector routingn There are occasions in which the route with the smallest

hop count is not the preferred routeo For example, we may not want a packet to pass through an AS

that is not secure even it is the shortest pathn Unstable as discussed before

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 160: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

BGP (Cont.)o Link state routingn An internet is usually too big for this routing

method

n If used, each router must have a huge link state databaseo It would take a long time for each router to calculate

its routing table by Dijkstra algorithm

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 161: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Path Vector Routingo Each entry in the routing table contains n The destination network

n The next router

n The path to reach the destination, usually defined as ordered list of ASs

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 162: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Example of a Path Vector Routing Table

AS62, AS02, AS09R12NO4

AS67, AS89, AS09, AS34

RO6NO3

AS22, AS67, AS05, AS89

R05NO2

AS14, AS23, AS67R01NO1

PathNext RouterNetwork

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 163: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Path Vector Messageo Autonomous boundary routers advertise the

reachability of networks in their own AS to neighbor autonomous boundary routers

o Each router receives a path vector messagen Verify the advertised path is in agreement with its policyn If yes, update its routing table and modify the message

before sending it to the next routero Add its AS number to the path and replacing the next router entry

with its own identification

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 164: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Exampleo R1 send a path vector messagen Advertise the reachability of N1

o R2 receives the messagen Update it routing tablen Send the message to R3 with adding its AS to the

path and inserting itself as the next router

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 165: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-50

Path Vector Packets

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 166: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Loop Preventiono Path vector routing can solve n The instability of distance vector routing

n The creation of loops o When a router receive a message, it check to see if its

AS is in the path list or notn If yes, looping is involved and the message is ignored

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 167: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Policy Routingo Policy routing can be easily implemented through

path vector routingn Once a router receives a message, it can check the path. n If one of the AS listed in the path is against its policy,

o It can ignore that path and that destinationo Does not update its routing table with this patho Does not send this message to its neighbors

o Thus, path vector routing are not based on the smallest hop count or the minimum metricn Based on the policy imposed on the router by the

administrator

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 168: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Path Attributeso In previous example, the path was presented

as a list of AS

o Actually, the path was presented as a list of attributesn The list of attributes help the receiving router

make a better decision when applying its policy

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 169: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Path Attributes (Cont.)o Attributes are divided into two categories: well-known and

optionalo Well-known: one that every BGP router should recognize

n Mandatoryo Must appear in the description of a routeo e.g., ORIGIN: the source of the routing information (RIP or OSPF)o e.g., AS_PATH: the list of AS through which the destination can be

reachedo e.g., NEXT_HOP: the next router to which data packet should be sent

n Discretionaryo Must be recognized by each routero But is not required to be included in every update message

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 170: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Path Attributes (Cont.)o Optional: one that need not be recognized by

every routern Transitive

o Must be passed to the next router by the router that has not implemented this attribute

n Nontransitiveo One that should be discarded if the receiving router

has not implemented it

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 171: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Types of Packetso BGP uses four different types of messagesn Open

n Update

n Keepalive

n Notification

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 172: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-51

Types of BGP Messages

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 173: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Packet Formato All BGP packets share the same common

headero Header formatn Marker: 16-bit

o Reserved for authenticationn Length: 2-bytes

o Define the length of the total message, including the header

n Type: 1-byteo Define the type of the packet

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 174: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-52

BGP Packet Header

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 175: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Open Messageo Used to create a neighborhood relationshipo A router running BGP opens a TCP

connection with a neighbor and sends an open message

o If the neighbor acceptsn It responses with a keepalive messagen The relationship then has been established

between the two router

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 176: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-53

Open Message

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 177: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Open Message Packet Formato Version: 1-byte

n Define the version of BGP. The current version is 4o My autonomous system: 2-byte

n Define the autonomous system numbero Hold time: 2-byte

n Define the maximum number of seconds that can elapsed before one of the parties receives a keepalive or update message from the other

n If a router does not receive one of the messages during the hold period, it considers the other party dead

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 178: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Open Message Packet Format (Cont.)o BGP number: 4-byten Define the router that sends the open message

o Option parameter length: 1-byten Define the length of the total option parameters

o Since open message may also contain some option parameters

o Option parametersn The only option parameters defined so far is

authentication

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 179: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Update Messageo Used by a router to n Withdraw destination that have advertised

previouslyn Announce a route to a new destination

o Note, a router can withdraw several destinations in a single update messagen However, it can only advertise one new

destination in a single update message

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 180: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Update Message Formato Unfeasible routes length: 2-byte

n Define the length of the next fieldo Withdraw routes

n List all routes that should be deleted from the previously advertised list

o Path attributes length: 2-byten Define the length of the next field

o Path attributes: n Defines the attributes of the path (route) to the network

whose reachability is being announced in this msssage

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 181: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-54

Update Message

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 182: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Update Message Formato Network Layer reachability information

(NLRI)n Define the network that is actually advertised by

this messagen Has two fields

o Length: define the number of bits in the prefixo IP address prefix:o Thus, BGP4 supports classless addressing and CIDR

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 183: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

BGP supports classless BGP supports classless addressing and CIDR.addressing and CIDR.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 184: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Keepalive Messageo The BGP routers exchange keepalive message

regularlyn Tell each other that they are alive

o Formatn Consist of only the common header

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 185: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-55

Keepalive Message

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 186: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Notification Messageo Sent by a router

n Whenever an error condition is detectedn A router wants to close the connection

o Formatn Error code: 1-byte, define the category of the error

o Message header erroro Open message erroro Update message erroro Hold timer expiredo Finite state machine erroro Cease

n Error subcode: 1-byteo Furthermore define the type of error in each category

n Error datao Used to give more diagnostic information about the error

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 187: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Figure 13-56

Notification Message

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 188: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

Encapsulationo BGP message are encapsulated in TCP

segments using the well-known port 179n No need for error control and flow control

o Thus, when a TCP connection is openedn The exchange of update, keepalive, and

notification message is continued n Until a notification message of type cease is sent

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com

Page 189: Chapter 13 Routing Protocols (RIP, OSPF, and BGP)osnet.cs.nchu.edu.tw/powpoint/Computer Network93_1/Chapter 13.pdf · Chapter 13 Routing Protocols (RIP, OSPF, and BGP) PDF created

BGP uses the BGP uses the services of TCP on port 179.services of TCP on port 179.

The McGraw-Hill Companies, Inc., 2000

PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com