route reflector setup problem

SC SCx kredaxx at gmail.com
Thu Jul 29 11:34:18 CEST 2021


Hi,

I am trying to setup two route reflectors (that also pass traffic) that
peer with ebgp (and exchange routes via ibgp between themselves). So
something like.

as100                      as200
|                                |
|                                |
ebgp                         ebgp
|                                |
|                                |
RR1(as999)--- ibgp --- RR2(as999)
| \                            / |
|   \                        /   |
|     \                     /    |
|       \                 /      |
|         \             /        |
|           \        /           |
|             \   /              |
|               X               |
|               / \              |
|             /     \            |
|           /        \           |
|         /           \          |
|       /              \         |
rr client 1          rr client 2

I came up with a config like this (for simplicity's sake I will only show
RR1's side since it's the equivalent for RR2 with just slightly different
parameters like ip addresses, etc.)

# ebgp from RR1 to as100
protocol bgp ebgp_as100 {
        local as 1000;
        neighbor 100.100.100.100 as 100;
        export filter {
            if PREFIXES_TO_EXPORT() then accept;
            reject;
        }
        import filter {
            if PREFIXES_TO_IMPORT_LTE_24() then accept;
            reject;
        }
}


# ibgp from RR1 to RR2
protocol bgp ibgp {
        local as 999;
        neighbor 10.0.0.2 as 999;
        source address 10.1.0.1;
        next hop self;
        rr cluster id 0.0.0.1;
}


# RR1 to rr client 1 (also has one for rr client 2)
protocol bgp rr_client1{
    local as 999;
    neighbor 10.0.0.3 as 999;
    source address 10.1.0.1;
    rr client;
    rr cluster id 0.0.0.1;
    # next hop self #???
    export filter {
        if PREFIXES_TO_EXPORT() then accept;
        reject;
    };
    import filter {
        if PREFIXES_TO_IMPORT() then accept;
        reject;
    };
}

##########################################################

# on rr client 1 to RR1 (also has one for RR2)
protocol bgp rr1_ibgp {
    local as 999;
    neighbor 10.0.0.1 as 999;
    source address 10.1.0.3;
    next hop self;
    export all;
    import all;
}


This works, but with some problems.

Prefixes learned from AS100 and AS200 that get exported to RR clients are
unreachable unless they passed through the IBGP connection between RR1 and
RR2.

Makes sense, since the IBGP connection between RRs is defined with next hop
self, and the RR client connections aren't.

So, I went in, and added "next top self" to the connections between RRs and
RR clients. It has fixed the unreachable problem but caused another one.

Now prefixes that are exported on RR clients to RRs have their next hop
changed which is not what I want. I want to leave them intact. (e.g. RR
clients can export some private ip ranges which I don't want to be routable
on the RRs)

So I *think* that I need a way on the RRs to only change next hop of EBGP
prefixes that get exported from RRs to RR clients but leave other prefixes
unaffected.

Is my thinking correct? How can this be achieved?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20210729/b5c9364c/attachment.htm>


More information about the Bird-users mailing list