Step 4a. Enable nextHopSelf on RB1 and RB2¶
Goals¶
Step 4a provides a solution to the unreachable next hop issue observed in Step
4. Within AS 64600, the border routers RB1 and RB2 are configured with the
nextHopSelf attribute enabled for their I-BGP session.
The goal of this configuration is to ensure that when a border router advertises
a route learned from an external peer (E-BGP) to its internal peer (I-BGP), it
updates the NEXT_HOP attribute to its own address. This makes the route
reachable for the internal peer, provided there is internal connectivity (IGP or
direct link) between them.
Configuration¶
This step uses the same network as Step 4 (BGP_Topology_2.ned).
The configuration in omnetpp.ini enables the feature:
*.RA4.bgp.nextHopSelf = true
*.RB1.bgp.nextHopSelf = true
*.RB2.bgp.nextHopSelf = true
*.RC1.bgp.nextHopSelf = true
The BGP configuration uses a specific XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<BGPConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="BGP.xsd">
<TimerParams>
<connectRetryTime> 120 </connectRetryTime>
<holdTime> 180 </holdTime>
<keepAliveTime> 60 </keepAliveTime>
<startDelay> 60 </startDelay>
</TimerParams>
<AS id="64500">
<!--router RA4-->
<Router interAddr="10.0.0.1" />
</AS>
<AS id="64600">
<!--router RB1-->
<Router interAddr="20.0.0.2" >
<Network address='20.0.0.0' />
<Neighbor address='20.0.0.1' nextHopSelf='true' />
</Router>
<!--router RB2-->
<Router interAddr="20.0.0.1" >
<Network address='20.0.0.0' />
<Neighbor address='20.0.0.2' nextHopSelf='true' />
</Router>
</AS>
<AS id="64700">
<!--router RC1-->
<Router interAddr="30.0.0.1" />
</AS>
<!--bi-directional E-BGP session between RA4 and RB1-->
<Session id="1">
<Router exterAddr="192.168.0.6"/>
<Router exterAddr="192.168.0.5"/>
</Session>
<!--bi-directional E-BGP session between RB2 and RC1-->
<Session id="2">
<Router exterAddr="192.168.0.1"/>
<Router exterAddr="192.168.0.2"/>
</Session>
</BGPConfig>
Results¶
With nextHopSelf enabled, the BGP behavior changes as follows:
RB1 receives the RA network (10.0.0.0/30) route from RA4.
When RB1 advertises this route to RB2 via I-BGP, it now replaces RA4’s interface address with its own address (the address of RB1’s interface on the link to RB2).
RB2 receives the advertisement. Since RB1 is directly connected, RB2 can resolve the next hop and successfully installs the route into its IP routing table.
Checking step4a.rt, we can see the successful installation:
RB2 now has routes to RA’s networks (10.0.0.x) with the next hop set to RB1 (
20.0.0.2).Similarly, RB1 now has routes to RC’s networks (30.0.0.x) with the next hop set to RB2 (
20.0.0.1).
Full bi-directional reachability across the transit AS 64600 is now achieved.
Sources: BGP_Topology_2.ned,
omnetpp.ini,
BGPConfig_IBGP_NextHopSelf.xml
Discussion¶
Use this page in the GitHub issue tracker for commenting on this tutorial.