6-3 distance administrative-distance source-ip-address source-ip-mask access-list-number

 <  Free Open Study  >  

6-3 distance administrative-distance source-ip-address source-ip-mask access-list-number

Syntax Description:

  • administrative-distance ” The supplied value will be applied to the administrative distance of selected OSPF routes in the local routing table. The default administrative distance for OSPF routes is 110.

  • source-ip-address ” IP address of the source of the OSPF routes. For OSPF, the source address is the OSPF router ID.

  • source-ip-mask ” IP mask for the source of the OSPF routes.

  • access-list-number ” Standard IP access number used to determine which routes learned from the source will have their administrative distance modified. The range of access list numbers is 1 “99 and 1300 “1999.

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 :

  • connected ”

  • static ” 1

  • EBGP ” 20

  • EIGRP ” 90

  • IGRP ” 100

  • OSPF ” 110

  • IS-IS ” 115

  • RIP ” 120

  • IBGP ” 200

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 Neighbor

In 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

graphics/06fig02.gif

 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   
Verification

Verify 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 Neighbor

Modify 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   
Verification

Verify 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
Step 1. Verify that there is a neighbor relationship between the OSPF routers using the show ip ospf neighbors command.

Step 2. Verify that the correct administrative distance is being used with the distance command.

Step 3. The source address for OSPF is the OSPF router ID. Ensure that the proper OSPF router ID is being used.

Step 4. Ensure that the source mask is an inverse mask.

Step 5. Verify the syntax of the access-list and make sure the distance command is referencing the correct access list.

 <  Free Open Study  >  


Cisco[r] OSPF Command and Configuration Handbook
Cisco OSPF Command and Configuration Handbook (paperback)
ISBN: 1587055406
EAN: 2147483647
Year: 2002
Pages: 236

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net