ROUTING PROTOCOLS: INTRODUCTION: The purpose of the Routing protocols is to Route the packets This can be accomplished in two different ways (a) Static Routing: The routes are entered in a Table manually. - Difficult to keep the Routing table current - As the Network grows in complexity 100’s of 1000’s of entries have to be updated manually. If the Network changes, again routing tables have to be altered manually. Dynamic Routing: In this case, routing Tables are updated dynamically. - (b) Routing Protocols are divided into 2 major categories: INTERIOR and EXTERIOR. INTERIOR: (a) (b) RIP: Routing Information Protocol OSPF: Open Shortest Path First EXTERIOR: BGP ( Border Gateway Protocol). For the purpose of Routing, Networks are divided in to Autonomous Systems (AS) An Autonomous System (AS) is a group of Networks and Routers under the authority of Single Administrative Authority. Interior Routing Protocols are used to Route Packets over an AS. Exterior Routing Protocols are used to Route packets between AS Fig 13.2 TEXT P355 shows several AS connected through EBGP Routers Routers R1, R2, R3, R4 perform routing between AS Other Routers perform routing within the AS. We shall first discuss Interior Routing Protocols. There are 2 major Interior Routing Protocols RIP (Routing Information Protocol): Also called Distance Vector Routing Protocol DVRP) OSPF ( Open Shortest Path First): Also Called Link State Routing Protocol (LSRP) RIP (VER 1) RIP is an Internal Routing Protocol used inside an AS Very simple Protocol based on Distance Vector Routing, which uses the Bellman-Ford algorithm for creating a Routing Table. In Distance Vector Routing, each Router periodically shares its knowledge about the entire internet with only its neighbors. Notice 3 underlined words: (1) Periodically means at regular intervals-between 25 to 35 seconds randomly. (2) About the entire internetwork. (3) Only with it’s immediate neighbors. Every router maintains a Routing Table that has one entry for each destination it knows. The entry contains at least 3 pieces of information. (although Cisco Router’s routing table contains additional information such as interface name, subnet mask(called prefix) and the time the entry was last updated etc. Three pieces of information referred above are (1) Network Address of Destination. (2) The shortest distance to reach the destination in hop count ( the # of routers it has to pass to reach the destination). (3) The IP Address of the next hop (next Router) to which the packet should be forwarded to reach its final destination. Table 13.1 Text shows a Routing Table. RIP messages are encapsulated in UDP datagram and use well known port 520. RIP UPDATING ALGORITHM: When a Router implementing RIP Protocol receives a RIP response message, it updates it’s routing Table based on the following Algorithm (1) (2) Add one hop to the hop count for each advertised destination Repeat the following steps for each advertised destination. (a) Add the destination not already in the table (b) If the next hop field is the same or less in the advertised destination, replace entry in the table with the advertised value. Refer to fig 13.3 P 357 Text, which shows how routers update their tables upon receipt of RIP Advertisements. A Router receives a message from Router C, which shows destination Networks and their hop counts - It first increments the hop count by 1 - Next it retains entry for Net 1 - Next it updates entry for Net 2 because it is coming from the same Router - Next it adds entry for Net 3 - Next it replaces Net 6 entry with the new value - It retains Net 8 entry because it is the same as the old entry - For Net 9, it does not change the entry because it is larger then the old entry. Initializing the Routing table: When a Router is added to a Network, it initializes a Routing Table for itself using it’s configuration files. This table contains only the directly attached networks and their hop counts, which are initialized to 1 The next hop fields, which identifies the next Router is empty as shown in fig 13.4 p358 Text. Updating the Routing table: Each Routing Table is updated, when it receives a RIP update messages according to the RIP Algorithm as shown in the fig 13.5 p358 RIP Message Format: The format of RIP message is shown in fig 13.6 P 559 Text. Go through all fields of Request and Response packets and example 1 p 358/359. Timers in RIP: RIP uses 3 different timers to regulate its operation.(a) Periodic-25 to 35 seconds (b) Expiration – 180 seconds (3) Garbage Collection – 120 Seconds. Periodic Timer: Regular updates are sent every 25 to 35 seconds selected randomly. This done to minimize congestion. If every body sent an update at exactly the same time, the system would be overloaded. Expiration Timer: If no update is received for a route within 180 seconds, that Route is discarded and hop count is set 16 (infinity) meaning that destination is unreachable. Garbage Collection Timer: When a Route becomes invalid, the Router does not immediately remove that route from its table. It continues to advertise that route with a metric value of 16 ( so that everybody knows that this route is invalid). At the same time the Garbage Collection timer is set to 120 S for that route When the Timer reaches “0”, the Route is deleted This lets everybody know that the Route is invalid Go through example 2 on p367 Text Problems with RIP: Slow Convergence: RIP is slow in notifying changes in the Network to others The time taken to convey information about any change from one end to other is 15 N where is the average amount of time and N is the number of routers in the path See fig 13.11 p362 in the text That’s why RIP is limited to 15 hops and 16 hops is chosen as infinity (meaning destination unreachable) Endless Looping: Another problem with RIP is the possibility of a packet looping back and forth between Routers endlessly if one of the Network is down Discuss fig 13.13 p363 Text. Minimizing Instability problems: (a) Triggered Updates: (b) Regular updates occur every 25 to 35 seconds if there is no change in the Network. Triggered updates are sent immediately after a change occurs in the Network This reduces the time it takes Router to realize that a network is down, and hastens the recovery or service process Split Horizon: © Another technique used is called the Split horizon If a router has received updated information from an interface, this same information is not sent through the same interface. This way Router can minimize instability problems Poison Revenue: In this case as soon as information about a failed link is received, a Router not only updates its own routing table, but also immediately sends this information with a hop count of 16 to all other interfaces Discuss fig 13.15 p365 Text. Discuss RIP Ver 2 Message format P365 –367 Text. OSPF (Open Shortest Path First Routing Protocol) Introduction: OSPF Areas: Used for dissipating routing information within an AS To handle routing efficiency, OSPF divides an AS into AREAS. An AREA is a collection of Networks, hosts and routers contained within an AS Among the AREAS inside an AS is a special AREA called the BACKBONE. The BACKBONE serves as a Primary Area, and other Areas as Secondary Areas. All of the Areas inside an AS must be connected to the BACKBONE. The Routers inside the BACKBONE are called Backbone Routers If, due to some problem, the connectivity between a backbone and an area is broken, a Virtual Link between Routers must be created by the Administrator to allow the continuity of the function. Each Area has an Area Identification. The Area ID of the back bone is “Zero” See fig 13.18 TEXT OSPF METRIC: The OSPF Protocol allows the Administrator to assign a cost, called the METRIC, to each ROUTE based on the type of service required (for example BW, minimum delay, maximum throughput etc). In fact a Router can have multiple routing tables based on different TOS (Types Of Service) required. Link State Routing: Link State Routing uses 3 principle concepts to route packets (1) Shares Knowledge about the neighborhood: Checks the Status of the directly attached machines and relays this information to all other Routers in the AREA. (2) Shares with every other router in the AREA: By the process called Flooding. Shares this Knowledge only when there is a change: As opposed to regular updates at fixed interval Notice that by implementing the above 3 steps, every Router in the AREA has a complete picture of the Network Every Router then builds a database of the ROUTES to every other Network in the AREA. Every Router then applies the well known “DIJKSTRA’S ALGORITHM” to calculate the shortest Route to every other Network in the AREA and builds a Routing table with the shortest Route to all Networks Study p 368 to 376 TEXT. And give them an assignment on Dijkstra’s Algorithm. OSPF uses 5 different types of Packets as shown on P377TEXT. BGP (Border Gateway Protocol) Introduction: BGP is used to route packets between AS It is based on a routing method called Path Vector routing IN PVR, each entry in the Routing table contains the destination Address, the next Router and the path to reach destination The path is an ordered list of Autonomous Systems that a packet should travel through to reach the destination. See Table 13.4 p387 Text. All directly connected Autonomous Boundary Routers exchange Path Vector Messages regarding the reachability of the Networks Each ABR (Autonomous Boundary Router) that receives a PVM (Path Vector Message) verify that the advertised path is in agreement with its policy( A policy is a set of rules imposed by the Administrative Authority controlling the Routes) If it is, the Router updates its Routing table. It then adds its own AS # to the path, replaces the Next route entry with its own identification and sends the message to the next neighbor.. See fig 13.50 p388 Text. Read p 388 Text. Types of Packets: Read pages 389-393 Text. BGP messages are encapsulated in TCP segment using the well-known port 179.