Options

OSPF cost value

Ching01Ching01 Member Posts: 83 ■■□□□□□□□□
I am configuring a NBMA point to multipoint scenario. However, the connection is fine but I want to know if it's having the correct cost path using sh ip route.

I just want to ask why it's giving me a metric of 21 not 20, I already assign a value of cost of 20 to 3.1.1.1 using neigbhor command with cost.

Here's my configuration

R1:

interface Loopback0
ip address 192.168.10.1 255.255.255.255
no ip directed-broadcast
!
interface Serial1/0
ip address 3.1.1.1 255.255.255.0
no ip directed-broadcast
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
no ip mroute-cache
frame-relay map ip 3.1.1.2 22
frame-relay interface-dlci 22
router ospf 1
network 3.1.1.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0

R1's routing table

3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O 3.1.1.3/32 [110/58] via 3.1.1.2, 00:02:00, Serial1/0
O 3.1.1.2/32 [110/48] via 3.1.1.2, 00:02:00, Serial1/0
C 3.1.1.0/24 is directly connected, Serial1/0
192.168.30.0/32 is subnetted, 1 subnets
O 192.168.30.1 [110/59] via 3.1.1.2, 00:02:00, Serial1/0
192.168.10.0/32 is subnetted, 1 subnets
C 192.168.10.1 is directly connected, Loopback0
192.168.20.0/32 is subnetted, 1 subnets
O 192.168.20.1 [110/49] via 3.1.1.2, 00:02:00, Serial1/0

R2HUB config:

interface Loopback0
ip address 192.168.20.1 255.255.255.255
no ip directed-broadcast
!
interface Serial1/0
ip address 3.1.1.2 255.255.255.0
no ip directed-broadcast
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
no ip mroute-cache
frame-relay map ip 3.1.1.1 200
frame-relay map ip 3.1.1.3 300
frame-relay interface-dlci 200
frame-relay interface-dlci 300
!
router ospf 1
network 3.1.1.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
neighbor 3.1.1.3 cost 10
neighbor 3.1.1.1 cost 20 <<<<<<<<<<<<


R2hub routing table
Gateway of last resort is not set

3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O 3.1.1.3/32 [110/10] via 3.1.1.3, 00:04:27, Serial1/0
O 3.1.1.1/32 [110/20] via 3.1.1.1, 00:04:27, Serial1/0
C 3.1.1.0/24 is directly connected, Serial1/0
192.168.30.0/32 is subnetted, 1 subnets
O 192.168.30.1 [110/11] via 3.1.1.3, 00:04:27, Serial1/0
192.168.10.0/32 is subnetted, 1 subnets
O 192.168.10.1 [110/21] via 3.1.1.1, 00:04:27, Serial1/0
192.168.20.0/32 is subnetted, 1 subnets
C 192.168.20.1 is directly connected, Loopback0


And also if I am on R1 router my cost to 192.168.20.0 network shoud be R1's int s1/0 cost = 48 + R2's assigned cost to me is 20 should be = 68
Am I wrong?

I tried this in Broadcast Multi-access ethernet and It's giving me correct value.

I assign a metric in LSA type 5 of 2 and going to the end of my area it gives me the correct total path cost.

But why in NBMA I can't get the correct value.

Thanks in advance

Comments

  • Options
    cisco_troublecisco_trouble Inactive Imported Users Posts: 78 ■■□□□□□□□□
    from your config it seems that the directly connected serial1/0 has a cost of 20 which is 3.x.x.x network compared to the cost of 21 which is advertised by the 192.x.x.x network. You are advertising the loopback with a network statement and not redistributing it into ospf.
    Try the redistrubute command instead of the network command. Don't get why the loopback is adding "1" to the cost of serial 1/0 though?
    "To strive, to seek, to find, and not to yield."
  • Options
    EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    When you use the point-to-multipoint config,ospf will use the loopback cost.
    100000000/80000000=1.25 rounding down = 1, if you use type nbma the loopback cost is not taken into account.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Options
    cisco_troublecisco_trouble Inactive Imported Users Posts: 78 ■■□□□□□□□□
    cool. definately learnt something today.
    "To strive, to seek, to find, and not to yield."
  • Options
    Ching01Ching01 Member Posts: 83 ■■□□□□□□□□
    cisco_trouble, I advertised the loopback just to simulate a connected network on R1 that R2 should know that 192.168.10.0 network can be reached through R1.

    I think ed is right It is using the cost of the loopback,.

    Ed let say 192.168.10.0 network is connected as fastethernet which is connected to R1. On r2 what will be the cost of this network in my routing table the same as configuration above using cost 20 on R2.

    Again in multi-access is works fine and I understand but in NBMA I am getting confused how to get the metric.

    Thanks again
  • Options
    EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Fastethernet default bandwidth is 100,000,000 b/s
    Ospf cost = 10^8/bandwidth in bits so cost of fastethernet int is 1
    so the result will be the same 21, the same as if you used nmba.
    You just have to remember when using nbma the cost for the loopback isnt added to the route cost.When using ptp the loopback cost is taken into account.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Options
    Ching01Ching01 Member Posts: 83 ■■□□□□□□□□
    Thanks Ed I got it, in loopback interface cost is 1, I try it again and make play on the cost command. So, routers ignore the cost assign in the interface even if it's 48 when I used neig 3.1.1.1 cost 2 and see my routing table.

    R1

    s1/0 = 3.1.1.1/24 cost 48 <<<didn't change the default BW 2048
    s1/1 = 192.168.30.0 net

    R2_HUB
    s1/0 3.1.1.2/24
    s1/1 = 192.168.20.0 net
    neig 3.1.1.1 cost 2


    so cost of 192.168.30.0 is 50,even if there is assign cost on the interface.

    Again thanks a lot, next lab IS-IS
Sign In or Register to comment.