5-1 default-metric cost

 <  Free Open Study  >  

5-1 default-metric cost

Syntax Description:

  • cost ” External cost assigned to routes redistributed into OSPF. The range of values is 1 to 4,294,967,295. The default metric for redistributed BGP routes is 1. The default metric for all other redistributed protocols is 20.

Purpose: Used to assign a cost to routes redistributed into OSPF that have not been assigned a metric by the redistribute command. Using the default-metric command will not affect routes that have been assigned a metric by the redistribute command.

Initial Cisco IOS Software Release: 10.0

Configuration Example: Setting the Default Cost for Redistributed Routes

In Figure 5-1, Router B is receiving the routes 3.3.3.0/24 and 10.1.1.4/30 from Router C via EIGRP. These EIGRP routes will be initially redistributed into OSPF using the default metric of 20. See Chapter 14, "Route Redistribution," for the use of the redistribute command.

Figure 5-1. The Default Metric for redistributed BGP Routes Is 1 and the Default Metric for Other redistributed

graphics/05fig01.gif

 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  eigrp 1   network 10.0.0.0   router ospf 1   redistribute eigrp 1 subnets   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, as shown here:

 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 receiving the 3.3.3.0/24 network 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 

Inspect the routing table on Router A to verify the default cost of the redistributed route.

 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 not set      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:27:10, Ethernet0/0      3.0.0.0/24 is subnetted, 1 subnets  O E2    3.3.3.0 [110/20] via 172.16.1.2, 00:01:58, Ethernet0/0  172.16.0.0/24 is subnetted, 1 subnets C       172.16.1.0 is directly connected, Ethernet0/0      10.0.0.0/30 is subnetted, 1 subnets  O E2    10.1.1.4 [110/20] via 172.16.1.2, 00:01:58, Ethernet0/0  

The redistributed EIGRP routes have a cost or metric of 20. These routes were redistributed as type 2 routes (the default) so the cost of crossing the Ethernet network is not included. Modify the configuration on Router B so the redistributed EIGRP routes are assigned a cost of 55.

 Router B  router ospf 1   redistribute eigrp 1 subnets   network 2.2.2.2 0.0.0.0 area 0   network 172.16.1.0 0.0.0.255 area 0    default-metric 55   
Verification

Verify that the redistributed EIGRP routes have been assigned a cost of 55.

 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 not set      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:00:06, Ethernet0/0      3.0.0.0/24 is subnetted, 1 subnets  O E2    3.3.3.0 [110/55] via 172.16.1.2, 00:00:06, Ethernet0/0  172.16.0.0/24 is subnetted, 1 subnets C       172.16.1.0 is directly connected, Ethernet0/0      10.0.0.0/30 is subnetted, 1 subnets  O E2    10.1.1.4 [110/55] via 172.16.1.2, 00:00:06, Ethernet0/0  
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 routes to be redistributed are in the IP routing table.

Step 3. Verify that you have used the desired metric with the default-metric 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