6-1 distance administrative-distance

 <  Free Open Study  >  

6-1 distance administrative-distance

Syntax Description:

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

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. It is 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

Initial Cisco IOS Software Release: 10.0

Configuration Example: Adjusting the Administrative Distance to Influence Route Selection

In Figure 6-1, 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-17) on Router A is used so the loopback is advertised as a /24 network and not a /32 network.

Figure 6-1. When a Router Learns the Same Route via Two Different Routing Protocols, the Administrative Distance Is Used to Select the Best Route

graphics/06fig01.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 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.

 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   
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 
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. Verify the administrative distance of the OSPF routes using the show ip route command.

 <  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