CCNA 2 Module 6 Routing and Routing Protocols Routing • Routing is moving data from one network to another based on the Layer 3 address. • Routers look at the destination address in the layer 3 header and forward the data out the appropriate interface. • Network numbers and their associated interfaces are kept in the router’s routing table. Different Types of Routes There are basically three types of routes: 1. Static Routes 2. Dynamic Routes 3. Default Routes Static Routes • Static routes must be manually entered by the network administrator. • Static routes are configured according to the destination (remote) network number, subnet mask and next hop address or the exiting interface of the local router. • Static routes are configured from global configuration mode and are represented by an ‘S - ’ in the routing table. Static Routes • Because static routes must be configured manually, any network topology changes require the network administrator to add and delete static routes to account for the changes. • Because of the extra administrative requirements, static routing does not have the scalability of dynamic routing. Static Route Configuration Static Route-Outgoing Interface Gateway = exiting local interface Static Route-Next Hop Address Gateway = next hop address Administrative Distance • The administrative distance is an optional parameter that gives a measure of the reliability of the route. • A lower value for the administrative distance indicates the more reliable route. – Default Admin Dist = 1 and Max is 255 • A static route to a dest. network with a higher admin distance then the routing protocol for the same network can be used as a backup route. This is called a “Floating Static Route” Administrative Distance Static Default Routes • Default routes are used to route packets with destinations that do not match any of the other routes in the routing table. • Routers are typically configured with a default route for Internet-bound traffic. • Static default routes are configured exactly like any other static route except the destination network and subnet mask are 0.0.0.0 • This is called the “quad zero” route. Router(config)# ip route 0.0.0.0 0.0.0.0 172.16.0.1 Dynamic Routing • Dynamic routing is achieved by use of a routing protocol • A routing protocol allows one router to share information with other routers regarding the networks it knows about and their distance from that router (metric). • The information a router gets from another router is used to build and maintain a routing table. Routing Protocols • • • • • Examples of routing protocols are: Routing Information Protocol (RIP) Interior Gateway Routing Protocol (IGRP) Enhanced Interior Gateway Routing Protocol (EIGRP) Open Shortest Path First (OSPF) Border Gateway Protocol (BGP) Routing Protocols Routing protocols can be broken into different categories according to whether they are: 1. External or Internal to the Autonomous System 2. Distance Vector or Link-State 3. Classful or Classless Interior and Exterior Protocols • A routing protocol can be used to route traffic within an Autonomous System (AS), in which case the routing protocol would be “interior”. • A routing protocol can also be used to route traffic from one AS to another, in which case it would be “exterior”. • Interior and exterior refer to internal to the AS or external to the AS. Autonomous Systems • An autonomous system (AS) is a collection of networks under a common administration sharing a common routing strategy. • To the outside world, an AS is viewed as a single entity. • The American Registry of Internet Numbers (ARIN), a service provider, or an administrator assigns an identifying number to each AS. • This autonomous system number is a 16 bit number. Interior and Exterior Protocols • Interior Gateway Protocols: – RIP – IGRP and EIGRP – OSPF • Exterior Gateway Protocols: – BGP Distance Vector and Link-State • Most routing algorithms can be classified into one of two categories: 1. distance vector (RIP, IGRP) 2. link-state (OSPF) • • The distance vector routing approach determines the direction (vector) and distance (metric) to any link in the internetwork. The link-state approach, also called shortest path first, recreates the topology of the entire internetwork. Routing Metrics • • Routers decide how close a network is to itself by using a routing metric. Routing metrics can be calculated according to: 1. 2. 3. 4. 5. Hop count Bandwidth Reliability Load Delay Routing Metric Composite Metric Distance Vector Concepts • Distance vector routing algorithms pass periodic copies of a routing table (updates) from router to router. • Each router receives the entire routing table from its directly connected neighbor routers. • This same step-by-step process occurs in all directions between neighbor routers until all routers have a complete routing table of the entire internetwork. • Once this happens, the network has “converged.” Distance Vector Updates Routing Information Protocol Routing Information Protocol (RIP) was originally specified in RFC 1058. Its key characteristics include the following: 1. It is a distance vector routing protocol. 2. Hop count is used as the metric for path selection. 3. If the hop count is greater than 15, the packet is discarded (Max hop count = 15) 4. Routing updates are broadcast every 30 seconds, by default. 5. RIP is a classful routing protocol Interior Gateway Routing Protocol 1. 2. 3. 4. Interior Gateway Routing Protocol (IGRP) is a proprietary protocol developed by Cisco. Some of the IGRP key design characteristics emphasize the following: It is a distance vector routing protocol. Bandwidth, load, delay and reliability are used to create a composite metric. Routing updates are broadcast every 90 seconds, by default. IGRP is a classful routing protocol Link-State Concepts • Link-state algorithms are also known as Dijkstras algorithm or as SPF (shortest path first) algorithms. • Link-state routing algorithms maintain a complex database of topology information. • A link-state routing algorithm maintains full knowledge of distant routers and how they interconnect. • Link-state routers exchange Link State Advertisements (LSAs) to update network reachability. OSPF Route Calculation Link-State Routing Link-state routing uses: 1. Link-state advertisements (LSAs) – A link-state advertisement (LSA) is a small packet of routing information that is sent between routers. 2. Topological database – A topological database is a collection of information gathered from LSAs. 3. SPF algorithm – The shortest path first (SPF) algorithm is a calculation performed on the database resulting in the SPF tree. 4. Routing tables – A list of the known paths and interfaces for only the best routes to a destination. Open Shortest Path First 1. 2. 3. 4. 5. 6. Open Shortest Path First (OSPF) is a nonproprietary link-state routing protocol. The key characteristics of OSPF are as follows: It is a link-state routing protocol. Open standard routing protocol described in RFC 2328. Uses the SPF algorithm to calculate the lowest cost to a destination. Routing updates are flooded as topology changes occur to a multicast address. Update packets are passed across the network in eventtriggered updates, so convergence is fast. OSPF is a classless routing protocol. Enhanced IGRP - Hybrid 1. 2. 3. 4. 5. 6. EIGRP is a Cisco proprietary enhanced distance vector routing protocol. The key characteristics of EIGRP are as follows: It is an enhanced distance vector routing protocol. Uses load balancing. Uses a combination of distance vector (metric) and linkstate features (updates). Uses Diffused Update Algorithm (DUAL) to calculate the shortest path. Routing updates are triggered by topology changes. EIGRP is a classless routing protocol. Classful and Classless • Classful routing protocols such as RIP and IGRP do not support classless addresses or Variable Length Subnet Masks (VLSM) unless all subnet masks are the same! • Classful routing protocols can only route for specific subnets, if all subnet masks are the same! • Classless routing protocols (RIPv2, EIGRP, OSPF) support classless address and VLSM by sending subnet mask information as well as network information as part of the routing update. • Classless protocols support routing between individual subnets of different length subnet masks.