Mailing List Archive

[nsp] ospf (cisco and zebra)
Hello,

I've got a cisco/ospf/zebra query...

The facts:

two freebsd boxes on a fastethernet sub-interface (802.1q)
serviced by a cisco7206.

freebsd boxes have the same set of IP addresses, X, attached to their
loopback interfaces.

freebsd boxes run ospf using zebra

The goal:

one freebsd box to be preferred for packets destined for X
(from the point of view of the cisco7206).
The other one would not get any packets destined for X
delivered to it.
and
I'ld like the preference to be dictated by the freebsd boxes
and not by me on the cisco7206.

Naturally, when the preferred box goes away (dies, for example)
the ospf session would go away and then I'ld want to start
delivering packets to the previously un-preferred box.

My problem:
I can't get it working.

Symptoms:
All I ever seem to get from the cisco point of view is
equal cost paths.

What I need:
Hints about how to do this using ospf
or reasons why I shouldn't be using ospf
(yes, I am aware of vrrp)

Thanks,
-mark
RE: [nsp] ospf (cisco and zebra) [ In reply to ]
Mark, I know nothing about Zebra, so you'll have to forgive any
ignorance shown here.

If I understand you correctly, all three are on the same subnet and you
are seeing equal cost routes to identical loopbacks on the zebras? Do
the zebras support setting OSPF costs on the loopbacks? This would tilt
your preference one way or the other for selected loopbacks. For
destinations behind the zebras this is more involved. If you set the
cost on your outgoing interface this will influence all routes. The only
way around this in a Cisco world would be to have two processes and
control the redistribution between them. Again, I don't know whether the
zebra would support two processes.
I know this is not much help to you as you said you didn't want to do it
this way, but the easiest way to do what you want is on the 7206 using
the "distance" command for your selected routes.
Marcus.

-----Original Message-----
From: Mark Kent [mailto:mark@noc.mainstreet.net]
Sent: 30 October 2002 09:21
To: cisco-nsp@puck.nether.net
Subject: [nsp] ospf (cisco and zebra)


Hello,

I've got a cisco/ospf/zebra query...

The facts:

two freebsd boxes on a fastethernet sub-interface (802.1q)
serviced by a cisco7206.

freebsd boxes have the same set of IP addresses, X, attached to their
loopback interfaces.

freebsd boxes run ospf using zebra

The goal:

one freebsd box to be preferred for packets destined for X
(from the point of view of the cisco7206).
The other one would not get any packets destined for X
delivered to it.
and
I'ld like the preference to be dictated by the freebsd boxes
and not by me on the cisco7206.

Naturally, when the preferred box goes away (dies, for example)
the ospf session would go away and then I'ld want to start
delivering packets to the previously un-preferred box.

My problem:
I can't get it working.

Symptoms:
All I ever seem to get from the cisco point of view is
equal cost paths.

What I need:
Hints about how to do this using ospf
or reasons why I shouldn't be using ospf
(yes, I am aware of vrrp)

Thanks,
-mark
_______________________________________________
cisco-nsp mailing list real_name)s@puck.nether.net
http://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [nsp] ospf (cisco and zebra) [ In reply to ]
Mark Kent wrote:
> Hello,
>
> I've got a cisco/ospf/zebra query...
>
> The facts:
>
> two freebsd boxes on a fastethernet sub-interface (802.1q)
> serviced by a cisco7206.
>
> freebsd boxes have the same set of IP addresses, X, attached to their
> loopback interfaces.
>
> freebsd boxes run ospf using zebra
>
> The goal:
>
> one freebsd box to be preferred for packets destined for X
> (from the point of view of the cisco7206).
> The other one would not get any packets destined for X
> delivered to it.
> and
> I'ld like the preference to be dictated by the freebsd boxes
> and not by me on the cisco7206.
>
> Naturally, when the preferred box goes away (dies, for example)
> the ospf session would go away and then I'ld want to start
> delivering packets to the previously un-preferred box.
>
> My problem:
> I can't get it working.
>
> Symptoms:
> All I ever seem to get from the cisco point of view is
> equal cost paths.
>
> What I need:
> Hints about how to do this using ospf
> or reasons why I shouldn't be using ospf
> (yes, I am aware of vrrp)


You must set adjust cost value on interface of a freebsd box.

vlan0 is up, line protocol is up
Internet Address XXX.XXX.XXX.XXX/XX, Area 0.0.0.0
Router ID XXX.XXX.XXX.XXX, Network Type BROADCAST, Cost: 10
~~~~~~~~

Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) XXX.XXX.XXX.XXX, Interface Address XXX.XXX.XXX.XXX
Backup Designated Router (ID) XXX.XXX.XXX.XXX, Interface Address XXX.XXX.XXX.XXX
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 4, Adjacent neighbor count is 4


Use command "ospf interface cost <value>" in config mode of ospfd of zebra.


--
Pavel Narozhniy
nic-hdl: PN395-RIPE, PN2-UANIC
http://noc.sumy.net
Re: [nsp] ospf (cisco and zebra) [ In reply to ]
On Tue, 29 Oct 2002 14:21:09 -0800 (PST) Mark Kent <mark@noc.mainstreet.net> wrote:
> Hello,
>
> I've got a cisco/ospf/zebra query...
>
> The facts:
>
> two freebsd boxes on a fastethernet sub-interface (802.1q)
> serviced by a cisco7206.
>
> freebsd boxes have the same set of IP addresses, X, attached to their
> loopback interfaces.
>
> freebsd boxes run ospf using zebra
>
> The goal:
>
> one freebsd box to be preferred for packets destined for X
> (from the point of view of the cisco7206).
> The other one would not get any packets destined for X
> delivered to it.

Make sure your two Zebra boxes have different OSPF router IDs or Bad Things
will happen. (ospf router-id x.x.x.x) By default it may use the loopback
IPs, which are the same on both boxes. I couldn't find any documentation
online as to how Zebra chooses OSPF router Ids but this is the way Cisco
does it and Zebra is very much a Cisco routing clone.

Then, set different ip ospf costs on the FastEthernet interfaces of the
FreeBSD boxes. This will allow you to influence which box is primary and
which is secondary.

--
Ryan O'Connell
Mail: ryan@complicity.co.uk
CV: http://www.complicity.co.uk/ryancv.pdf
CCIE #8174
Re: [nsp] ospf (cisco and zebra) [ In reply to ]
> Symptoms:
> All I ever seem to get from the cisco point of view is
> equal cost paths.

This is likely to be because you aren't setting the metrics in Zebra
to bias the routes in the direction that you desire.

> What I need:
> Hints about how to do this using ospf
> or reasons why I shouldn't be using ospf
> (yes, I am aware of vrrp)

Try specifying a cost on lo0 in ospfd.conf:

interface lo0
ip ospf cost N

where N is set appropriately across the boxes for the policy that you
want to implement.

Stephen