< Free Open Study > |
4-4 default-information originate always metric costSyntax Description:
Purpose: To set the external cost of the default route advertised into the OSPF domain. The first form of the command will advertise the default route only if the route exists in the local IP routing table. The second form will unconditionally advertise the default route. If more than one OSPF router is advertising a default route, the metric can be used to select the preferred default route. The default route with the lowest metric is considered the best route. Initial Cisco IOS Software Release: 10.0 Configuration Example: Unconditionally Advertising a Default Route into the OSPF DomainConfigure the routers in Figure 4-3 as shown in the following listing. Figure 4-3. When OSPF Advertises a Default Route, the Advertising Router Becomes an ASBR. The Default Cost of the Default Route is 1
Router A interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Ethernet0/0 ip address 172.16.1.1 255.255.255.0 ! router ospf 1 network 1.1.1.1 0.0.0.0 area 0 network 172.16.1.0 0.0.0.255 area 0 ________________________________________________________________________ Router B interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Ethernet0 ip address 172.16.1.2 255.255.255.0 ! interface Serial1 bandwidth 64 ip address 10.1.1.5 255.255.255.252 clockrate 64000 ! router ospf 1 network 2.2.2.2 0.0.0.0 area 0 network 172.16.1.0 0.0.0.255 area 0 Verify that Routers A and B have established an OSPF neighbor relationship. rtrA# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/BDR 00:00:30 172.16.1.2 Ethernet0/0 ________________________________________________________________________________ rtrB# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/DR 00:00:38 172.16.1.1 Ethernet0 Modify the configuration on Router B so that OSPF will unconditionally advertise a default route into the OSPF domain. Router B router ospf 1 network 2.2.2.2 0.0.0.0 area 0 network 172.16.1.0 0.0.0.255 area 0 default-information originate always Verify that the default route is in the IP routing table on Router B. rtrB# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/11] via 172.16.1.1, 16:23:59, Ethernet0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 172.16.0.0/24 is subnetted, 1 subnets C 172.16.1.0 is directly connected, Ethernet0 10.0.0.0/30 is subnetted, 1 subnets C 10.1.1.4 is directly connected, Serial1 Router B does not have a default route in the IP routing table. Verify that a default route is being advertised to Router A. rtrA# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is 172.16.1.2 to network 0.0.0.0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/11] via 172.16.1.2, 00:10:27, Ethernet0/0 172.16.0.0/24 is subnetted, 1 subnets C 172.16.1.0 is directly connected, Ethernet0/0 O*E2 0.0.0.0/0 [110/1] via 172.16.1.2, 00:01:17, Ethernet0/0 Notice that the default cost of the default route is 1. Modify the configuration on Router B to give the default route a cost of 15. Router B router ospf 1 network 2.2.2.2 0.0.0.0 area 0 network 172.16.1.0 0.0.0.255 area 0 default-information originate always metric 15 VerificationVerify that the cost of the default route has been modified. rtrA# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is 172.16.1.2 to network 0.0.0.0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/11] via 172.16.1.2, 00:15:49, Ethernet0/0 172.16.0.0/24 is subnetted, 1 subnets C 172.16.1.0 is directly connected, Ethernet0/0 O*E2 0.0.0.0/0 [110/15] via 172.16.1.2, 00:01:56, Ethernet0/0 rtrA# show ip route 0.0.0.0 Routing entry for 0.0.0.0/0, supernet Known via "ospf 1", distance 110, metric 15 , candidate default path Tag 1, type extern 2, forward metric 10 Redistributing via ospf 1 Last update from 172.16.1.2 on Ethernet0/0, 00:02:33 ago Routing Descriptor Blocks: * 172.16.1.2, from 2.2.2.2, 00:02:33 ago, via Ethernet0/0 Route metric is 15, traffic share count is 1 Troubleshooting
|
< Free Open Study > |