[c-nsp] OSPF link costs

Bruce Pinsky bep at whack.org
Fri Dec 8 16:48:14 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Blayzor wrote:
> Is there a way using OSPF to have a router set the cost or preference of
> a single link?  I guess I'm thinking much in the way BGP prepending
> works with the destination router setting the cost or metric the way the
> neighboring routers would see it.  Say for example you had the following
> network:
> 
> +----+        +----+
> !    !        !    !
> ! R1 !---GE---! R2 !
> !    !        !    !
> +----+        +----+
>   !              !
>   !              !
>   GE             GE
>   !              !
>   !              !
> +----+        +----+
> !    !        !    !
> ! S1 !\      /! S2 !
> !    ! \    / !    !
> +----+  \  /  +----+
>   !      \/      !
>   !      /\      !
>   GE    /  \     FE
>   !    GE  GE    !
>   !   /      \   !
> +----+        +----+
> !    !        !    !
> ! R3 !        ! R4 !
> !    !        !    !
> +----+        +----+
> 
> 
> Assume R1 & R2 are routers, S1 & S2 are subnets/SVI's on switches and R3
> & R4 are routers.  Focusing on router R4; it is very easy to set the
> cost on the link facing the SVI on S2 to a high cost where it's never
> used unless it's the only link.  R3 would be seen as equal cost in both
> directions of the network, which is fine.  But since there is only one
> interface/SVI on S2 how is it possible to NOT use the FE link to R4
> since the cost of the SVI interface would be the same for all links in
> the subnet?  Is there a way on R4 to set a cost or metric so that
> upstream routes for the FE link are at a higher cost?  The best way I
> can think of this is sort of link BGP pre-pending and having the
> destination router set the cost of the link to the network.
> 

Are S1 and S2 a layer 3 hop or not?  From your description, I'm guessing
not if you say there is only a single SVI between the routers.  That
description leads me to believe that R1/R3/R4 are on one directly connected
subnet and R2/R3/R4 are on a different directly connected subnet.  At that
point, it's no longer an L3 cost issue, it's simply a layer 2 issue.

Minimally, to deal with this you need to have 2 SVIs on the S1 and S2
devices.  That way you can adjust the cost of the SVI between S2 and R3/R4
to reflect the fact that there is a GE/FE rather than a GE/GE connection in
that path.

Ideally there would be three SVIs so that the links between the devices can
be given individual L3 costing info.  The bottom line is that you get one
L3 cost per L3 domain/subnet.

The other thing is that regardless of how it's depicted, R1 and R2 only
have a single, best cost path to R3 and R4 since the alternate path for R1
is through R2 and vice versa.

- --
=========
bep

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFed2eE1XcgMgrtyYRAp/dAJ9oCJNQM/Qy36ReOjc4CSEMX02tVgCgxi/L
NG8Mt+ygeDuFqI9dt3y+vw8=
=VEOk
-----END PGP SIGNATURE-----


More information about the cisco-nsp mailing list