Let's test BGP reflection with bgpsim
Back to Top
To reach a broader audience, this article has been translated from Japanese.
You can find the original version here.
Introduction
#This is Yamashita from the Business Solutions Division.
In the previous article, I wrote about BGP—a protocol used for network path discovery—and bgpsim, a tool that allows you to verify BGP in your browser.
This time, as a continuation, I plan to implement and test a pattern known as the "route reflector," which simplifies the establishment of BGP peers even further, on bgpsim.
Review of BGP and bgpsim
#Here, I will briefly review BGP and bgpsim. For a more detailed overview, please refer to the previous article.
BGP is a protocol used by devices to discover communication paths. It can search for routes outside an Autonomous System.
bgpsim is a simulator that allows you to verify BGP in your browser, as briefly introduced in the previous article.
What is Route Reflection?
#Overhead of Fully Mesh iBGP
#Normally, if you want to apply BGP-based path discovery to BGP speakers (routers) within an AS, a full mesh configuration is required, where iBGP sessions are established between every pair of routers.
Below is an illustration of establishing iBGP sessions between every pair of 5 BGP speakers to create a full mesh of sessions.
For example, if there were 10 BGP speakers, you would need to set up as many as BGP sessions.
In this arrangement, if additional BGP speakers are added, a BGP peer must be established with every existing router.
To solve this issue, a standard known as route reflection was formulated.
Route Reflection
#As mentioned earlier, Route Reflection is a standard defined to eliminate the need to build a full mesh of iBGP sessions [1].
If you interpret route reflection literally, it means to "reflect a route."
More precisely, route reflection refers to the mechanism by which a specific router propagates learned routes to other routers.
For understanding route reflection, the two key terms you need to know are:
- Route Reflector: The router that reflects routes learned by other routers.
- Client: A router that receives route information from the route reflector.
Now, let's test this using bgpsim.
Implementation in bgpsim
#Defining BGP Speakers and eBGP
#First, place four Internal Routers and a single External Router as shown below.
Next, establish the physical connections. As an example, define the connections as follows.
As long as all routers are connected in some way, any configuration is acceptable.
After that, simply establish an eBGP session from the External Router, and the initial setup is complete.
Set the Prefix and AS Path as shown below [2].
Check the Data Plane view and ensure that route discovery is enabled only from routers adjacent to the External Router; this completes the initial setup.
Creating a Full Mesh iBGP
#First, let's aim to discover routes from every router without using BGP route reflection.
Similar to building an eBGP session, right-click on any router and select "Add iBGP Session."
Establishing a total of 6 iBGP sessions among the 4 routers will enable BGP route discovery from every router.
Switch the view to BGP Config and confirm that a full mesh of BGP sessions has been established.
Then, when you switch the view to Data Plane, you can confirm that the best route to destinations outside the AS is discovered from each router.
Using BGP Route Reflection
#Now, let's create the same scenario using BGP route reflection.
For now, revert to the state before establishing a full mesh of iBGP sessions.
First, choose one specific Internal Router to act as the route reflector.
In this example, the BGP speaker highlighted in blue in the diagram below is selected as the route reflector.
Right-click on the router currently chosen as the route reflector and select "Add iBGP Client."
Then, clicking on another router creates a pair between the route reflector and the client. It is represented by an arrow extending from the route reflector to the client.
Similarly, define the other routers as clients of the route reflector. When you switch the view to BGP Config, it should appear as follows.
Switching the view to Data Plane confirms that BGP route discovery is functioning just as it did with the full mesh iBGP configuration.
Although this is all within a simulator, it has been confirmed that utilizing route reflection allows for the use of BGP with an even simpler configuration.
By the way, setting a different router as the route reflector will produce the same result.
Summary
#In this article, as a continuation of the previous one, I explained BGP route reflection, which enables a more efficient establishment of BGP peers.
Personally, having been involved more in applications, I found the BGP protocol to be quite daunting.
However, through the simulator introduced in this article, I was able to gain a better understanding of BGP. I encourage anyone interested to give it a try.