cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1703
Views
0
Helpful
9
Replies
Highlighted

ospf route with metric 20 within Ospf domain

topology :    R1----R2----R3

- route x.x.x.x is connected on R2 and y.y.y.y on R3 and advertised in ospf through network command...

- sh ip route x.x.x.x or y.y.y.y on R1 reveals that this route has  metric 20 and is an intra-area route (so no chances of  redistribution)...... whereas the metric should have been 1 (gig-interface)..   .......... one other piece of info : the routes are getting redistributed to BGP .......

what is happening ... ?

9 REPLIES 9
Highlighted
Advocate

Re: ospf route with metric 20 within Ospf domain

Hi,

isn't there any bandwidth command used on the lines between R1 and the other routers?

BR,

Milan

Highlighted
Rising star

Re: ospf route with metric 20 within Ospf domain

HI,

Is there cost explicitly specified for sending a packet on an interface of R1 using "ip ospf cost "

If so, to reset the path cost to the default value, use the no form of this command.

Pls Rate if Helps !

Best Regards,

Guru Prasad R

Highlighted

Re: ospf route with metric 20 within Ospf domain

Hi ,

could you post from R2

show ip ospf interface x/y | i Cost

!

! where x/y is the interface that has the advertised network
!

show ip ospf data router R2-router-id

Dan

Highlighted
Hall of Fame Expert

Re: ospf route with metric 20 within Ospf domain

Hello Mukarram,

you haven't provided enough information on this issue

we should see show ip ospf interface on R1, R2, R3 just to see the costs associated to the interfaces

bandwidth command and  ip ospf cost at interface level and auto-reference bandwidth at ospf process level can influence the cost of a link.

Hope to help

Giuseppe

Highlighted

Re: ospf route with metric 20 within Ospf domain

here are the configs from live network:

interface on which R1 is connected to R2.. the route is 10.171.5.0/24  behind R2

R1#sh ip ospf interface gigabitEthernet 1/0/19
GigabitEthernet1/0/19 is up, line protocol is up (connected)
  Internet Address 10.174.101.81/30, Area 4001
  Process ID 4001, Router ID 10.159.254.41, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 10.159.254.41, Interface address 10.174.101.81
  Backup Designated router (ID) 192.168.255.162, Interface address 10.174.101.82
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 32
  Last flood scan time is 0 msec, maximum is 9 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 192.168.255.162  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

R1#sh ip route vrf VPN_EDN 10.171.5.0
Routing entry for 10.171.5.0/24
  Known via "ospf 4001", distance 110, metric 20, type intra area
  Redistributing via bgp 65534
  Advertised by bgp 65534 match internal external 1 & 2
  Last update from 10.174.101.82 on GigabitEthernet1/0/19, 05:31:15 ago
  Routing Descriptor Blocks:
  * 10.174.101.82, from 192.168.255.162, 05:31:15 ago, via GigabitEthernet1/0/19
      Route metric is 20, traffic share count is 1

route 10.171.5.0 on R2:

R2#sh ip route 10.171.5.0

Routing entry for 10.171.5.0/24

  Known via "connected"

, distance 0, metric 0 (connected, via interface)

  Routing Descriptor Blocks:

  * directly connected, via Vlan4

     Route metric is 0

, traffic share count is 1

Highlighted

Re: ospf route with metric 20 within Ospf domain

Also you will need to post from R2:

show ip ospf interface vlan 4

Dan

Highlighted
Rising star

Re: ospf route with metric 20 within Ospf domain

Hi,

I have created this scenario in LAB and metric 20, intra area occurs under following circumstances.

On R1 if I set ip ospf cost 10 on interface connecting to R2

On R2 if i set ip ospf cost 10 on interface where your IP is configured.

Please find same outpput here

On R2:

R2#interface Loopback99
ip address 10.0.0.2 255.255.255.255
no ip directed-broadcast
ip ospf cost 10
end

R1#

interface FastEthernet1/0/3.21
description --- Connected to R1 ---
encapsulation dot1Q 21
ip address 10.0.3.5 255.255.255.252
ip ospf cost 10

R2#sh ip route 10.0.0.2
Routing entry for 10.0.0.2/32
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Loopback99
      Route metric is 0, traffic share count is 1

R1#sh ip route 10.0.0.2
Routing entry for 10.0.0.2/32
  Known via "ospf 100", distance 110, metric 20, type intra area
  Last update from 10.0.3.6 on FastEthernet1/0/3.21, 00:00:05 ago
  Routing Descriptor Blocks:
  * 10.0.3.6, from 10.0.0.2, 00:00:05 ago, via FastEthernet1/0/3.21
      Route metric is 20, traffic share count is 1

So all we need is

show ip ospf interface vlan 4 from R2

Hope this helps

Regards

mahesh

Highlighted
Hall of Fame Expert

Re: ospf route with metric 20 within Ospf domain

Hello Mukarram,

it is more clear now.

First  the GE routed port between R1 and R2 has cost 10 on R1.

to be noted in OSPF the OSPF cost of the interface that is associated to the IP subnet described in network area command is added to the cost to reach the node

so total cost from R1 is:

ospf cost of R1-R2 link + ospf cost of R2 L3 interface where destination IP subnet is connected

so there is an apparent conflict here because a show ip route 10.171.5.0 on R2 tells you that the route is connected with AD=0 and metric=0

However, R1 uses the OSPF router LSA generated by R2 to calculate total cost to destination and connected protocol on R2 plays no role here.

Clearly as noted by Mahesh also SVI Vlan4 on R2 has OSPF cost 10.

This is also done because a LAN segment is modeled as a star with a cost to enter the shared segment.

Hope to help

Giuseppe

Highlighted

Re: ospf route with metric 20 within Ospf domain

thats right, int vlan 4 has cost 10..