IPv6: Route Control - Default Route dan ODR Konfigurasi

From OnnoWiki
Jump to navigation Jump to search

Configuring Default Routes and ODR Default routes can be configured either on each router that needs a default route or on one router that in turn advertises the routes to its peers. The case studies of this section examine both methods. Recall from the discussion of classful route lookups in Chapter 5, "Routing Information Protocol (RIP)," that a router first matches a major network number and then matches the subnet. If a subnet cannot be matched, the packet will be dropped. Classless route lookup is the default behavior on Cisco routers as of IOS 11.3 and later; for earlier IOS versions, lookups can be changed to classless (even for classful routing protocols) with the global command ip classless. Any router using a default route must perform classless route lookups. Figure 12-3 shows why. In this network, Memphis is speaking a dynamic routing protocol to Tanis and Giza, but is not receiving routes from Thebes. Memphis has a default route pointing to Thebes for routing packets to BigNet. If Memphis receives a packet with a destination address of 192.168.1.50 and is performing classful route lookups, it will first match major network 192.168.1.0, of which it has several subnets in its route table. Memphis will then attempt to find a route for subnet 192.168.1.48/28, but because Memphis is not receiving routes from Thebes, this subnet is not in its route table. The packet will be dropped. Figure 12-3. Memphis forwards packets to Thebes with a default route. If Memphis uses classful route lookups, subnet 192.168.1.48/28 will be unreachable.If Memphis is configured with ip classless, it will try to find the most specific match for 192.168.1.48/28 without matching the major network first. Finding no match for this subnet in the route table, it will match the default route and forward the packet to Thebes. Case Study: Static Default Routes The configuration of Memphis in Figure 12-3 is displayed in Example 12- 3. Example 12-3. Configuration of Router Memphis uses static IPv4 and IPv6 routes to create default routes. interface serial 0/0.1 ip address 192.168.1.33 255.255.255.240 ipv6 address 2001:db8:0:20::1/64 ipv6 rip egypt enable !interface serial 0/0.2 ip address 192.168.1.81 255.255.255.240 ipv6 address 2001:db8:0:50::1/64 ipv6 rip egypt enable ! interface serial 0/0.3 ip address 192.168.1.17 255.255.255.240 ipv6 address 2001:db8:0:10::1/64 ipv6 rip egypt enable ! router rip network 192.168.1.0 ! ip classless ip route 0.0.0.0 0.0.0.0 192.168.1.82 ipv6 route ::/0 2001:DB8:0:50::2 The static routes configure the default route addresses of 0.0.0.0 and ::/0 and use a mask that is also 0.0.0.0 (prefix length 0 for IPv6). A common mistake made by people configuring default routes for the first time is to use an all-ones mask instead of an all-zeros mask, such as the following: ip route 0.0.0.0 255.255.255.255 192.168.1.82 An all-ones mask would configure a host route to 0.0.0.0, and the only packets that would match this address would be those with a destination address of 0.0.0.0. The all-zeros mask, on the other hand, is a mask made up entirely of "don't care" bits and will match any bit in any position. The beginning of this chapter described the default address as a summary route taken to its extreme so that every bit is summarized with a zero. The mask of the default route is a summary mask taken to its extreme.Memphis' default route has a next-hop address at Thebes. This next-hop address is the gateway of last resort, or the default router. Example 12-4 shows the IPv4 route table at Memphis. The route to 0.0.0.0 is tagged as a candidate default, and the gateway of last resort is indicated at the top of the table. Example 12-5 shows the IPv6 route table. Example 12-4. Memphis' IPv4 route table, showing the default route and the gateway of last resort. Memphis#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route, o - ODR Gateway of last resort is 192.168.1.82 to network 0.0.0.0 192.168.1.0/28 is subnetted, 7 subnets R 192.168.1.96 [120/1] via 192.168.1.18, 00:00:15, Etherne R 192.168.1.64 [120/1] via 192.168.1.34, 00:00:27, Etherne C 192.168.1.80 is directly connected, Serial0 C 192.168.1.32 is directly connected, Ethernet1 C 192.168.1.16 is directly connected, Ethernet0 R 192.168.1.128 [120/1] via 192.168.1.34, 00:00:27, Ethern R 192.168.1.144 [120/1] via 192.168.1.18, 00:00:15, Ethern S* 0.0.0.0/0 [1/0] via 192.168.1.82 Memphis# Example 12-5. Memphis' IPv6 route table shows the static entry for the default address ::/0. Memphis#show ipv6 routeIPv6 Routing Table - 11 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B BGP U - Per-user Static route I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - IS O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 S

/0 [1/0]

via 2001:DB8:0:50::2 C L C L R C L 2001:DB8:0:10::/64 [0/0] via ::, Serial0/0.3 2001:DB8:0:10::1/128 [0/0] via ::, Serial0/0.3 2001:DB8:0:20::/64 [0/0] via ::, Serial0/0.1 2001:DB8:0:20::1/128 [0/0] via ::, Serial0/0.1 2001:DB8:0:40::/64 [120/2] via FE80::204:C1FF:FE50:F1C0, Serial0/0.1 2001:DB8:0:50::/64 [0/0] via ::, Serial0/0.2 2001:DB8:0:50::1/128 [0/0] via ::, Serial0/0.2 R 2001:DB8:0:90::/64 [120/2] via FE80::205:5EFF:FE6B:50A0, Serial0/0.3 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 Memphis# The default route now needs to be advertised to the rest of the RIP routers. This is done by redistributing the static route into RIP. Memphis will not advertise the default route to Tanis and Giza unless the staticroute is redistributed into the RIP protocol. [4] Example 12-6 shows that a redistribution command is added for both IPv4 and IPv6 on the Memphis router. [4] Before IOS train 12.0T, if a default route was known in the route table, RIP, IGRP, and EIGRP would automatically advertise it to neighbors, without the need to redistribute the static route into the routing protocol. Example 12-6. Redistribution commands have been added to Memphis to enable the static default routes to be advertised by RIP. router rip redistribute static ! ipv6 router rip egypt redistribute static OSPF and IS-IS do not use the redistribute command to advertise a default route but can still originate default routes, as shown in a subsequent case study. Example 12-7 and Example 12-8 show the IPv4 and IPv6 route tables of Tanis after the static default routes are redistributed into RIP. Example 12-7. The IPv4 route table of Tanis shows that the default route has been learned from Memphis via RIP. Tanis#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external E1 - OSPF external type 1, E2 - OSPF external type 2, Ei - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route, o - ODR Gateway of last resort is 192.168.1.17 to network 0.0.0.0 192.168.1.0/28 is subnetted, 9 subnets C 192.168.1.96 is directly connected, Ethernet1 R 192.168.1.64 [120/2] via 192.168.1.17, 00:00:01, Ethern R 192.168.1.80 [120/1] via 192.168.1.17, 00:00:01, Ethern R 192.168.1.32 [120/1] via 192.168.1.17, 00:00:01, Ethern R 192.168.1.48 [120/2] via 192.168.1.17, 00:00:01, Ethern C 192.168.1.16 is directly connected, Ethernet0 R 192.168.1.224 [120/1] via 192.168.1.17, 00:00:01, Ether R 192.168.1.128 [120/2] via 192.168.1.17, 00:00:01, Ether C 192.168.1.144 is directly connected, Ethernet2 R* 0.0.0.0/0 [120/1] via 192.168.1.17, 00:00:02, Ethernet0 Tanis# Example 12-8. The IPv6 route table of Tanis shows that the default route has been learned from Memphis via IPv6 RIP. Tanis#show ipv6 route IPv6 Routing Table - 10 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - IS O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 -via FE80::204:C1FF:FE50:E700, Serial0/0.1 R 2001:DB8:0:40::/64 [120/3] via FE80::204:C1FF:FE50:E700, Serial0/0.1 R 2001:DB8:0:50::/64 [120/2] via FE80::204:C1FF:FE50:E700, Serial0/0.1 C 2001:DB8:0:90::/64 [0/0] via ::, FastEthernet0/0 L 2001:DB8:0:90::1/128 [0/0] via ::, FastEthernet0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 Tanis# Default routes are also useful for connecting classless routing domains. In Figure 12-4, Chimu is connecting a RIP domain with an EIGRP domain. Although the masks of major network 192.168.25.0 are consistent in the RIP domain, they are variably subnetted in the EIGRP domain. Further, the VLSM scheme does not lend itself to summarization into RIP. Figure 12-4. A default route enables RIP to route into the variably subnetted EIGRP domain.Chimu's configuration is displayed in Example 12-9. Example 12-9. RIP routes are redistributed into EIGRP by Chimu, but a default route, rather than all the EIGRP routes, is advertised into the RIP domain. router eigrp 1 redistribute rip metric 1000 100 255 1 1500 passive-interface Ethernet0 passive-interface Ethernet1 network 192.168.25.0 ! router rip passive-interface Serial0 network 192.168.25.0 redistribute static ! ip classless ip route 0.0.0.0 0.0.0.0 Null0Chimu has a full set of routes from the EIGRP domain but is not redistributing them into RIP. Instead, Chimu is advertising a default route. The RIP routers will forward packets with unknown destinations to Chimu, which can then consult its route table for a more-specific route into the EIGRP domain. Chimu's static route is pointing to the null interface rather than a next-hop address. If a packet is forwarded to Chimu with a destination on a nonexistent subnet, such as 192.168.25.224/28, the packet will be dropped instead of being forwarded into the EIGRP domain. Case Study: The Default-Network Command An alternative method of configuring default routes is to use the command ip default-network. This command specifies a network address to be used as a default network. The network might be directly connected to the router, specified by a static route, or discovered by a dynamic routing protocol. The command was first introduced for use with IGRP, which doesn't identify 0.0.0.0 as a default route, so an existing network was flagged as the default instead. Only IGRP, EIGRP, and RIP use this command. The ip default-network command is a global command and causes any routing protocol that is configured on the router that supports the command to advertise a default route. The default route will be the network specified as an argument to the command if IGRP or EIGRP is used, and it will be 0.0.0.0 with RIP. The ip default-network command is used with RIP in the configuration of Athens in Figure 12-5. Athens configuration is displayed in Example 12-10. Figure 12-5. The default-network command is used atAthens to generate a default network advertisement. [View full size image] Example 12-10. The default-network command can be used by RIP to create a default route. router rip network 172.16.0.0 ! ip classless ip default-network 10.0.0.0 Example 12-11 shows that network 10.0.0.0 has been tagged as a candidate default route in the Athens route table, but notice that no gateway of last resort is specified. The reason is that Athens is the gateway to the default network. The ip default-network command will cause Athens to advertise a default network, even though no network statement for 10.0.0.0 exists under the RIP configuration (Example 12- 12). When using RIP, the ip default-network command configured onAthens causes Athens to advertise 0.0.0.0 as the default network, not the network specified by the ip default-network command. Example 12-11. Network 10.0.0.0 is tagged as a candidate default in Athens' route table. Athens#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route Gateway of last resort is not set

  • 10.0.0.0/8 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Ethernet0 172.16.0.0/16 is subnetted, 6 subnets R 172.16.4.0 [120/2] via 172.16.1.2, 00:00:12, Serial0 R 172.16.5.0 [120/2] via 172.16.1.2, 00:00:12, Serial0 R 172.16.6.0 [120/2] via 172.16.1.2, 00:00:12, Serial0 C 172.16.1.0 is directly connected, Serial0 R 172.16.2.0 [120/1] via 172.16.1.2, 00:00:12, Serial0 R 172.16.3.0 [120/1] via 172.16.1.2, 00:00:12, Serial0 Athens# Example 12-12. Sparta's route table shows that Athens is advertising a default route of 0.0.0.0 and that Athens is Sparta's gateway of last resort. Sparta#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte N1 - OSPF NSSA external type 1, N2 - OSPF NSSA externalE1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route, o - ODR Gateway of last resort is 172.16.1.1 to network 0.0.0.0 172.16.0.0/24 is subnetted, 6 subnets R 172.16.4.0 [120/1] via 172.16.3.2, 00:00:14, Ethernet1 R 172.16.5.0 [120/1] via 172.16.3.2, 00:00:14, Ethernet1 R 172.16.6.0 [120/1] via 172.16.2.2, 00:00:10, Ethernet0 C 172.16.1.0 is directly connected, Serial0 C 172.16.2.0 is directly connected, Ethernet0 C 172.16.3.0 is directly connected, Ethernet1 R* 0.0.0.0/0 [120/1] via 172.16.1.1, 00:00:17, Serial0 Sparta# As with RIP, EIGRP will advertise a default route to neighbors if the static route to 0.0.0.0 is configured, and EIGRP redistributes static routes. EIGRP advertises the redistributed route as an external route See Chapter 7, "Enhanced Interior Gateway Routing Protocol (EIGRP)." If the routers in Figure 12-5 are configured to run EIGRP using the ip default-network command, Athens' configuration will be as displayed in Example 12-13. Example 12-13. The default-network command can be used with EIGRP to flag a network as a candidate default route. router eigrp 1 network 10.0.0.0 network 172.16.0.0 ! ip classless ip default-network 10.0.0.0The ip default-network command remains the same as with RIP, but notice that a network statement for 10.0.0.0 is added to the EIGRP configuration. Since EIGRP sends the actual network address as the default network, that address must be configured to be advertised, as shown in Example 12-14. Compare the route table in Example 12-12 with the table in Example 12-14. RIP flags the route to 0.0.0.0/0 as the default, while EIGRP flags the route to 10.0.0.0/8 as the default network. Because Corinth has learned about the default route from Sparta, that router is Corinth's gateway of last resort. If the link to Sparta fails, Corinth will use Argos as its gateway of last resort. Example 12-14. EIGRP uses an actual network address, rather than 0.0.0.0, as the default network. Corinth's route table shows that network 10.0.0.0 is tagged as the default network. Corinth#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route Gateway of last resort is 172.16.3.1 to network 10.0.0.0 D* 10.0.0.0/8 [90/2195456] via 172.16.3.1, 00:02:32, Ether 172.16.0.0/16 is subnetted, 6 subnets C 172.16.4.0 is directly connected, Ethernet1 C 172.16.5.0 is directly connected, Serial0 D D D C 172.16.1.0 [90/1811456] via 172.16.3.1, 00:00:17, Ether 172.16.6.0 [90/921600] via 172.16.3.1, 00:00:16, Ethern 172.16.2.0 [90/793600] via 172.16.3.1, 00:00:16, EtherNotice that in the configuration of Athens, the ip default-network command is a global command. It is not associated with a particular routing protocol. Any routing protocol that is configured on the router that can use the ip default-network command will use it. If both RIP and EIGRP are configured on the router, both protocols will advertise a default route, as shown in Corinth's route table in Example 12-15. Example 12-15. Corinth's route table shows two candidate default routes when Athens is configured with both RIP and EIGRP and using the ip default-network command. Corinth#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route Gateway of last resort is 172.16.3.1 to network 10.0.0.0 D* 10.0.0.0/8 [90/2195456] via 172.16.3.1, 00:02:32, Ether 172.16.0.0/16 is subnetted, 6 subnets C 172.16.4.0 is directly connected, Ethernet1 C 172.16.5.0 is directly connected, Serial0 D 172.16.1.0 [90/1811456] via 172.16.3.1, 00:00:17, Ether D 172.16.6.0 [90/921600] via 172.16.3.1, 00:00:16, Ethern D 172.16.2.0 [90/793600] via 172.16.3.1, 00:00:16, Ethern C 172.16.3.0 is directly connected, Ethernet0 R* 0.0.0.0/0 [120/1] via 172.16.3.1, 00:00:17, Serial0 The EIGRP-discovered default network becomes the gateway of last resort because EIGRP has a lower administrative distance. There is an inherent lack of control in this method of advertising a default network. If multiple routing protocols are configured on the router, suchas RIP and EIGRP, and the ip default-network command is used, there is no way to control or limit which routing protocol advertises the default network. If Athens, in Figure 12-5, is running EIGRP for BigNet, and RIP for the rest of the network, and the ip default-network command is configured with the intent of advertising a default route into RIP, Athens will also advertise a default into EIGRP. This will disrupt routing not only for traffic originating in the RIP network and attempting to route to BigNet, but also for traffic within BigNet. When injecting routes into a routing protocol, it is always best to choose the method that offers the most control to minimize unintended route propagation. Case Study: The Default-Information Originate Command An OSPF ASBR and an IS-IS interdomain router will not automatically advertise a default route into their routing domains, even when one exists. For example, suppose Athens in Figure 12-5 is configured for OSPF and given a static default route into BigNet. Example 12-16 shows Athens's configuration. Example 12-16. Athens now routes with OSPF and has a static default route. router ospf 1 network 172.16.0.0 0.0.255.255 area 0 ! ip classless ip route 0.0.0.0 0.0.0.0 10.1.1.2 Example 12-17 shows the route tables of Athens and Sparta. Althoughthe static route has caused the gateway of last resort to be set at Athens, Sparta has no knowledge of the default route. The default route must be advertised into the OSPF domain in type 5 LSAs, which means that Athens must be an ASBR. Yet so far, nothing in Athens' configuration tells it to perform this function. Example 12-17. The OSPF process at Athens does not automatically advertise the default route into the OSPF domain. Athens#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c Gateway of last resort is 10.1.1.2 to network 0.0.0.0 10.0.0.0 255.255.255.0 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Ethernet0 172.16.0.0 is variably subnetted, 6 subnets, 2 masks O 172.16.5.0 255.255.255.0 [110/138] via 172.16.1.2, 00:04:1 O 172.16.4.1 255.255.255.0 [110/75] via 172.16.1.2, 00:04:17 O 172.16.6.1 255.255.255.0 [110/75] via 172.16.1.2, 00:04:17 C 172.16.1.0 255.255.255.0 is directly connected, Serial0 O 172.16.2.0 255.255.255.0 [110/74] via 172.16.1.2, 00:04:17 O 172.16.3.0 255.255.255.0 [110/74] via 172.16.1.2, 00:04:17 S* 0.0.0.0 0.0.0.0 [1/0] via 10.1.1.2 Sparta#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route, o - ODR Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 6 subnets, 2 masksO O O C C C 172.16.5.0/24 [110/74] via 172.16.2.2, 00:06:00, [110/74] via 172.16.3.2, 00:06:00, 172.16.4.1/24 [110/11] via 172.16.3.2, 00:06:00, 172.16.6.1/24 [110/11] via 172.16.2.2, 00:06:00, 172.16.1.0/24 is directly connected, Serial0 172.16.2.0/24 is directly connected, Ethernet1 172.16.3.0/24 is directly connected, Ethernet0 The default-information originate command is a specialized form of the redistribute command, causing a default route to be redistributed into OSPF or IS-IS. And like redistribute, the default-information originate command informs an OSPF router that it is an ASBR, or informs an IS-IS router that it is an interdomain router. Also like redistribute, the metric of the redistributed default can be specified, as can the OSPF external metric type and the IS-IS level. To redistribute the default route into the OSPF domain with a metric of 10 and an external metric type of E1, Athens's configuration will be as displayed in Example 12-18. Example 12-18. The default-information originate command is used to originate a default route at Athens. router ospf 1 network 172.16.0.0 0.0.255.255 area 0 default-information originate metric 10 metric-type 1 ! ip classless ip route 0.0.0.0 0.0.0.0 10.1.1.2 Example 12-19 shows that the default route is now being redistributed into OSPF. The route can also be observed in Sparta's OSPF database (Example 12-20). Ethernet Ethernet Ethernet EthernetExample 12-19. After default-information originate is configured at Athens, the default route is redistributed into the OSPF domain. Sparta#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route, o - ODR Gateway of last resort is 172.16.1.1 to network 0.0.0.0 172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks O 172.16.5.0/24 [110/74] via 172.16.2.2, 00:14:46, Etherne O 172.16.4.1/32 [110/75] via 172.16.2.2, 00:14:46, Etherne O 172.16.6.1/32 [110/11] via 172.16.2.2, 00:14:46, Etherne C 172.16.1.0/24 is directly connected, Serial0 C 172.16.2.0/24 is directly connected, Ethernet0 C 172.16.3.0/24 is directly connected, Ethernet1 O* E1 0.0.0.0/0 [110/74] via 172.16.1.1, 00:02:55, Serial0 Sparta# Example 12-20. Like other external routes advertised by an ASBR, the default route is advertised in a type 5 LSA. Sparta#show ip ospf database external OSPF Router with ID (172.16.3.1) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 422 Options: (No TOS-capability, No DC) LS Type: AS External LinkLink State ID: 0.0.0.0 (External Network Number ) Advertising Router: 172.16.1.1 LS Seq Number: 80000002 Checksum: 0x5238 Length: 36 Network Mask: /0 Metric Type: 1 (Comparable directly to link state metric TOS: 0 Metric: 10 Forward Address: 0.0.0.0 External Route Tag: 1 Sparta# The default-information originate command also will redistribute into OSPF or IS-IS a default route that has been discovered by another routing process. In the configuration in Example 12-21, the static route to 0.0.0.0 has been eliminated, and Athens is speaking BGP to a router in BigNet. Example 12-21. Athens is configured to learn routes via BGP rather then statically. router ospf 1 network 172.16.0.0 0.0.255.255 area 0 default-information originate metric 10 metric-type 1 ! router bgp 65501 network 172.16.0.0 neighbor 10.1.1.2 remote-as 65502 ! ip classlessAthens is now learning a route to 0.0.0.0 from its BGP neighbor and will advertise the route into the OSPF domain via type 5 LSAs (Example 12- 22). Example 12-22. A BGP-speaking neighbor in BigNet is advertising a default route to Athens. Athens#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte E1 - OSPF external type 1, E2 - OSPF external type 2, E i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c U - per-user static route Gateway of last resort is 10.1.1.2 to network 0.0.0.0 10.0.0.0/8 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Ethernet0 172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks O IA 172.16.4.1/32 [110/139] via 172.16.1.2, 00:16:45, Serial O IA 172.16.5.0/24 [110/138] via 172.16.1.2, 00:16:45, Serial O IA 172.16.6.1/32 [110/75] via 172.16.1.2, 00:16:45, Serial0 C 172.16.1.0/24 is directly connected, Serial0 O IA 172.16.2.0/24 [110/74] via 172.16.1.2, 00:16:45, Serial0 O IA 172.16.3.0/24 [110/74] via 172.16.1.2, 00:16:45, Serial0 B* 0.0.0.0/0 [20/0] via 10.1.1.2, 00:12:02 Athens# A benefit of a default route, or any summary route, is that it can add stability to a network. But what if the default route itself is unstable? For example, suppose that the default route advertised to Athens in Example 12-19 is flapping, that is, alternating frequently between reachable and unreachable. With each change, Athens must send a new type 5 LSA into the OSPF domain. This LSA will be advertised into all nonstub areas. Although this flooding and reflooding might have minimal impact on system resources, it still might be undesirable to the networkadministrator. A solution is to use the always keyword. [5] Example 12-23 shows how Athens is configured to always originate a default route, even if the default route is not currently present in Athens's route table. [5] This keyword is available only under OSPF. It is not supported under IS-IS. Example 12-23. Athens will always originate a default route, even if no default route is currently present in the route table. router ospf 1 network 172.16.0.0 0.0.255.255 area 0 default-information originate always metric 10 metric-type 1 ! router bgp 65501 network 172.16.0.0 neighbor 10.1.1.2 remote-as 65502 ! ip classless With this configuration, Athens will always advertise a default route into the OSPF domain, regardless of whether it actually has a route to 0.0.0.0. If a router within the OSPF domain defaults a packet to Athens and Athens has no default route, it will send an ICMP Destination Unreachable message to the source address and drop the packet. The always keyword can be used safely when there is only a single default route out of the OSPF domain. If more than one ASBR is advertising a default route, the defaults should be dynamicthat is, the loss of a default route should be advertised. If an ASBR claims to have a default when it doesn't, packets can be forwarded to it instead of to a legitimate ASBR. The default-information originate works similarly for IPv6. In Figure 12-5, IPv6 is being routed via IS-IS. Athens is configured to originate a default route for IPv6. Athens's configuration is shown in Example 12-24. Example 12-24. A default IPv6 route is originated by Athens for the IS-IS protocol. ipv6 unicast-routing interface Ethernet0 ip address 10.1.1.1 255.255.255.0 ipv6 address 2001:DB8:0:A1::1/64 ipv6 router isis ! interface Serial0 ip address 172.16.1.1 255.255.255.0 ip router isis ipv6 address 2001:DB8:0:1::1/64 ipv6 router isis ! router isis net 01.0000.00ef.5678.00 metric-style wide address-family ipv6 multi-topology default-information originate exit-address-family Athens does not require that the default route be learned from another source before entering the default route into its IS-IS database and advertising it to neighbors. All data destined to unknown IPv6 addresses is forwarded to Athens by the other routers. If Athens does not have a route to the destination in its route table, it will drop the packet. Example 12-25 shows the Argos IS-IS level-2 database entry for Athens. Example12-26 shows the Argos IPv6 route table. Example 12-25. IPv6 default routes are added to the level-2 IS-IS database. Argos#show isis database detail level-2 Athens.00-00 IS-IS Level-2 LSP Athens.00-00 LSPID LSP Seq Num LSP Checksum LSP Holdtime Athens.00-00 0x00000088 0xBD29 956 Area Address: 01 Topology: IPv4 (0x0) IPv6 (0x2) NLPID: 0xCC 0x8E Hostname: Athens IP Address: 172.16.1.1 IPv6 Address: 2001:DB8:0:A1::1 Metric: 10 IS-Extended Athens.01 Metric: 10 IS (MT-IPv6) Athens.01 Metric: 10 IP 172.16.1.0/24 Metric: 0 IPv6 (MT-IPv6) ::/0 Metric: 10 IPv6 (MT-IPv6) 2001:DB8:0:1::/64 Metric: 20 IPv6 (MT-IPv6) 2001:DB8:0:2::/64 Metric: 20 IPv6 (MT-IPv6) 2001:DB8:0:3::/64 Metric: 30 IPv6 (MT-IPv6) 2001:DB8:0:4::/64 Metric: 30 IPv6 (MT-IPv6) 2001:DB8:0:5::/64 Metric: 30 IPv6 (MT-IPv6) 2001:DB8:0:6::/64 Metric: 30 IPv6 (MT-IPv6) 2001:DB8:0:20::/64 Metric: 10 IPv6 (MT-IPv6) 2001:DB8:0:A1::/64 Argos# Example 12-26. IPv6 default routes are added to the IPv6 route table as IS-IS level-2.Argos#show ipv6 route IPv6 Routing Table - 14 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - IS O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 I2 ::/0 [115/20] via FE80::204:C1FF:FE50:E700, FastEthernet0/1 I1 2001:DB8:0:1::/64 [115/20] via FE80::204:C1FF:FE50:E700, FastEthernet0/1 C 2001:DB8:0:2::/64 [0/0] via ::, FastEthernet0/1 L 2001:DB8:0:2::2/128 [0/0] via ::, FastEthernet0/1 I1 2001:DB8:0:3::/64 [115/20] via FE80::204:C1FF:FE50:E700, FastEthernet0/1 via FE80::204:C1FF:FE50:F1C0, Serial0/0.2 I1 2001:DB8:0:4::/64 [115/20] via FE80::204:C1FF:FE50:F1C0, Serial0/0.2 C 2001:DB8:0:5::/64 [0/0] via ::, Serial0/0.2 L 2001:DB8:0:5::1/128 [0/0] via ::, Serial0/0.2 C 2001:DB8:0:6::/64 [0/0] via ::, FastEthernet0/0 L 2001:DB8:0:6::1/128 [0/0] via ::, FastEthernet0/0 I1 2001:DB8:0:20::/64 [115/20] via FE80::204:C1FF:FE50:F1C0, Serial0/0.2 I1 L L 2001:DB8:0:A1::/64 [115/30] via FE80::204:C1FF:FE50:E700, FastEthernet0/1 FE80::/10 [0/0] via ::, Null0 FF00::/8 [0/0] via ::, Null0Argos# Case Study: Configuring On-Demand Routing ODR is enabled with a single command, router odr. No networks or other parameters must be specified. CDP is enabled by default; it needs to be enabled only if it has been turned off for some reason. The command to enable the CDP process on a router is cdp run; to enable CDP on a specific interface, the command is cdp enable. Figure 12-6 shows a typical hub-and-spoke topology. To configure ODR, the hub router will have the router odr command. If all routers are running IOS 11.2 or later and the connecting medium supports SNAP (such as the Frame Relay or PVCs shown), ODR is operational and the hub will learn the stub networks. The only configuration necessary at the stub routers is a static default route to the hub. Figure 12-6. Hub-and-spoke topologies such as this one are common across Frame Relay networks.ODR can also be redistributed. If Baghdad in Figure 12-6 needs to advertise the ODR-discovered routes into OSPF, Baghdad's configuration might be as displayed in Example 12-27. Example 12-27. ODR discovered routes can be redistributed into other IP routing protocols. router odr ! router ospf 1 redistribute odr metric 100 network 172.16.0.0 0.0.255.255 area 5



Pranala Menarik