/TZKXTKZRG_KXVXUZUIURY Figure 6.42 Application of routing protocols In a simple AS consisting of only a few physical networks, the routing function provided by IP may be sufficient. In larger ASs, however, sophisticated routers using adaptive routing algorithms may be needed. These routers will communicate with each other using interior gateway protocols such as RIP, Hello, IS-IS or OSPF. Routers in different ASs, however, cannot use IGPs for communication for more than one reason. Firstly, IGPs are not optimized for long-distance path determination. Secondly, the owners of ASs (particularly Internet service providers) would find it unacceptable for their routing metrics (which include sensitive information such as error rates and network traffic) to be visible to their competitors. For this reason routers that communicate with each other and are resident in different ASs communicate with each other using exterior gateway protocols. The routers on the periphery, connected to other ASs, must be capable of handling both the appropriate IGPs and EGPs. The most common exterior gateway protocol currently used in the TCP/IP environment is border gateway patrol (BGP), the current version being BGP-4. A third type of routing protocol is used by the core routers (gateways) that connect users to the Internet backbone. They use gateway to gateway protocols (GGP) to communicate with each other. /TZKXOUXMGZK]G_VXUZUIURY The protocols that will be discussed are RIPv2 (routing information protocol version 2), EIGRP (enhanced interior gateway routing protocol), and OSPF (open shortest path first). 8/6\ RIPv2 originally saw the light as RIP (RFC 1058, 1388) and is one of the oldest routing protocols. The original RIP had a shortcoming in that it could not handle variable-length 6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM subnet masks, and hence could not support CIDR. This capability has been included with RIPv2. RIPv2 is a distance vector routing protocol where each router, using a special packet to collect and share information about distances, keeps a routing table of its perspective of the network showing the number of hops required to reach each network. RIP uses as a metric (i.e. form of measurement) the hop counts. In order to maintain their individual perspective of the network, routers periodically pass copies of their routing tables to their immediate neighbors. Each recipient adds a distance vector to the table and forwards the table to its immediate neighbors. The hop count is incremented by one every time the packet passes through a router. RIP only records one route per destination (even if there are more). The Figure 6.43 shows a sample network and the relevant routing tables. The RIP routers have fixed update intervals and each router broadcasts its entire routing table to other routers at 30-second intervals (60 seconds for netware RIP). Each router takes the routing information from its neighbor, adds or subtracts one hop to the various routes to account for itself, and then broadcasts its updated table. Every time a router entry is updated, the timeout value for the entry is reset. If an entry has not been updated within 180 seconds it is assumed suspect and the hop field set to 16 to mark the route as unreachable and it is later removed from the routing table. One of the major problems with distance vector protocols like RIP is the convergence time, which is the time it takes for the routing information on all routers to settle in response to some change to the network. For a large network the convergence time can be long and there is a greater chance of frames being misrouted. Figure 6.43 RIP tables RIPv2 (RFC1723) also supports: • Authentication This prevents a routing table from being corrupted with incorrect data from a bad source • Subnet masks The IP address and its subnet mask enable the RIPv2 to identify the type of destination that the route leads to. This enables it to discern the network subnet from the host address /TZKXTKZRG_KXVXUZUIURY • IP identification This makes RIPv2 more effective than RIP as it prevents unnecessary hops. This is useful where multiple routing protocols are used simultaneously and some routes may never be identified. The IP address of the next hop router would be passed to neighboring routers via routing table updates. These routers would then force datagrams to use a specific route whether or not that route had been calculated to be the optimum route or not using least hop count • Multicasting of RIPv2 messages This is a method of simultaneously advertising routing data to multiple RIP or RIPv2 devices. This is useful when multiple destinations must receive identical information +/-86 EIGRP is an enhancement of the original IGRP, a proprietary routing protocol developed by Cisco Systems for use on the Internet. IGRP is outdated since it cannot handle CIDR and variable-length subnet masks. EIGRP is a distance vector routing protocol that uses a composite metric for route calculations. It allows for multipath routing, load balancing across 2, 3 or 4 links, and automatic recovery from a failed link. Since it does not only take hop count into consideration, it has better real-time appreciation of the link status between routers and is more flexible than RIP. Like RIP it broadcasts whole routing table updates, but at 90 second intervals. Each of the metrics used in the calculation of the distance vectors has a weighting factor. The metrics used in the calculation are as follows: • Hop count. Unlike RIP, EIGRP does not stop at 16 hops and can operate up to a maximum of 255 • Packet size (maximum transmission unit or MTU) • Link bandwidth • Delay • Loading • Reliability The metric used is: Metric = K1 * bandwidth + (K2 * bandwidth)/(256 – Load) + K3 * Delay (K1, K2 and K3 are weighting factors.) Reliability is also added in using the metric: Metric modified = Metric * K5/(reliability + K4) This modifies the existing metric calculated in the first equation above. One of the key design parameters of EIGRP is complete independence from routed protocols. Hence EIGRP has implemented a modular approach to supporting routed protocols and can easily be retrofitted to support any other routed protocol. 596, This was designed specifically as an IP routing protocol, hence it cannot transport IPX or Appletalk protocols. It is encapsulated directly in the IP protocol. OSPF can quickly detect topological changes by flooding link state advertisements to all the other neighbors with reasonably quick convergence. 6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM OSPF is a link state routing or shortest path first (SPF) protocol detailed in RFCs 1131, 1247 and 1583. Here each router periodically uses a broadcast mechanism to transmit information to all other routers, about its own directly connected routers and the status of the data links to them. Based on the information received from all the other routers each router then constructs its own network routing tree using the shortest path algorithm. These routers continually monitor the status of their links by sending packets to neighboring routers. When the status of a router or link changes, this information is broadcast to the other routers that then update their routing tables. This process is known as flooding and the packets sent are very small representing only the link state changes. Using cost as the metric OSPF can support a much larger network than RIP, which is limited to 15 routers. A problem area can be in mixed RIP and OSPF environments if routers go from RIP to OSPF and back when hop counts are not incremented correctly. +^ZKXOUXMGZK]G_VXUZUIURY+-6Y One of the earlier EGPs was, in fact called EGP! The current de facto Internet standard for inter-domain (AS) routing is border gateway patrol version 4, or simply BGP-4. (-6 BGP-4, as detailed in RFC 1771, performs intelligent route selection based on the shortest autonomous system path. In other words, whereas interior gateway protocols such as RIP make decisions on the number of ROUTERS to a specific destination, BGP-4 bases its decisions on the number of AUTONOMOUS SYSTEMS to a specific destination. It is a so-called path vector protocol, and runs over TCP (port 179). BGP routers in one autonomous system speak BGP to routers in other autonomous systems, where the ‘other’ autonomous system might be that of an Internet service provider, or another corporation. Companies with an international presence and a large, global WAN, may also opt to have a separate AS on each continent (running OSPF internally) and run BGP between them in order to create a clean separation. GGP comes in two ‘flavors’ namely ‘internal’ BGP (iBGP) and ‘external BGP’ (eBGP). IBGP is used within an AS and eBGP between ASs. In order to ascertain which one is used between two adjacent routers, one should look at the AS number for each router. BGP uses a formally registered AS number for entities that will advertise their presence in the Internet. Therefore, if two routers share the same AS number, they are probably using iBGP and if they differ, the routers speak eBGP. Incidentally, BGP routers are referred to as ‘BGP speakers’, all BGP routers are ‘peers’, and two adjacent BGP speakers are ‘neighbors.’ The range of non-registered (i.e. private) AS numbers is 64512–65535 and ISP typically issues these to stub ASs i.e. those that do not carry third-party traffic. As mentioned earlier, iBGP is the form of BGP that exchanges BGP updates within an AS. Before information is exchanged with an external AS, iBGP ensures that networks within the AS are reachable. This is done by a combination of ‘peering’ between BGP routers within the AS and by distributing BGP routing information to IGPs that run within the AS, such as EIGRP, IS-IS, RIP or OSPF. Note that, within the AS, BGP peers do not have to be directly connected as long as there is an IGP running between them. The routing information exchanged consists of a series of AS numbers that describe the full path to the destination network. This information is used by BGP to construct a loop- free map of the network. In contrast with iBGP, eBGP handles traffic between routers located on DIFFERENT ASs. It can do load balancing in the case of multiple paths between two routers. It also /TZKXTKZRG_KXVXUZUIURY has a synchronization function that, if enabled, will prevent a BGP router from forwarding remote traffic to a transit AS before it has been established that all internal non-BGP routers within that AS are aware of the correct routing information. This is to ensure that packets are not dropped in transit through the AS. . connected to other ASs, must be capable of handling both the appropriate IGPs and EGPs. The most common exterior gateway protocol currently used in the TCP/IP environment is border gateway patrol. hops and can operate up to a maximum of 255 • Packet size (maximum transmission unit or MTU) • Link bandwidth • Delay • Loading • Reliability The metric used is: Metric = K1 * bandwidth. (enhanced interior gateway routing protocol), and OSPF (open shortest path first). 8/6 RIPv2 originally saw the light as RIP (RFC 1058, 1388) and is one of the oldest routing protocols.