Step 6. BGP Scenario and using loopbacks¶
Goals¶
[explanation]
Configuration¶
This step uses the following network:
network BGP_Topology_4
{
@display("bgb=1328.6062,594.495");
submodules:
configurator: Ipv4NetworkConfigurator {
@display("p=93,44");
}
visualizer: IntegratedMultiCanvasVisualizer {
@display("p=243.2025,43.536247");
}
RB2: Router {
@display("p=660.55,132.11");
}
RB3: Router {
@display("p=660.55,223.68625");
}
RB4: Router {
@display("p=765.6375,181.65125");
}
RC1: Router {
@display("p=974.3112,385.82123");
}
RC2: Router {
@display("p=1065.8875,336.28");
}
RC3: Router {
@display("p=1065.8875,435.3625");
}
RB1: Router {
@display("p=556.96375,181.65125");
}
RA4: Router {
@display("p=349.79123,400.83374");
}
RA2: Router {
@display("p=244.70375,342.285");
}
RA3: Router {
@display("p=244.70375,442.86874");
}
RA1: Router {
@display("p=153.1275,393.32748");
}
RC4: Router {
@display("p=1151.4587,385.82123");
}
switch1: EtherSwitch {
@display("p=54.045,391.82623");
}
switch2: EtherSwitch {
@display("p=244.70375,250.70874");
}
switch3: EtherSwitch {
@display("p=244.70375,534.445");
}
switch4: EtherSwitch {
@display("p=660.55,33.0275");
}
switch5: EtherSwitch {
@display("p=660.55,315.26248");
}
switch6: EtherSwitch {
@display("p=1065.8875,237.1975");
}
switch7: EtherSwitch {
@display("p=1065.8875,519.4325");
}
switch8: EtherSwitch {
@display("p=1261.0499,382.81876");
}
host0: StandardHost {
@display("p=53.28,251.415");
}
host1: StandardHost {
@display("p=1260.405,251.415");
}
connections:
RB2.ethg++ <--> Eth100M <--> RB4.ethg++;
RB3.ethg++ <--> Eth100M <--> RB4.ethg++;
RC1.ethg++ <--> Eth100M <--> RC2.ethg++;
RC1.ethg++ <--> Eth100M <--> RC3.ethg++;
RB4.ethg++ <--> Eth100M <--> RC1.ethg++;
RB1.ethg++ <--> Eth100M <--> RB2.ethg++;
RB1.ethg++ <--> Eth100M <--> RB3.ethg++;
RB1.ethg++ <--> Eth100M <--> RA4.ethg++;
RA4.ethg++ <--> Eth100M <--> RA2.ethg++;
RA3.ethg++ <--> Eth100M <--> RA4.ethg++;
RA2.ethg++ <--> Eth100M <--> RA1.ethg++;
RA1.ethg++ <--> Eth100M <--> RA3.ethg++;
RC4.ethg++ <--> Eth100M <--> RC2.ethg++;
RC3.ethg++ <--> Eth100M <--> RC4.ethg++;
switch1.ethg++ <--> Eth100M <--> RA1.ethg++;
RA2.ethg++ <--> Eth100M <--> switch2.ethg++;
RA3.ethg++ <--> Eth100M <--> switch3.ethg++;
RB2.ethg++ <--> Eth100M <--> switch4.ethg++;
RB3.ethg++ <--> Eth100M <--> switch5.ethg++;
RC2.ethg++ <--> Eth100M <--> switch6.ethg++;
RC3.ethg++ <--> Eth100M <--> switch7.ethg++;
RC4.ethg++ <--> Eth100M <--> switch8.ethg++;
switch1.ethg++ <--> Eth100M <--> host0.ethg++;
switch8.ethg++ <--> Eth100M <--> host1.ethg++;
}
The configuration in omnetpp.ini
is the following:
[Config Step6]
description = "BGP Scenario and using loopbacks"
network = BGP_Topology_4
# adding default routes in RA4 and RC1 and ask OSPF to distribute it within the AS
*.configurator.config = xml("<config> \
<interface hosts='RA4' names='eth0' address='192.168.x.x' netmask='255.x.x.x'/> \
<interface hosts='RB1' names='eth2' address='192.168.x.x' netmask='255.x.x.x'/> \
<interface hosts='RB4' names='eth2' address='192.168.x.x' netmask='255.x.x.x'/> \
<interface hosts='RC1' names='eth2' address='192.168.x.x' netmask='255.x.x.x'/> \
\
<interface among='host0 RA*' address='10.x.x.x' netmask='255.x.x.x'/> \
<interface hosts='RA*' address='10.x.x.x' netmask='255.x.x.x'/> \
\
<interface hosts='RB*' address='20.x.x.x' netmask='255.x.x.x'/> \
\
<interface among='host1 RC*' address='30.x.x.x' netmask='255.x.x.x'/> \
<interface hosts='RC*' address='30.x.x.x' netmask='255.x.x.x'/> \
\
<route hosts='host*' destination='*' netmask='0.0.0.0' interface='eth0' /> \
\
<route hosts='RA4' destination='*' netmask='0.0.0.0' interface='eth0' /> \
<route hosts='RC1' destination='*' netmask='0.0.0.0' interface='eth2' /> \
</config>")
# OSPF configuration
*.R*.hasOspf = true
*.R*.ospf.ospfConfig = xmldoc("OSPFConfig.xml")
*.RA4.ipv4.routingTable.routerId = "10.0.0.5"
*.RC1.ipv4.routingTable.routerId = "30.0.0.5"
*.RB1.ipv4.routingTable.routerId = "20.0.0.18"
*.RB4.ipv4.routingTable.routerId = "20.0.0.14"
# BGP configuration
*.RA4.hasBgp = true
*.RB1.hasBgp = true
*.RB4.hasBgp = true
*.RC1.hasBgp = true
*.R*.bgp.bgpConfig = xmldoc("BGPConfig_Redist.xml")
*.R*.bgp.redistributeOspf = "O IA"
# BGP routes are distributed internally within the AS
#*.RB1.bgp.redistributeInternal = true
#*.RB4.bgp.redistributeInternal = true
# enable BGP on RB2 and RB3
*.RB2.hasBgp = true
*.RB3.hasBgp = true
The BGP configuration:
<?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> 50 </startDelay> <!--long enough for the intra-AS routing protocol to converge-->
</TimerParams>
<AS id="64500">
<!--router RA4-->
<Router interAddr="10.0.0.1"/>
</AS>
<AS id="64600">
<!--router RB1-->
<Router interAddr="20.0.0.6">
<Neighbor address='20.0.0.5' nextHopSelf='true' />
<Neighbor address='20.0.0.2' nextHopSelf='true' />
<Neighbor address='20.0.0.17' nextHopSelf='true' />
</Router>
<!--router RB4-->
<Router interAddr="20.0.0.2">
<Neighbor address='20.0.0.6' nextHopSelf='true' />
<Neighbor address='20.0.0.5' nextHopSelf='true' />
<Neighbor address='20.0.0.17' nextHopSelf='true' />
</Router>
<!--router RB2-->
<Router interAddr="20.0.0.5"/>
<!--router RB3-->
<Router interAddr="20.0.0.17"/>
</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.5"/>
<Router exterAddr="192.168.0.6"/>
</Session>
<!--bi-directional E-BGP session between RB4 and RC1-->
<Session id="2">
<Router exterAddr="192.168.0.1"/>
<Router exterAddr="192.168.0.2"/>
</Session>
</BGPConfig>
Results¶
[explanation]
Sources: BGP_Topology_4.ned
,
omnetpp.ini
,
OSPFConfig.xml
BGPConfig_Redist.xml