In this post, I handled the External BGP routing. In this part, I will address Internal BGP routing which is working on the same AS number. This is the my environment

Top of the hosts will be the router as reflector. And the others are reflector-client. For this senario, I will set up the internal BGP routing between "router-reflector and router-reflector-client"

 

1. Configure Internal BGP routing.

Host #1 (Top)

Host #2 (Left bottom)

Host #3 (Right bottom)

protocol direct {

#        interface "*";

        interface "ens5";

}

protocol bgp tohost1{

        import all;

        export all;

        local as 65001;

        neighbor 10.10.0.159 as 65001;

}

protocol bgp tohost2{

        import all;

        export all;

        local as 65001;

        neighbor 10.10.0.205 as 65001;

}

protocol direct {

#        interface "*";

        interface "ens5";

}

protocol static static_bgp {

        route 1.1.1.1:255.255.255.255 via 10.10.0.159;

        route 1.1.1.2:255.255.255.255 via 10.10.0.159;

}

protocol bgp {

        import all;

        export where proto = "static_bgp";

        local as 65001;

        neighbor 10.10.0.49 as 65001;

}

protocol direct {

#        interface "*";

        interface "ens5";

}


protocol static static_bgp {

        route 2.2.2.1:255.255.255.255 via 10.10.0.205;

        route 2.2.2.2:255.255.255.255 via 10.10.0.205;

}

protocol bgp {

        import all;

        export where proto = "static_bgp";

        local as 65001;

        neighbor 10.10.0.49 as 65001;

}

In these configuration, there is something important. "Protocol direct" option is necessary value for this internal BGP routing protocol. Without this option, I can see the result like below. "Unreachable" is shown.

bird> show route

1.1.1.1/32         unreachable [bgp1 13:45:49 from 10.10.0.159] * (100/-) [i]

1.1.1.2/32         unreachable [bgp1 13:45:49 from 10.10.0.159] * (100/-) [i]

With this option, I can see the correct routing table with "birdc" command

bird> show route

1.1.1.1/32         via 10.10.0.159 on ens5 [tohost1 15:10:46] * (100/0) [i]

2.2.2.2/32         via 10.10.0.205 on ens5 [tohost2 15:10:47] * (100/0) [i]

1.1.1.2/32         via 10.10.0.159 on ens5 [tohost1 15:10:46] * (100/0) [i]

2.2.2.1/32         via 10.10.0.205 on ens5 [tohost2 15:10:47] * (100/0) [i]

10.10.0.0/24       dev ens5 [direct1 15:10:42] * (240)

bird> 

 

2. Configure Router Reflector 

 

Now I will edit the TOP host to work as the router. It is simple. I insert the "rr client" option into the BGP configuration like below.

protocol direct {
#        interface "*";
        interface "ens5";
}

protocol bgp tohost1{
        import all;
        export all;
        rr client;
        local as 65001;
        neighbor 10.10.0.159 as 65001;
}

protocol bgp tohost2{
        import all;
        export all;
        rr client;
        local as 65001;
        neighbor 10.10.0.205 as 65001;
}

After then, I can see the routing table on Host #1 and Host #2

Host #1

Host #2

root@ip-10-10-0-159:~# birdc

BIRD 1.6.8 ready.

bird> show route

1.1.1.1/32         via 10.10.0.159 on ens5 [static_bgp 15:17:59] ! (200)

2.2.2.2/32         via 10.10.0.205 on ens5 [bgp1 15:18:03 from 10.10.0.49] * (100/0) [i]

1.1.1.2/32         via 10.10.0.159 on ens5 [static_bgp 15:17:59] ! (200)

2.2.2.1/32         via 10.10.0.205 on ens5 [bgp1 15:18:03 from 10.10.0.49] * (100/0) [i]

10.10.0.0/24       dev ens5 [direct1 15:17:59] * (240)

                   via 10.10.0.49 on ens5 [bgp1 15:18:03] (100/0) [i]

root@ip-10-10-0-205:~# birdc

BIRD 1.6.8 ready.

bird> show route

2.2.2.2/32         via 10.10.0.205 on ens5 [static_bgp 15:23:13] * (200)

1.1.1.1/32         via 10.10.0.159 on ens5 [bgp1 15:23:17 from 10.10.0.49] * (100/0) [i]

2.2.2.1/32         via 10.10.0.205 on ens5 [static_bgp 15:23:13] * (200)

1.1.1.2/32         via 10.10.0.159 on ens5 [bgp1 15:23:17 from 10.10.0.49] * (100/0) [i]

10.10.0.0/24       dev ens5 [direct1 15:23:13] * (240)

                   via 10.10.0.49 on ens5 [bgp1 15:23:17] (100/0) [i]

Now I can send ICMP each other.

Host #1 Host #2

Now I can use the Internal BGP and Router Reflector option.

 

Reference 

[ 1 ] https://createnetech.tistory.com/52?category=679927

[ 2 ] https://saidvandeklundert.net/2015-06-14-bird-bgp-route-reflection/ 

[ 3 ] www.bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.3

 

+ Recent posts