Download presentation
Presentation is loading. Please wait.
Published byVirginia Cannon Modified over 9 years ago
1
TCP/IP Protocol Suite 1 Chapter 14 Upon completion you will be able to: Unicast Routing Protocols: RIP, OSPF, and BGP Distinguish between intra and interdomain routing Understand distance vector routing and RIP Understand link state routing and OSPF Understand path vector routing and BGP Objectives
2
TCP/IP Protocol Suite 2 14.1 INTRA- AND INTERDOMAIN ROUTING Routing inside an autonomous system is referred to as intradomain routing. Routing between autonomous systems is referred to as interdomain routing.
3
TCP/IP Protocol Suite 3 Figure 14.1 Autonomous systems
4
TCP/IP Protocol Suite 4 Figure 14.2 Popular routing protocols
5
TCP/IP Protocol Suite 5 14.2 DISTANCE VECTOR ROUTING In distance vector routing, the least cost route between any two nodes is the route with minimum distance. In this protocol each node maintains a vector (table) of minimum distances to every node The topics discussed in this section include: InitializationSharingUpdating When to Share Two-Node Loop Instability Three-Node Instability
6
TCP/IP Protocol Suite 6 Figure 14.3 Distance vector routing tables
7
TCP/IP Protocol Suite 7 Figure 14.4 Initialization of tables in distance vector routing
8
TCP/IP Protocol Suite 8 In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change. Note:
9
TCP/IP Protocol Suite 9 Figure 14.5 Updating in distance vector routing
10
TCP/IP Protocol Suite10 Updating Routing Table If the next-node entry is different –The receiving node chooses the row with the smaller cost –If there is a tie, the old one is kept If the next-node entry is the same –The receiving node chooses the new row, even though the new value is infinity.
11
TCP/IP Protocol Suite11 When to Share Periodic Update –A node sends its routing table, normally 30 seconds, in a periodic update Triggered Update –A node sends its routing table to its neighbors any time when there is a change in its routing table 1. After updating its routing table, or 2. Detects some failure in the neighboring links
12
TCP/IP Protocol Suite 12 Figure 14.6 Two-node instability
13
TCP/IP Protocol Suite13 Two-Node Instability (1) Defining Infinity –Most implementations define 16 as infinity Split Horizon –Instead of flooding the table through each interface, each node sends only part of its table through each interface –E.g. node B thinks that the optimum route to reach X is via A, it does not need to advertise this piece of information to A
14
TCP/IP Protocol Suite14 Two-Node Instability (2) Split Horizon and Poison Reverse –One drawback of Split Horizon Normally, the DV protocol uses a timer and if there is no news about a route, the node deletes the route from its table In the previous e.g., node A cannot guess that this is due to split horizon or because B has not received any news about X recently –Poison Reverse Node B can still advertise the value for X, but is the source of information is A, it can replace the distance with infinity as a warning
15
TCP/IP Protocol Suite 15 Figure 14.7 Three-node instability If the instability is btw three nodes, stability cannot be guaranteed
16
TCP/IP Protocol Suite 16 14.3 RIP The Routing Information Protocol (RIP) is an intradomain routing protocol used inside an autonomous system. It is a very simple protocol based on distance vector routing. The topics discussed in this section include: RIP Message Format Requests and Responses Timers in RIP RIP Version 2 Encapsulation
17
TCP/IP Protocol Suite 17 Figure 14.8 Example of a domain using RIP
18
TCP/IP Protocol Suite 18 Figure 14.9 RIP message format
19
TCP/IP Protocol Suite 19 Figure 14.10 Request messages
20
TCP/IP Protocol Suite20 RIP messages Request –A request message is sent by a router that has just come up or by a router that has some time-out entries –A request can ask about specific entries or all entries Response –A response can be either solicited or unsolicited (30s or when there is a change in the routing table)
21
TCP/IP Protocol Suite 21 Figure 14.11 shows the update message sent from router R1 to router R2 in Figure 14.8. The message is sent out of interface 130.10.0.2. Example 1 See Next Slide The message is prepared with the combination of split horizon and poison reverse strategy in mind. Router R1 has obtained information about networks 195.2.4.0, 195.2.5.0, and 195.2.6.0 from router R2. When R1 sends an update message to R2, it replaces the actual value of the hop counts for these three networks with 16 (infinity) to prevent any confusion for R2. The figure also shows the table extracted from the message. Router R2 uses the source address of the IP datagram carrying the RIP message from R1 (130.10.02) as the next hop address.
22
TCP/IP Protocol Suite 22 Figure 14.11 Solution to Example 1 Split horizon & Poison Reverse
23
TCP/IP Protocol Suite 23 Figure 14.12 RIP timers
24
TCP/IP Protocol Suite24 RIP Timers Periodic timer –It controls the advertising of regular update message (25 ~ 30 sec) Expiration timer –It governs the validity of a route (180 sec) –The route is considered expired and the hop count of the route is set to 16 Garbage collection timer –A invalid route is not purged from the routing table until this timer expires (120 sec)
25
TCP/IP Protocol Suite 25 A routing table has 20 entries. It does not receive information about five routes for 200 s. How many timers are running at this time? Example 2 Solution The 21 timers are listed below: Periodic timer: 1 Expiration timer: 20 − 5 = 15 Garbage collection timer: 5
26
TCP/IP Protocol Suite 26 Figure 14.13 RIP version 2 format
27
TCP/IP Protocol Suite 27 Figure 14.14 Authentication
28
TCP/IP Protocol Suite28 RIPv2 vs. RIPv1 Classless Addressing Authentication Multicasting –RIPv1 uses broadcasting to send RIP messages to every neighbors. Routers as well as hosts receive the packets –RIPv2 uses the all-router multicast address to send the RIP messages only to RIP routers in the network
29
TCP/IP Protocol Suite 29 RIP uses the services of UDP on well-known port 520. Note:
30
TCP/IP Protocol Suite 30 14.4 LINK STATE ROUTING In link state routing, if each node in the domain has the entire topology of the domain, the node can use Dijkstra’s algorithm to build a routing table. The topics discussed in this section include: Building Routing Tables
31
TCP/IP Protocol Suite 31 Figure 14.15 Concept of link state routing
32
TCP/IP Protocol Suite 32 Figure 14.16 Link state knowledge
33
TCP/IP Protocol Suite33 Building Routing Tables Creation of the states of the links by each node, called the link state packets (LSP) Dissemination of LSPs to every other routers, called flooding (efficiently) Formation of a shortest path tree for each node Calculation of a routing table based on the shortest path tree
34
TCP/IP Protocol Suite34 Creation of LSP LSP data: E.g. the node ID, the list of links, a sequence number, and age. LSP Generation –When there is a change in the topology of the domain –On a periodic basis There is no actual need for this type of LSP, normally 60 minutes or 2 hours
35
TCP/IP Protocol Suite 35 Figure 14.17 Dijkstra algorithm
36
TCP/IP Protocol Suite 36 Figure 14.18 Example of formation of shortest path tree
37
TCP/IP Protocol Suite 37 Table 14.1 Routing table for node A
38
TCP/IP Protocol Suite 38 14.5 OSPF The Open Shortest Path First (OSPF) protocol is an intradomain routing protocol based on link state routing. Its domain is also an autonomous system. The topics discussed in this section include: AreasMetric Types of Links Graphical Representation OSPF Packets Link State Update Packet Other Packets Encapsulation
39
TCP/IP Protocol Suite 39 Figure 14.19 Areas in an autonomous system
40
TCP/IP Protocol Suite40 Area in OSPF (1) A collection of networks with area ID Routers inside an area flood the area with routing information Area border routers summarize the information about the area and send it to other areas Backbone area and backbone routers –All of the area inside an AS must be connected to the backbone
41
TCP/IP Protocol Suite41 Area in OSPF (2) Virtual link –If, because of some problem, the connectivity between a backbone and an area is broken, a virtual link between routers must be created by the administration to allow continuity of the functions of the backbone as the primary area
42
TCP/IP Protocol Suite 42 Figure 14.20 Types of links
43
TCP/IP Protocol Suite 43 Figure 14.21 Point-to-point link
44
TCP/IP Protocol Suite 44 Figure 14.22 Transient link
45
TCP/IP Protocol Suite 45 Figure 14.23 Stub link
46
TCP/IP Protocol Suite 46 Figure 14.24 Example of an AS and its graphical representation in OSPF
47
TCP/IP Protocol Suite 47 Figure 14.25 Types of OSPF packets
48
TCP/IP Protocol Suite 48 Figure 14.26 OSPF common header
49
TCP/IP Protocol Suite 49 Figure 14.27 Link state update packet
50
TCP/IP Protocol Suite 50 Figure 14.28 LSA general header
51
TCP/IP Protocol Suite51 LSA General Header (1) Link state age –When a router creates the message, the value of this field is 0 –When each successive router forwards this message, it estimates the transit time and adds it to the cumulative value of this field
52
TCP/IP Protocol Suite52 LSA General Header (2) E flag –If this flag is set to 1, it means the area is a stub area (an area that is connected to the backbone area by only one path T flag –If this flag is set to 1, it means the router can handle multiple types of services
53
TCP/IP Protocol Suite53 LSA General Header (3) Advertising router –The IP address of the router advertising this message Link state sequence number –A sequence number assigned to each link state update message
54
TCP/IP Protocol Suite54 LS Type and LS ID Address of the networkExternal link IP address of the boundary router Summary link to AS boundary Address of the networkSummary link to network IP address of the designated router Network link IP address of the routerRouter link Link state IDLink state type
55
TCP/IP Protocol Suite 55 Figure 14.29 Router link
56
TCP/IP Protocol Suite 56 Figure 14.30 Router link LSA
57
TCP/IP Protocol Suite 57 Table 14.2 Link types, link identification, and link data
58
TCP/IP Protocol Suite 58 Give the router link LSA sent by router 10.24.7.9 in Figure 14.31. Example 3 Solution This router has three links: two of type 1 (point-to- point) and one of type 3 (stub network). Figure 14.32 shows the router link LSA. See Next Slide See Figure 14.32
59
TCP/IP Protocol Suite 59 Figure 14.31 Example 3
60
TCP/IP Protocol Suite 60 Figure 14.32 Solution to Example 3
61
TCP/IP Protocol Suite 61 Figure 14.33 Network link
62
TCP/IP Protocol Suite 62 Figure 14.34 Network link advertisement format
63
TCP/IP Protocol Suite 63 Give the network link LSA in Figure 14.35. Example 4 Solution. See Next Slide See Figure 14.36
64
TCP/IP Protocol Suite 64 Figure 14.35 Example 4
65
TCP/IP Protocol Suite 65 Figure 14.36 Solution to Example 4
66
TCP/IP Protocol Suite 66 In Figure 14.37, which router(s) sends out router link LSAs? Example 5 Solution All routers advertise router link LSAs. a. R1 has two links, N1 and N2. b. R2 has one link, N1. c. R3 has two links, N2 and N3. See Next Slide
67
TCP/IP Protocol Suite 67 Figure 14.37 Example 5 and Example 6
68
TCP/IP Protocol Suite 68 In Figure 14.37, which router(s) sends out the network link LSAs? Example 6 Solution All three network must advertise network links: a. Advertisement for N1 is done by R1 because it is the only attached router and therefore the designated router. b. Advertisement for N2 can be done by either R1, R2, or R3, depending on which one is chosen as the designated router. c. Advertisement for N3 is done by R3 because it is the only attached router and therefore the designated router.
69
TCP/IP Protocol Suite 69 Figure 14.38 Summary link to network
70
TCP/IP Protocol Suite 70 Figure 14.39 Summary link to network LSA
71
TCP/IP Protocol Suite 71 Figure 14.40 Summary link to AS boundary router
72
TCP/IP Protocol Suite 72 Figure 14.41 Summary link to AS boundary router LSA
73
TCP/IP Protocol Suite 73 Figure 14.42 External link
74
TCP/IP Protocol Suite 74 Figure 14.43 External link LSA The AS boundary router may define a forwarding router that can provide a better route to the destination.
75
TCP/IP Protocol Suite 75 Figure 14.44 Hello packet OSPF uses the hello message to create neighborhood relationship and to test the reachability of neighbors. This is the first step in link state routing. Before a router can flood all of the other routers with information about its neighbors, it must first greet it neighbors.
76
TCP/IP Protocol Suite 76 Figure 14.45 Database description packet When a router is connected to the system for the first time or after a failure, it needs the complete link state database immediately. Therefore, it sends hello packets to greet its neighbors. If this is the first time that the neighbors hear from the router, they send a database description message. The database description packet does not contain complete database information; it only gives an outline, the title of each lines in the database.
77
TCP/IP Protocol Suite 77 Figure 14.46 Link state request packet
78
TCP/IP Protocol Suite 78 Figure 14.47 Link state acknowledgment packet
79
TCP/IP Protocol Suite 79 OSPF packets are encapsulated in IP datagrams. Note:
80
TCP/IP Protocol Suite 80 14.6 PATH VECTOR ROUTING Path vector routing is similar to distance vector routing. There is at least one node, called the speaker node, in each AS that creates a routing table and advertises it to speaker nodes in the neighboring ASs.. The topics discussed in this section include: InitializationSharingUpdating
81
TCP/IP Protocol Suite 81 Figure 14.48 Initial routing tables in path vector routing A speaker node advertises the path, not the metric of the nodes, in its AS or other ASs.
82
TCP/IP Protocol Suite 82 Figure 14.49 Stabilized tables for four autonomous systems
83
TCP/IP Protocol Suite83 Path Vector Routing (1) Sharing –A speaker in an AS shares its table with immediate neighbors Updating –Adding the nodes that are not in its routing table and adding its own AS and the AS that sent the table –The routing table shows the path completely
84
TCP/IP Protocol Suite84 Path Vector Routing (2) Loop prevention –A route checks to see if its SA is in the path list to the destination Policy routing –If one of the ASs listed in the path is against its policy, it can ignore that path and that destination –It does not update its routing table with the path, and it does not send this message to its neighbors
85
TCP/IP Protocol Suite85 Path Vector Routing (3) Optimum path –Problem: each AS that is included in the path may use a different criteria for the metric –The optimum path is the path that fits the organization –For Fig. 14-49, the author chose the one that had the smaller number of ASs –Other criteria: security, safety, reliability, etc.
86
TCP/IP Protocol Suite 86 14.7 BGP Border Gateway Protocol (BGP) is an interdomain routing protocol using path vector routing. It first appeared in 1989 and has gone through four versions. The topics discussed in this section include: Types of Autonomous Systems Path Attributes BGP Sessions External and Internal BGP Types of Packets Packet Format Encapsulation
87
TCP/IP Protocol Suite87 Types of AS Stub AS –Only one connection to another AS (only a source or sink for data traffic) Multihomed AS –More than one connection to other AS, but it is still only a source or sink for data traffic Transit AS –Multihomed AS that also allows transient traffic
88
TCP/IP Protocol Suite 88 Figure 14.50 Internal and external BGP sessions
89
TCP/IP Protocol Suite 89 Figure 14.51 Types of BGP messages When a TCP connection is created for BGP, it can last for a long time, until something unusual happens. For this reason, BGP sessions are sometimes referred to as semi-permanent connections.
90
TCP/IP Protocol Suite 90 Figure 14.52 BGP packet header (for authentication)
91
TCP/IP Protocol Suite 91 Figure 14.53 Open message
92
TCP/IP Protocol Suite 92 Figure 14.54 Update message
93
TCP/IP Protocol Suite93 Path Attributes ORIGIN –The source of the routing information (RIP, OSPF, etc) AS_PATH –The list of ASs through which the destination can be reached NEXT-HOP –The next router to which the data packet should be sent
94
TCP/IP Protocol Suite94 NLRI Network layer reachability information –It defines the network that is actually advertised by this message –Length field and IP address prefix –BGP4 supports classless addressing and CIDR
95
TCP/IP Protocol Suite 95 BGP supports classless addressing and CIDR. Note:
96
TCP/IP Protocol Suite 96 Figure 14.55 Keepalive message
97
TCP/IP Protocol Suite 97 Figure 14.56 Notification message
98
TCP/IP Protocol Suite 98 Table 14.3 Error codes
99
TCP/IP Protocol Suite 99 BGP uses the services of TCP on port 179. Note:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.