Multihop BGP cannot use direct gateway mode - misidentification of multihop sessions?

Ondrej Zajicek santiago at crfreenet.org
Wed Aug 13 11:57:57 CEST 2014


On Wed, Aug 13, 2014 at 10:27:01AM +0100, Alex Bligh wrote:
> Ondrej,
> 
> On 13 Aug 2014, at 10:03, Ondrej Zajicek <santiago at crfreenet.org> wrote:
> 
> > 
> > In short, the default values depends in this direction:
> > 
> > EBGP|IBGP  ->  direct|multihop  ->  gateway direct|recursive
> > 
> > Changing former would change the default value for later, but not otherwise.
> 
> Not sure I understand that.
> 
> The session is IBGP. It is not multihop (by which I mean it's
> on the same subnet), but AFAICT bird thinks it is.

Generally, by 'direct BGP session' or 'multihop BGP session' i mean the
mode of operation of that BGP sesssion; i.e., whether it is expected to be
on the same subnet, not whether it is really on the same subnet. The
mode of operation cannot be reliably detected from the network topology,
because the topology could change during the operation.

E.g.: You have BGP neighbor 192.168.1.10 and two interfaces: eth0 with
192.168.1.1/24 and eth1 with 192.168.2.1/24. If the BGP session is in
direct mode, it always uses eth0, packets are sent with TTL 1 and the
session automatically shutdowns when eth0 is disabled. If the BGP session
is in multihop mode, it reaches 192.168.1.10 based on IGP routes, which
is probably a direct route through eth0, but could be rerouted by IGP
(without dropout of the BGP session) through indirect hop over eth1 when
eth0 is disabled.

> How do I change it to a 'direct' (as opposed to multihop) session?

Use 'direct' option:

    <tag>direct</tag>
    Specify that the neighbor is directly connected. The IP address of the
    neighbor must be from a directly reachable IP range (i.e. associated
    with one of your router's interfaces), otherwise the BGP session
    wouldn't start but it would wait for such interface to appear. The
    alternative is the <cf/multihop/ option. Default: enabled for eBGP.

 I
> think you are saying it's defaulting to a multihop configuration (and
> thus 'gateway' defaults to 'recursive'), as opposed to it detecting
> a multihop session.
> 
> Also, you cannot (it would seem) change to 'gateway direct' as you get
> the error.
> 
> At the very least I think there is a documentation error as
> it says 'gateway direct' is the default.

It only says that 'gateway direct' is the default for 'direct' sessions,
which is true.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20140813/b754cfd8/attachment-0001.asc>


More information about the Bird-users mailing list