open...@kene.nu(open...@kene.nu) on 2018.10.17 12:44:02 +0200:
> Hello,
> 
> On Tue, Oct 16, 2018 at 4:56 PM Sebastian Benoit <benoit-li...@fb12.de> wrote:
> >
> > Tommy Nevtelen(to...@nevtelen.com) on 2018.10.16 15:11:51 +0200:
> > > On Tue, Oct 16, 2018 at 10:21:37AM +0200, Claudio Jeker wrote:
> > > > On Tue, Oct 16, 2018 at 09:13:20AM +0200, open...@kene.nu wrote:
> > > > > Hello,
> > > > >
> > > > > Only relying on OSPF hellos effectively makes it mimic BGP with its
> > > > > keepalives. I will ponder the value of transporting the underlay in
> > > > > OSPF, effectively transporting loopback peering addresses for BGP in
> > > > > OSPF. I am not sure that it will make my life easier but will consider
> > > > > it.
> > > >
> > > > OSPF is generally faster at converging after reroute and it is possible 
> > > > to
> > > > set the router-dead-time to minimal which will give you a 1 second
> > > > timeout. Also the default of 40sec is lower than the 90sec of BGP.
> > > > Additionally OSPF may give you multipath routes so the failover for BGP
> > > > may be not noticable. Also GRE has a way to emulate link state but to be
> > > > honest if I use OSPF on a GRE link I will not turn it on (unless
> > > > requested).
> > >
> > > I guess the brewing BFD support would speed this up for BGP when it 
> > > arrives
> > > and make OSPF less useful if speed is the thing that needs to be solved.
> > >
> > > Also I've been thinking about the following config in ospfd
> > >
> > > rtlabel label external-tag number
> > >              Map route labels to external route tags and vice versa.  The
> > >            external route tag is a non-negative 32-bit number
> > >            attached to AS-external OSPF LSAs.
> > >
> > > What exactly does this mean? As I understand it is to map rtlabels to LSA
> > > Type 5 tags. But what do you do with it then? Could this be used for what
> > > this thread is talking about or is it totally off?
> >
> > If you do this on two (or more routers) you distribute the routes and they
> > end up in the fib with that rtlabel (note the "and vice versa").
> >
> > You can do all the things you can do with route labels, for example use
> > them in pf filters.
> >
> > And yes, you could also use it to redistribute them into bgp (although that
> > needs to happen on another router i think):
> >
> >  ospfd ---type5 lsa---> ospfd --> fib with rtlabel --> bgpd ...
> >  hostA                  hostB     hostB                hostB
> >
> > /Benno
> 
> I might be wrong here but in prder to have ospfd generate type 5 LSAs
> one needs both a BGP speaker that announces the prefix in question
> into ospf and two different ospf areas in your network?

No need for a bgp speaker: a route in the routing table with the label is
enough.

So here is a rough description of how ospfd and bgpd announce new prefixes
(i.e. the ones not learned from other routers).

ospfd looks at whats in the kernel routing table (FIB), and depending on its
configuration (the interface statements _and_ redistribute commands) it adds
routes into its ospfd internal RIB. That RIB is then propagated into the
ospf network (skip ospf protocol details here).

ospfd needs routes in the FIB to inject new routes into OSPF.

By inject, i mean "add a new network to the routes in the RIB".

BGPD on the other hand has the "network <prefix>" statement.

It adds the prefix given there to its RIB ("injects it into BGP") without
the need for a route in the FIB.

The additional options (network priority ..., network rtlabel ...) are
only there for convinience and special cases, they are not really needed
for standard bgp setups.

> Or can I make ospfd generate type5 LSAs in some other way? I see that
> rtlabels would do it but that implies I have an already existing route
> in the fib which preemptively I tag in some way. In my case the routes
> are generated by interface statements in ospfd.conf (so type1 and 2
> LSAs).

If you use interface statements, those interfaces have IPs on them, which you
will find have routes in the routing table.

Also, there is "ifconfig <if> rtlabel ..."

I don't know if ospfd will pick those route-labels up (with the rtlabel
statement). I think it should, but havent used that or looked at the code.

/Benno

Reply via email to