< Free Open Study > |
6-3 distance administrative-distance source-ip-address source-ip-mask access-list-numberSyntax Description:
Purpose: If a router has learned about a network from more than one routing protocol, then the administrative distance is used to select the best route. The best route is the route that will be installed in the IP routing table, the route with the lowest administrative distance. The default administrative distances for the IP routing protocols are as follows :
Command 6-2 is used to modify the administrative distance of all routes learned from sources that match the source IP address/mask pair. Command 6-3 is used to modify the administrative distance of selected routes learned from sources that match the IP address/mask pair by using an IP access list. Initial Cisco IOS Software Release: 10.0 Configuration Example 1: Adjusting the Administrative Distance of All Routes Learned from a Particular OSPF NeighborIn Figure 6-2, Router B is receiving the route 3.3.3.0/24 from Router A via OSPF and Router C via EIGRP. Because EIGRP has a lower administrative distance than OSPF, the EIGRP route will be installed in the routing table on Router B. A loopback address on Routers A and C is used to simulate the network that is being propagated by OSPF and EIGRP. The ip ospf network point-to-point interface command (see Section 19-7) on Router A is used so the loopback is advertised as a /24 network and not a /32 network. Figure 6-2. The Administrative Distance of OSPF Routes Can Be Modified Based on the Neighbor Router's OSPF ID
Router A interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Loopback1 description Simulate the network 3.3.3.0/24 ip address 3.3.3.3 255.255.255.0 ip ospf network point-to-point ! interface Ethernet0/0 ip address 172.16.1.1 255.255.255.0 ! router ospf 1 router-id 1.1.1.1 network 1.1.1.1 0.0.0.0 area 0 network 3.3.3.0 0.0.0.255 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 eigrp 1 network 10.0.0.0 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 ________________________________________________________________________________ Router C interface Loopback0 description Simulate the network 3.3.3.0/24 ip address 3.3.3.3 255.255.255.0 ! interface Serial0 bandwidth 64 ip address 10.1.1.6 255.255.255.252 ! router eigrp 1 network 3.0.0.0 network 10.0.0.0 no auto-summary 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 Verify that Routers B and C have formed an EIGRP relationship. rtrB# show ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.1.6 Se1 10 00:13:27 399 2394 0 4 ________________________________________________________________________________ rtrC# show ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.1.5 Se0 11 00:13:53 28 2280 0 6 Verify that Router B is installing the 3.3.3.0/24 network learned via EIGRP from Router C. 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, 00:13:37, Ethernet0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets D 3.3.3.0 [90/40640000] via 10.1.1.6, 00:13:38, Serial1 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 Modify the configuration on Router B to set the administrative distance of all OSPF routes learned from neighbor 172.16.1.1 to 80. Because this value is less than the administrative distance for EIGRP (90), the OSPF route for 3.3.3.0/24 should be installed in the IP routing table on Router B. When using the distance command with OSPF, the source address is the OSPF router ID. The source mask is an inverse mask. Therefore, to set the administrative distance of OSPF routes learned from Router A, use the source address/mask pair 1.1.1.1/0.0.0.0. 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 distance 80 1.1.1.1 0.0.0.0 VerificationVerify that the OSPF route for 3.3.3.0/24 has been installed in the 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 [80/11] via 172.16.1.1, 00:01:22, Ethernet0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets O 3.3.3.0 [80/11] via 172.16.1.1, 00:01:23, Ethernet0 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 Configuration Example 2: Adjusting the Administrative Distance of Selected Routes Learned from a Particular OSPF NeighborModify the configuration on Router B to modify only the administrative distance of the network 3.3.3.0/24. The network 1.1.1.1/32 should maintain the default OSPF administrative distance of 110. The OSPF router ID of Router A can be found by using the show ip ospf command. rtrA# show ip ospf Routing Process "ospf 1" with ID 1.1.1.1 Supports only single TOS(TOS0) routes SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x0 Number of DCbitless external LSA 0 Number of DoNotAge external LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Area BACKBONE(0) Number of interfaces in this area is 3 Area has no authentication SPF algorithm executed 32 times Area ranges are Number of LSA 3. Checksum Sum 0x15E77 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 ________________________________________________________________________________ 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 distance 80 1.1.1.1 0.0.0.0 1 ! access-list 1 permit 3.3.3.0 0.0.0.255 VerificationVerify that the administrative distance for the 3.3.3.0/24 network has been modified while the 1.1.1.1 network remains unchanged. 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, 00:03:51, Ethernet0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets O 3.3.3.0 [80/11] via 172.16.1.1, 00:03:52, Ethernet0 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 Troubleshooting
|
< Free Open Study > |