https://onnocenter.or.id/wiki/index.php?title=IPv6:_Route_Control_-_Default_Route_dan_ODR_Konfigurasi&feed=atom&action=historyIPv6: Route Control - Default Route dan ODR Konfigurasi - Revision history2024-03-29T00:19:30ZRevision history for this page on the wikiMediaWiki 1.35.4https://onnocenter.or.id/wiki/index.php?title=IPv6:_Route_Control_-_Default_Route_dan_ODR_Konfigurasi&diff=55850&oldid=prevOnnowpurbo: Created page with "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..."2019-03-18T02:50:16Z<p>Created page with "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..."</p>
<p><b>New page</b></p><div>Configuring Default Routes and ODR<br />
Default routes can be configured either on each router that needs a<br />
default route or on one router that in turn advertises the routes to its<br />
peers. The case studies of this section examine both methods.<br />
Recall from the discussion of classful route lookups in Chapter 5,<br />
"Routing Information Protocol (RIP)," that a router first matches a major<br />
network number and then matches the subnet. If a subnet cannot be<br />
matched, the packet will be dropped. Classless route lookup is the<br />
default behavior on Cisco routers as of IOS 11.3 and later; for earlier IOS<br />
versions, lookups can be changed to classless (even for classful routing<br />
protocols) with the global command ip classless.<br />
Any router using a default route must perform classless route lookups.<br />
Figure 12-3 shows why. In this network, Memphis is speaking a dynamic<br />
routing protocol to Tanis and Giza, but is not receiving routes from<br />
Thebes. Memphis has a default route pointing to Thebes for routing<br />
packets to BigNet. If Memphis receives a packet with a destination<br />
address of 192.168.1.50 and is performing classful route lookups, it will<br />
first match major network 192.168.1.0, of which it has several subnets in<br />
its route table. Memphis will then attempt to find a route for subnet<br />
192.168.1.48/28, but because Memphis is not receiving routes from<br />
Thebes, this subnet is not in its route table. The packet will be dropped.<br />
Figure 12-3. Memphis forwards packets to Thebes with a<br />
default route. If Memphis uses classful route lookups,<br />
subnet 192.168.1.48/28 will be unreachable.If Memphis is configured with ip classless, it will try to find the most<br />
specific match for 192.168.1.48/28 without matching the major network<br />
first. Finding no match for this subnet in the route table, it will match the<br />
default route and forward the packet to Thebes.<br />
Case Study: Static Default Routes<br />
The configuration of Memphis in Figure 12-3 is displayed in Example 12-<br />
3.<br />
Example 12-3. Configuration of Router Memphis uses<br />
static IPv4 and IPv6 routes to create default routes.<br />
interface serial 0/0.1<br />
ip address 192.168.1.33 255.255.255.240<br />
ipv6 address 2001:db8:0:20::1/64<br />
ipv6 rip egypt enable<br />
!interface serial 0/0.2<br />
ip address 192.168.1.81 255.255.255.240<br />
ipv6 address 2001:db8:0:50::1/64<br />
ipv6 rip egypt enable<br />
!<br />
interface serial 0/0.3<br />
ip address 192.168.1.17 255.255.255.240<br />
ipv6 address 2001:db8:0:10::1/64<br />
ipv6 rip egypt enable<br />
!<br />
router rip<br />
network 192.168.1.0<br />
!<br />
ip classless<br />
ip route 0.0.0.0 0.0.0.0 192.168.1.82<br />
ipv6 route ::/0 2001:DB8:0:50::2<br />
The static routes configure the default route addresses of 0.0.0.0 and ::/0<br />
and use a mask that is also 0.0.0.0 (prefix length 0 for IPv6). A common<br />
mistake made by people configuring default routes for the first time is to<br />
use an all-ones mask instead of an all-zeros mask, such as the following:<br />
ip route 0.0.0.0 255.255.255.255 192.168.1.82<br />
An all-ones mask would configure a host route to 0.0.0.0, and the only<br />
packets that would match this address would be those with a destination<br />
address of 0.0.0.0. The all-zeros mask, on the other hand, is a mask<br />
made up entirely of "don't care" bits and will match any bit in any position.<br />
The beginning of this chapter described the default address as a<br />
summary route taken to its extreme so that every bit is summarized with<br />
a zero. The mask of the default route is a summary mask taken to its<br />
extreme.Memphis' default route has a next-hop address at Thebes. This next-hop<br />
address is the gateway of last resort, or the default router. Example 12-4<br />
shows the IPv4 route table at Memphis. The route to 0.0.0.0 is tagged as<br />
a candidate default, and the gateway of last resort is indicated at the top<br />
of the table. Example 12-5 shows the IPv6 route table.<br />
Example 12-4. Memphis' IPv4 route table, showing the<br />
default route and the gateway of last resort.<br />
Memphis#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route, o - ODR<br />
Gateway of last resort is 192.168.1.82 to network 0.0.0.0<br />
192.168.1.0/28 is subnetted, 7 subnets<br />
R<br />
192.168.1.96 [120/1] via 192.168.1.18, 00:00:15, Etherne<br />
R<br />
192.168.1.64 [120/1] via 192.168.1.34, 00:00:27, Etherne<br />
C<br />
192.168.1.80 is directly connected, Serial0<br />
C<br />
192.168.1.32 is directly connected, Ethernet1<br />
C<br />
192.168.1.16 is directly connected, Ethernet0<br />
R<br />
192.168.1.128 [120/1] via 192.168.1.34, 00:00:27, Ethern<br />
R<br />
192.168.1.144 [120/1] via 192.168.1.18, 00:00:15, Ethern<br />
S* 0.0.0.0/0 [1/0] via 192.168.1.82<br />
Memphis#<br />
Example 12-5. Memphis' IPv6 route table shows the static<br />
entry for the default address ::/0.<br />
Memphis#show ipv6 routeIPv6 Routing Table - 11 entries<br />
Codes: C - Connected, L - Local, S - Static, R - RIP, B BGP<br />
U - Per-user Static route<br />
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - IS<br />
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 -<br />
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2<br />
S<br />
::/0 [1/0]<br />
via 2001:DB8:0:50::2<br />
C<br />
L<br />
C<br />
L<br />
R<br />
C<br />
L<br />
2001:DB8:0:10::/64 [0/0]<br />
via ::, Serial0/0.3<br />
2001:DB8:0:10::1/128 [0/0]<br />
via ::, Serial0/0.3<br />
2001:DB8:0:20::/64 [0/0]<br />
via ::, Serial0/0.1<br />
2001:DB8:0:20::1/128 [0/0]<br />
via ::, Serial0/0.1<br />
2001:DB8:0:40::/64 [120/2]<br />
via FE80::204:C1FF:FE50:F1C0, Serial0/0.1<br />
2001:DB8:0:50::/64 [0/0]<br />
via ::, Serial0/0.2<br />
2001:DB8:0:50::1/128 [0/0]<br />
via ::, Serial0/0.2<br />
R<br />
2001:DB8:0:90::/64 [120/2]<br />
via FE80::205:5EFF:FE6B:50A0, Serial0/0.3<br />
L<br />
FE80::/10 [0/0]<br />
via ::, Null0<br />
L<br />
FF00::/8 [0/0]<br />
via ::, Null0<br />
Memphis#<br />
The default route now needs to be advertised to the rest of the RIP<br />
routers. This is done by redistributing the static route into RIP. Memphis<br />
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<br />
redistribution command is added for both IPv4 and IPv6 on the Memphis<br />
router.<br />
[4]<br />
Before IOS train 12.0T, if a default route was known in the route table, RIP, IGRP, and<br />
EIGRP would automatically advertise it to neighbors, without the need to redistribute the<br />
static route into the routing protocol.<br />
Example 12-6. Redistribution commands have been added<br />
to Memphis to enable the static default routes to be<br />
advertised by RIP.<br />
router rip<br />
redistribute static<br />
!<br />
ipv6 router rip egypt<br />
redistribute static<br />
OSPF and IS-IS do not use the redistribute command to advertise a<br />
default route but can still originate default routes, as shown in a<br />
subsequent case study. Example 12-7 and Example 12-8 show the IPv4<br />
and IPv6 route tables of Tanis after the static default routes are<br />
redistributed into RIP.<br />
Example 12-7. The IPv4 route table of Tanis shows that the<br />
default route has been learned from Memphis via RIP.<br />
Tanis#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, Ei - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route, o - ODR<br />
Gateway of last resort is 192.168.1.17 to network 0.0.0.0<br />
192.168.1.0/28 is subnetted, 9 subnets<br />
C<br />
192.168.1.96 is directly connected, Ethernet1<br />
R<br />
192.168.1.64 [120/2] via 192.168.1.17, 00:00:01, Ethern<br />
R<br />
192.168.1.80 [120/1] via 192.168.1.17, 00:00:01, Ethern<br />
R<br />
192.168.1.32 [120/1] via 192.168.1.17, 00:00:01, Ethern<br />
R<br />
192.168.1.48 [120/2] via 192.168.1.17, 00:00:01, Ethern<br />
C<br />
192.168.1.16 is directly connected, Ethernet0<br />
R<br />
192.168.1.224 [120/1] via 192.168.1.17, 00:00:01, Ether<br />
R<br />
192.168.1.128 [120/2] via 192.168.1.17, 00:00:01, Ether<br />
C<br />
192.168.1.144 is directly connected, Ethernet2<br />
R*<br />
0.0.0.0/0 [120/1] via 192.168.1.17, 00:00:02, Ethernet0<br />
Tanis#<br />
Example 12-8. The IPv6 route table of Tanis shows that the<br />
default route has been learned from Memphis via IPv6 RIP.<br />
Tanis#show ipv6 route<br />
IPv6 Routing Table - 10 entries<br />
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP<br />
U - Per-user Static route<br />
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - IS<br />
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 -via FE80::204:C1FF:FE50:E700, Serial0/0.1<br />
R<br />
2001:DB8:0:40::/64 [120/3]<br />
via FE80::204:C1FF:FE50:E700, Serial0/0.1<br />
R<br />
2001:DB8:0:50::/64 [120/2]<br />
via FE80::204:C1FF:FE50:E700, Serial0/0.1<br />
C<br />
2001:DB8:0:90::/64 [0/0]<br />
via ::, FastEthernet0/0<br />
L<br />
2001:DB8:0:90::1/128 [0/0]<br />
via ::, FastEthernet0/0<br />
L<br />
FE80::/10 [0/0]<br />
via ::, Null0<br />
L<br />
FF00::/8 [0/0]<br />
via ::, Null0<br />
Tanis#<br />
Default routes are also useful for connecting classless routing domains.<br />
In Figure 12-4, Chimu is connecting a RIP domain with an EIGRP<br />
domain. Although the masks of major network 192.168.25.0 are<br />
consistent in the RIP domain, they are variably subnetted in the EIGRP<br />
domain. Further, the VLSM scheme does not lend itself to summarization<br />
into RIP.<br />
Figure 12-4. A default route enables RIP to route into the<br />
variably subnetted EIGRP domain.Chimu's configuration is displayed in Example 12-9.<br />
Example 12-9. RIP routes are redistributed into EIGRP by<br />
Chimu, but a default route, rather than all the EIGRP<br />
routes, is advertised into the RIP domain.<br />
router eigrp 1<br />
redistribute rip metric 1000 100 255 1 1500<br />
passive-interface Ethernet0<br />
passive-interface Ethernet1<br />
network 192.168.25.0<br />
!<br />
router rip<br />
passive-interface Serial0<br />
network 192.168.25.0<br />
redistribute static<br />
!<br />
ip classless<br />
ip route 0.0.0.0 0.0.0.0 Null0Chimu has a full set of routes from the EIGRP domain but is not<br />
redistributing them into RIP. Instead, Chimu is advertising a default route.<br />
The RIP routers will forward packets with unknown destinations to<br />
Chimu, which can then consult its route table for a more-specific route<br />
into the EIGRP domain.<br />
Chimu's static route is pointing to the null interface rather than a next-hop<br />
address. If a packet is forwarded to Chimu with a destination on a<br />
nonexistent subnet, such as 192.168.25.224/28, the packet will be<br />
dropped instead of being forwarded into the EIGRP domain.<br />
Case Study: The Default-Network Command<br />
An alternative method of configuring default routes is to use the<br />
command ip default-network. This command specifies a network<br />
address to be used as a default network. The network might be directly<br />
connected to the router, specified by a static route, or discovered by a<br />
dynamic routing protocol. The command was first introduced for use with<br />
IGRP, which doesn't identify 0.0.0.0 as a default route, so an existing<br />
network was flagged as the default instead. Only IGRP, EIGRP, and RIP<br />
use this command.<br />
The ip default-network command is a global command and causes any<br />
routing protocol that is configured on the router that supports the<br />
command to advertise a default route. The default route will be the<br />
network specified as an argument to the command if IGRP or EIGRP is<br />
used, and it will be 0.0.0.0 with RIP.<br />
The ip default-network command is used with RIP in the configuration<br />
of Athens in Figure 12-5. Athens configuration is displayed in Example<br />
12-10.<br />
Figure 12-5. The default-network command is used atAthens to generate a default network advertisement.<br />
[View full size image]<br />
Example 12-10. The default-network command can be used<br />
by RIP to create a default route.<br />
router rip<br />
network 172.16.0.0<br />
!<br />
ip classless<br />
ip default-network 10.0.0.0<br />
Example 12-11 shows that network 10.0.0.0 has been tagged as a<br />
candidate default route in the Athens route table, but notice that no<br />
gateway of last resort is specified. The reason is that Athens is the<br />
gateway to the default network. The ip default-network command will<br />
cause Athens to advertise a default network, even though no network<br />
statement for 10.0.0.0 exists under the RIP configuration (Example 12-<br />
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<br />
network specified by the ip default-network command.<br />
Example 12-11. Network 10.0.0.0 is tagged as a candidate<br />
default in Athens' route table.<br />
Athens#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route<br />
Gateway of last resort is not set<br />
* 10.0.0.0/8 is subnetted, 1 subnets<br />
C 10.1.1.0 is directly connected, Ethernet0<br />
172.16.0.0/16 is subnetted, 6 subnets<br />
R 172.16.4.0 [120/2] via 172.16.1.2, 00:00:12, Serial0<br />
R 172.16.5.0 [120/2] via 172.16.1.2, 00:00:12, Serial0<br />
R 172.16.6.0 [120/2] via 172.16.1.2, 00:00:12, Serial0<br />
C 172.16.1.0 is directly connected, Serial0<br />
R 172.16.2.0 [120/1] via 172.16.1.2, 00:00:12, Serial0<br />
R 172.16.3.0 [120/1] via 172.16.1.2, 00:00:12, Serial0<br />
Athens#<br />
Example 12-12. Sparta's route table shows that Athens is<br />
advertising a default route of 0.0.0.0 and that Athens is<br />
Sparta's gateway of last resort.<br />
Sparta#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA externalE1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route, o - ODR<br />
Gateway of last resort is 172.16.1.1 to network 0.0.0.0<br />
172.16.0.0/24 is subnetted, 6 subnets<br />
R<br />
172.16.4.0 [120/1] via 172.16.3.2, 00:00:14, Ethernet1<br />
R<br />
172.16.5.0 [120/1] via 172.16.3.2, 00:00:14, Ethernet1<br />
R<br />
172.16.6.0 [120/1] via 172.16.2.2, 00:00:10, Ethernet0<br />
C<br />
172.16.1.0 is directly connected, Serial0<br />
C<br />
172.16.2.0 is directly connected, Ethernet0<br />
C<br />
172.16.3.0 is directly connected, Ethernet1<br />
R* 0.0.0.0/0 [120/1] via 172.16.1.1, 00:00:17, Serial0<br />
Sparta#<br />
As with RIP, EIGRP will advertise a default route to neighbors if the static<br />
route to 0.0.0.0 is configured, and EIGRP redistributes static routes.<br />
EIGRP advertises the redistributed route as an external route See<br />
Chapter 7, "Enhanced Interior Gateway Routing Protocol (EIGRP)."<br />
If the routers in Figure 12-5 are configured to run EIGRP using the ip<br />
default-network command, Athens' configuration will be as displayed in<br />
Example 12-13.<br />
Example 12-13. The default-network command can be used<br />
with EIGRP to flag a network as a candidate default route.<br />
router eigrp 1<br />
network 10.0.0.0<br />
network 172.16.0.0<br />
!<br />
ip classless<br />
ip default-network 10.0.0.0The ip default-network command remains the same as with RIP, but<br />
notice that a network statement for 10.0.0.0 is added to the EIGRP<br />
configuration. Since EIGRP sends the actual network address as the<br />
default network, that address must be configured to be advertised, as<br />
shown in Example 12-14. Compare the route table in Example 12-12 with<br />
the table in Example 12-14. RIP flags the route to 0.0.0.0/0 as the<br />
default, while EIGRP flags the route to 10.0.0.0/8 as the default network.<br />
Because Corinth has learned about the default route from Sparta, that<br />
router is Corinth's gateway of last resort. If the link to Sparta fails, Corinth<br />
will use Argos as its gateway of last resort.<br />
Example 12-14. EIGRP uses an actual network address,<br />
rather than 0.0.0.0, as the default network. Corinth's route<br />
table shows that network 10.0.0.0 is tagged as the default<br />
network.<br />
Corinth#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route<br />
Gateway of last resort is 172.16.3.1 to network 10.0.0.0<br />
D*<br />
10.0.0.0/8 [90/2195456] via 172.16.3.1, 00:02:32, Ether<br />
172.16.0.0/16 is subnetted, 6 subnets<br />
C<br />
172.16.4.0 is directly connected, Ethernet1<br />
C<br />
172.16.5.0 is directly connected, Serial0<br />
D<br />
D<br />
D<br />
C<br />
172.16.1.0 [90/1811456] via 172.16.3.1, 00:00:17, Ether<br />
172.16.6.0 [90/921600] via 172.16.3.1, 00:00:16, Ethern<br />
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<br />
command is a global command. It is not associated with a particular<br />
routing protocol. Any routing protocol that is configured on the router that<br />
can use the ip default-network command will use it. If both RIP and<br />
EIGRP are configured on the router, both protocols will advertise a<br />
default route, as shown in Corinth's route table in Example 12-15.<br />
Example 12-15. Corinth's route table shows two candidate<br />
default routes when Athens is configured with both RIP<br />
and EIGRP and using the ip default-network command.<br />
Corinth#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route<br />
Gateway of last resort is 172.16.3.1 to network 10.0.0.0<br />
D*<br />
10.0.0.0/8 [90/2195456] via 172.16.3.1, 00:02:32, Ether<br />
172.16.0.0/16 is subnetted, 6 subnets<br />
C<br />
172.16.4.0 is directly connected, Ethernet1<br />
C<br />
172.16.5.0 is directly connected, Serial0<br />
D<br />
172.16.1.0 [90/1811456] via 172.16.3.1, 00:00:17, Ether<br />
D<br />
172.16.6.0 [90/921600] via 172.16.3.1, 00:00:16, Ethern<br />
D<br />
172.16.2.0 [90/793600] via 172.16.3.1, 00:00:16, Ethern<br />
C<br />
172.16.3.0 is directly connected, Ethernet0<br />
R* 0.0.0.0/0 [120/1] via 172.16.3.1, 00:00:17, Serial0<br />
The EIGRP-discovered default network becomes the gateway of last<br />
resort because EIGRP has a lower administrative distance.<br />
There is an inherent lack of control in this method of advertising a default<br />
network. If multiple routing protocols are configured on the router, suchas RIP and EIGRP, and the ip default-network command is used, there<br />
is no way to control or limit which routing protocol advertises the default<br />
network. If Athens, in Figure 12-5, is running EIGRP for BigNet, and RIP<br />
for the rest of the network, and the ip default-network command is<br />
configured with the intent of advertising a default route into RIP, Athens<br />
will also advertise a default into EIGRP. This will disrupt routing not only<br />
for traffic originating in the RIP network and attempting to route to BigNet,<br />
but also for traffic within BigNet.<br />
When injecting routes into a routing protocol, it is always best to choose<br />
the method that offers the most control to minimize unintended route<br />
propagation.<br />
Case Study: The Default-Information Originate<br />
Command<br />
An OSPF ASBR and an IS-IS interdomain router will not automatically<br />
advertise a default route into their routing domains, even when one<br />
exists. For example, suppose Athens in Figure 12-5 is configured for<br />
OSPF and given a static default route into BigNet. Example 12-16 shows<br />
Athens's configuration.<br />
Example 12-16. Athens now routes with OSPF and has a<br />
static default route.<br />
router ospf 1<br />
network 172.16.0.0 0.0.255.255 area 0<br />
!<br />
ip classless<br />
ip route 0.0.0.0 0.0.0.0 10.1.1.2<br />
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,<br />
Sparta has no knowledge of the default route. The default route must be<br />
advertised into the OSPF domain in type 5 LSAs, which means that<br />
Athens must be an ASBR. Yet so far, nothing in Athens' configuration<br />
tells it to perform this function.<br />
Example 12-17. The OSPF process at Athens does not<br />
automatically advertise the default route into the OSPF<br />
domain.<br />
Athens#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
Gateway of last resort is 10.1.1.2 to network 0.0.0.0<br />
10.0.0.0 255.255.255.0 is subnetted, 1 subnets<br />
C<br />
10.1.1.0 is directly connected, Ethernet0<br />
172.16.0.0 is variably subnetted, 6 subnets, 2 masks<br />
O<br />
172.16.5.0 255.255.255.0 [110/138] via 172.16.1.2, 00:04:1<br />
O<br />
172.16.4.1 255.255.255.0 [110/75] via 172.16.1.2, 00:04:17<br />
O<br />
172.16.6.1 255.255.255.0 [110/75] via 172.16.1.2, 00:04:17<br />
C<br />
172.16.1.0 255.255.255.0 is directly connected, Serial0<br />
O<br />
172.16.2.0 255.255.255.0 [110/74] via 172.16.1.2, 00:04:17<br />
O<br />
172.16.3.0 255.255.255.0 [110/74] via 172.16.1.2, 00:04:17<br />
S* 0.0.0.0 0.0.0.0 [1/0] via 10.1.1.2<br />
Sparta#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route, o - ODR<br />
Gateway of last resort is not set<br />
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masksO<br />
O<br />
O<br />
C<br />
C<br />
C<br />
172.16.5.0/24 [110/74] via 172.16.2.2, 00:06:00,<br />
[110/74] via 172.16.3.2, 00:06:00,<br />
172.16.4.1/24 [110/11] via 172.16.3.2, 00:06:00,<br />
172.16.6.1/24 [110/11] via 172.16.2.2, 00:06:00,<br />
172.16.1.0/24 is directly connected, Serial0<br />
172.16.2.0/24 is directly connected, Ethernet1<br />
172.16.3.0/24 is directly connected, Ethernet0<br />
The default-information originate command is a specialized form of the<br />
redistribute command, causing a default route to be redistributed into<br />
OSPF or IS-IS. And like redistribute, the default-information originate<br />
command informs an OSPF router that it is an ASBR, or informs an IS-IS<br />
router that it is an interdomain router. Also like redistribute, the metric of<br />
the redistributed default can be specified, as can the OSPF external<br />
metric type and the IS-IS level. To redistribute the default route into the<br />
OSPF domain with a metric of 10 and an external metric type of E1,<br />
Athens's configuration will be as displayed in Example 12-18.<br />
Example 12-18. The default-information originate command<br />
is used to originate a default route at Athens.<br />
router ospf 1<br />
network 172.16.0.0 0.0.255.255 area 0<br />
default-information originate metric 10 metric-type 1<br />
!<br />
ip classless<br />
ip route 0.0.0.0 0.0.0.0 10.1.1.2<br />
Example 12-19 shows that the default route is now being redistributed<br />
into OSPF. The route can also be observed in Sparta's OSPF database<br />
(Example 12-20).<br />
Ethernet<br />
Ethernet<br />
Ethernet<br />
EthernetExample 12-19. After default-information originate is<br />
configured at Athens, the default route is redistributed into<br />
the OSPF domain.<br />
Sparta#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route, o - ODR<br />
Gateway of last resort is 172.16.1.1 to network 0.0.0.0<br />
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks<br />
O<br />
172.16.5.0/24 [110/74] via 172.16.2.2, 00:14:46, Etherne<br />
O<br />
172.16.4.1/32 [110/75] via 172.16.2.2, 00:14:46, Etherne<br />
O<br />
172.16.6.1/32 [110/11] via 172.16.2.2, 00:14:46, Etherne<br />
C<br />
172.16.1.0/24 is directly connected, Serial0<br />
C<br />
172.16.2.0/24 is directly connected, Ethernet0<br />
C<br />
172.16.3.0/24 is directly connected, Ethernet1<br />
O* E1 0.0.0.0/0 [110/74] via 172.16.1.1, 00:02:55, Serial0<br />
Sparta#<br />
Example 12-20. Like other external routes advertised by an<br />
ASBR, the default route is advertised in a type 5 LSA.<br />
Sparta#show ip ospf database external<br />
OSPF Router with ID (172.16.3.1) (Process ID 1)<br />
Type-5 AS External Link States<br />
Routing Bit Set on this LSA<br />
LS age: 422<br />
Options: (No TOS-capability, No DC)<br />
LS Type: AS External LinkLink State ID: 0.0.0.0 (External Network Number )<br />
Advertising Router: 172.16.1.1<br />
LS Seq Number: 80000002<br />
Checksum: 0x5238<br />
Length: 36<br />
Network Mask: /0<br />
Metric Type: 1 (Comparable directly to link state metric<br />
TOS: 0<br />
Metric: 10<br />
Forward Address: 0.0.0.0<br />
External Route Tag: 1<br />
Sparta#<br />
The default-information originate command also will redistribute into<br />
OSPF or IS-IS a default route that has been discovered by another<br />
routing process. In the configuration in Example 12-21, the static route to<br />
0.0.0.0 has been eliminated, and Athens is speaking BGP to a router in<br />
BigNet.<br />
Example 12-21. Athens is configured to learn routes via<br />
BGP rather then statically.<br />
router ospf 1<br />
network 172.16.0.0 0.0.255.255 area 0<br />
default-information originate metric 10 metric-type 1<br />
!<br />
router bgp 65501<br />
network 172.16.0.0<br />
neighbor 10.1.1.2 remote-as 65502<br />
!<br />
ip classlessAthens is now learning a route to 0.0.0.0 from its BGP neighbor and will<br />
advertise the route into the OSPF domain via type 5 LSAs (Example 12-<br />
22).<br />
Example 12-22. A BGP-speaking neighbor in BigNet is<br />
advertising a default route to Athens.<br />
Athens#show ip route<br />
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inte<br />
E1 - OSPF external type 1, E2 - OSPF external type 2, E<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - c<br />
U - per-user static route<br />
Gateway of last resort is 10.1.1.2 to network 0.0.0.0<br />
10.0.0.0/8 is subnetted, 1 subnets<br />
C<br />
10.1.1.0 is directly connected, Ethernet0<br />
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks<br />
O IA<br />
172.16.4.1/32 [110/139] via 172.16.1.2, 00:16:45, Serial<br />
O IA<br />
172.16.5.0/24 [110/138] via 172.16.1.2, 00:16:45, Serial<br />
O IA<br />
172.16.6.1/32 [110/75] via 172.16.1.2, 00:16:45, Serial0<br />
C<br />
172.16.1.0/24 is directly connected, Serial0<br />
O IA<br />
172.16.2.0/24 [110/74] via 172.16.1.2, 00:16:45, Serial0<br />
O IA<br />
172.16.3.0/24 [110/74] via 172.16.1.2, 00:16:45, Serial0<br />
B* 0.0.0.0/0 [20/0] via 10.1.1.2, 00:12:02<br />
Athens#<br />
A benefit of a default route, or any summary route, is that it can add<br />
stability to a network. But what if the default route itself is unstable? For<br />
example, suppose that the default route advertised to Athens in Example<br />
12-19 is flapping, that is, alternating frequently between reachable and<br />
unreachable. With each change, Athens must send a new type 5 LSA<br />
into the OSPF domain. This LSA will be advertised into all nonstub areas.<br />
Although this flooding and reflooding might have minimal impact on<br />
system resources, it still might be undesirable to the networkadministrator. A solution is to use the always keyword. [5] Example 12-23<br />
shows how Athens is configured to always originate a default route, even<br />
if the default route is not currently present in Athens's route table.<br />
[5]<br />
This keyword is available only under OSPF. It is not supported under IS-IS.<br />
Example 12-23. Athens will always originate a default route,<br />
even if no default route is currently present in the route<br />
table.<br />
router ospf 1<br />
network 172.16.0.0 0.0.255.255 area 0<br />
default-information originate always metric 10 metric-type 1<br />
!<br />
router bgp 65501<br />
network 172.16.0.0<br />
neighbor 10.1.1.2 remote-as 65502<br />
!<br />
ip classless<br />
With this configuration, Athens will always advertise a default route into<br />
the OSPF domain, regardless of whether it actually has a route to<br />
0.0.0.0. If a router within the OSPF domain defaults a packet to Athens<br />
and Athens has no default route, it will send an ICMP Destination<br />
Unreachable message to the source address and drop the packet.<br />
The always keyword can be used safely when there is only a single<br />
default route out of the OSPF domain. If more than one ASBR is<br />
advertising a default route, the defaults should be dynamicthat is, the loss<br />
of a default route should be advertised. If an ASBR claims to have a<br />
default when it doesn't, packets can be forwarded to it instead of to a<br />
legitimate ASBR.<br />
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<br />
default route for IPv6.<br />
Athens's configuration is shown in Example 12-24.<br />
Example 12-24. A default IPv6 route is originated by Athens<br />
for the IS-IS protocol.<br />
ipv6 unicast-routing<br />
interface Ethernet0<br />
ip address 10.1.1.1 255.255.255.0<br />
ipv6 address 2001:DB8:0:A1::1/64<br />
ipv6 router isis<br />
!<br />
interface Serial0<br />
ip address 172.16.1.1 255.255.255.0<br />
ip router isis<br />
ipv6 address 2001:DB8:0:1::1/64<br />
ipv6 router isis<br />
!<br />
router isis<br />
net 01.0000.00ef.5678.00<br />
metric-style wide<br />
address-family ipv6<br />
multi-topology<br />
default-information originate<br />
exit-address-family<br />
Athens does not require that the default route be learned from another<br />
source before entering the default route into its IS-IS database and<br />
advertising it to neighbors. All data destined to unknown IPv6 addresses<br />
is forwarded to Athens by the other routers. If Athens does not have a<br />
route to the destination in its route table, it will drop the packet. Example<br />
12-25 shows the Argos IS-IS level-2 database entry for Athens. Example12-26 shows the Argos IPv6 route table.<br />
Example 12-25. IPv6 default routes are added to the level-2<br />
IS-IS database.<br />
Argos#show isis database detail level-2 Athens.00-00<br />
IS-IS Level-2 LSP Athens.00-00<br />
LSPID<br />
LSP Seq Num LSP Checksum LSP Holdtime<br />
Athens.00-00<br />
0x00000088<br />
0xBD29<br />
956<br />
Area Address: 01<br />
Topology:<br />
IPv4 (0x0) IPv6 (0x2)<br />
NLPID:<br />
0xCC 0x8E<br />
Hostname: Athens<br />
IP Address:<br />
172.16.1.1<br />
IPv6 Address: 2001:DB8:0:A1::1<br />
Metric: 10<br />
IS-Extended Athens.01<br />
Metric: 10<br />
IS (MT-IPv6) Athens.01<br />
Metric: 10<br />
IP 172.16.1.0/24<br />
Metric: 0<br />
IPv6 (MT-IPv6) ::/0<br />
Metric: 10<br />
IPv6 (MT-IPv6) 2001:DB8:0:1::/64<br />
Metric: 20<br />
IPv6 (MT-IPv6) 2001:DB8:0:2::/64<br />
Metric: 20<br />
IPv6 (MT-IPv6) 2001:DB8:0:3::/64<br />
Metric: 30<br />
IPv6 (MT-IPv6) 2001:DB8:0:4::/64<br />
Metric: 30<br />
IPv6 (MT-IPv6) 2001:DB8:0:5::/64<br />
Metric: 30<br />
IPv6 (MT-IPv6) 2001:DB8:0:6::/64<br />
Metric: 30<br />
IPv6 (MT-IPv6) 2001:DB8:0:20::/64<br />
Metric: 10<br />
IPv6 (MT-IPv6) 2001:DB8:0:A1::/64<br />
Argos#<br />
Example 12-26. IPv6 default routes are added to the IPv6<br />
route table as IS-IS level-2.Argos#show ipv6 route<br />
IPv6 Routing Table - 14 entries<br />
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP<br />
U - Per-user Static route<br />
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - IS<br />
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 -<br />
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2<br />
I2 ::/0 [115/20]<br />
via FE80::204:C1FF:FE50:E700, FastEthernet0/1<br />
I1 2001:DB8:0:1::/64 [115/20]<br />
via FE80::204:C1FF:FE50:E700, FastEthernet0/1<br />
C<br />
2001:DB8:0:2::/64 [0/0]<br />
via ::, FastEthernet0/1<br />
L<br />
2001:DB8:0:2::2/128 [0/0]<br />
via ::, FastEthernet0/1<br />
I1 2001:DB8:0:3::/64 [115/20]<br />
via FE80::204:C1FF:FE50:E700, FastEthernet0/1<br />
via FE80::204:C1FF:FE50:F1C0, Serial0/0.2<br />
I1 2001:DB8:0:4::/64 [115/20]<br />
via FE80::204:C1FF:FE50:F1C0, Serial0/0.2<br />
C<br />
2001:DB8:0:5::/64 [0/0]<br />
via ::, Serial0/0.2<br />
L<br />
2001:DB8:0:5::1/128 [0/0]<br />
via ::, Serial0/0.2<br />
C<br />
2001:DB8:0:6::/64 [0/0]<br />
via ::, FastEthernet0/0<br />
L<br />
2001:DB8:0:6::1/128 [0/0]<br />
via ::, FastEthernet0/0<br />
I1 2001:DB8:0:20::/64 [115/20]<br />
via FE80::204:C1FF:FE50:F1C0, Serial0/0.2<br />
I1<br />
L<br />
L<br />
2001:DB8:0:A1::/64 [115/30]<br />
via FE80::204:C1FF:FE50:E700, FastEthernet0/1<br />
FE80::/10 [0/0]<br />
via ::, Null0<br />
FF00::/8 [0/0]<br />
via ::, Null0Argos#<br />
Case Study: Configuring On-Demand Routing<br />
ODR is enabled with a single command, router odr. No networks or<br />
other parameters must be specified. CDP is enabled by default; it needs<br />
to be enabled only if it has been turned off for some reason. The<br />
command to enable the CDP process on a router is cdp run; to enable<br />
CDP on a specific interface, the command is cdp enable.<br />
Figure 12-6 shows a typical hub-and-spoke topology. To configure ODR,<br />
the hub router will have the router odr command. If all routers are<br />
running IOS 11.2 or later and the connecting medium supports SNAP<br />
(such as the Frame Relay or PVCs shown), ODR is operational and the<br />
hub will learn the stub networks. The only configuration necessary at the<br />
stub routers is a static default route to the hub.<br />
Figure 12-6. Hub-and-spoke topologies such as this one<br />
are common across Frame Relay networks.ODR can also be redistributed. If Baghdad in Figure 12-6 needs to<br />
advertise the ODR-discovered routes into OSPF, Baghdad's<br />
configuration might be as displayed in Example 12-27.<br />
Example 12-27. ODR discovered routes can be<br />
redistributed into other IP routing protocols.<br />
router odr<br />
!<br />
router ospf 1<br />
redistribute odr metric 100<br />
network 172.16.0.0 0.0.255.255 area 5<br />
<br />
<br />
<br />
<br />
==Pranala Menarik==<br />
<br />
* [[IPv6: Advanced Routing]]</div>Onnowpurbo