Routing Protocols Two classes of protocols: 1. Interior Routing Information Protocol (RIP) Open Shortest Path First (OSPF) 2. Exterior Border Gateway Protocol (BGP) Autonomous System (AS) What is an AS? A set of routers and networks managed by a single organization. The routers within the AS exchange information using a common routing protocol. The AS graph is connected (in the absence of failure). An organization can register their network and get an AS number. 1
Autonomous System (AS) AS1 R3 R7 R6 AS2 R4 IGP 1 IGP 2 R1 BGP R2 R5 Which class of protocols to use? Use interior router protocols to exchange information between routers within an AS. Use exterior routing protocol to pass exchange routing information between routers in different AS s. 2
Routing Information Protocol (RIP) The Routing Information Protocol (RIP) is one of the most commonly used Interior Gateway Protocol on internal networks It is a distance-vector protocol, which employs Hop Count as the metric. The maximum number ofhopsallowedwithripis15. RIP uses a distributed version of Bellman-Ford algorithm. RIP (contd.) Each node calculates the distances between itself and all other nodes within the AS and stores this information as a table. Eachnodesendsitstabletoallneighboringnodes. When a node receives distance tables from its neighbors, it calculates the shortest routes to all other nodes and updates its own table to reflect any changes. 3
Distance Vector Routing Table Destination Address Hop Count Next Router Other Information 115.2.1.00 4 132.35.27.1 126.3.56.6 5 176.21.11.3 165.11.12.3 7 173.23.12.5 188.22.33.2 6 130.22.34.7 195.23.12.8 3 201.23.11.5 Problems Slow convergence for larger networks. If a network becomes inaccessible, it may take a long time for all other routing tables to know this. After a number of message transfers. Routing loops may take a long time to be detected. Counting to infinity problem. Too much bandwidth consumed by routing updates. 4
Open Shortest Path First (OSPF) Widely used as the interior router protocol in TCP/IP networks. Basic concept: Computes a route that incurs the least cost. User configurable: delay, data rate, cost, etc. Each router maintains a database. Topology of the autonomous system to which the router belongs. Vertices and edges. Two types of vertices: Router Network Two types of (weighted) edges: Two routers connected to each other by direct point-to-point link. A router is directly connected to a network. A router calculates the least-cost path to all destination networks. Using Dijkstra s algorithm. Only the next hop to the destination is used in the forwarding process. 5
At steady state All routers know the same network topology. Hello packets sent every 10 seconds (configurable) to neighbors. Link State Advertisement (LSA) flooded initially from each router. Absence of Hello packet for 40 seconds indicate failure of neighbor. Causes LSA to be flooded again. LSAs re-flooded every 30 minutes anyway. OSPF Header Format 0 8 16 31 Version Type Message length SourceAddr AreaId Checksum Authentication type Authentication Data 6
Packet types : 1 : Hello (check if neighbor is up) 2 : Database Description (synchronize database at beginning) 3 : Link State Request (request specific LSA) 4 : Link State Update (LSAs flooded) 5 : Link State Acknowledgement (flooded LSAs are explicitly ack ed reliable flooding) Authentication type: Cleartext Encrypted (MD5 Hash, others possible) OSPF allows sets of networks to be grouped together. Such a grouping is called an Area. 7
OSPF 4 Net A 1 2 Net D R1 Net B 1 2 Note: Numbers in Blue shows the Cost to reach that network R2 5 Net C 1 3 R3 Link State Database Advertiser Network Cost Neighbor R1 A 4 R4 R1 B 1 R2 R2 B 2 R1 R2 C 5 R3 R3 C 1 R2 R3 D 3 R4 R4 A 1 R1 R4 D 2 R3 Network Cost Next A 4 Router ----- B 1 ----- C 8 R2 D 7 R4 Routing table of RI 8
Border Gateway Protocol (BGP) What is BGP? Most widely used exterior router protocol for the Internet. Allows routers belonging to different autonomous systems to exchange routing information. Sent as messages over TCP connections. The router tables get updated. 9
Message Types in BGP Four types of messages: 1) Open: used to open a neighbor connection with another router. 2) Update: used to transmit information about a single route. 3) Keepalive: used to periodically confirm the neighbor connection. 4) Notification: used to notify about some error condition. Types of error conditions reported: Message header error authentication and syntax. Open message error syntax errors and unrecognized options. Update message error. Hold timer expired used to close a connection if periodic messages are not received. Cease used by a router to close a connection with another router in the absence of any other error. 10
Functional Procedures in BGP Neighbor Acquisition Two routers agree to be neighbors by exchanging messages. Neighbor Reachability Check if the neighbor is still alive, and is maintaining the relationship. Network Reachability Each router maintains a list of the networks that it can reach, and the preferred routes. All modern-day routers support BGP. The routers that are managed by ISP s actually run BGP. Organizational networks in many cases do not run BGP. Rely on the ISP s routers to route packets to the outside world. Default route will be to the ISP router. 11
BGP Runs over TCP: BGP uses TCP for all communication. So the reliability issues are taken care by TCP. Conserve network bandwidth: BGP doesn t pass full information in each update message. Instead full information is just passed on once and thereafter successive messages only carries the incremental changes called deltas. Support for CIDR: BGP supports classless addressing (CIDR). That it supports a way to send the network mask along with the addresses. Security: BGP allows a receiver to authenticate messages, so that the identity of the sender can be verified. Multicasting and IGMP Multicasting is used to send a message to a select group of users (one-to-many) IP supports multicasting using class D address having more than 250 million addresses The Internet Group Message protocol (IGMP) has been designed to help a multicast router to identify hosts in a LAN environment IGMP uses three types messages: query message, membership report and leave report 12