Step 23. OSPF Path Selection¶
Goals¶
[explanation]
Configuration¶
This step uses the following network:
network OSPF_Route_Selection
{
@display("bgb=506.016,497.98398");
types:
channel PppLink100M extends DatarateChannel
{
delay = 5us;
datarate = 100Mbps;
}
submodules:
configurator: Ipv4NetworkConfigurator {
@display("p=65,38");
}
visualizer: IntegratedCanvasVisualizer {
@display("p=187,38");
}
scenarioManager: ScenarioManager {
@display("p=324,38");
}
R1: Router {
@display("p=447.784,290.156");
}
R2: Router {
@display("p=236.944,140.56");
}
R3: Router {
@display("p=236.944,240.95999");
}
R4: Router {
@display("p=236.944,343.36798");
}
R5: Router {
@display("p=236.944,448.788");
}
switch2: EtherSwitch {
@display("p=64.256,137.54799");
}
switch4: EtherSwitch {
@display("p=64.256,340.356");
}
switch5: EtherSwitch {
@display("p=64.256,445.776");
}
R6: Router {
@display("p=64.256,240.95999");
}
connections:
R2.pppg++ <--> PppLink100M <--> R1.pppg++;
R1.pppg++ <--> PppLink100M <--> R3.pppg++;
R1.pppg++ <--> PppLink100M <--> R4.pppg++;
R1.pppg++ <--> PppLink100M <--> R5.pppg++;
switch2.ethg++ <--> Eth100M <--> R2.ethg++;
switch4.ethg++ <--> Eth100M <--> R4.ethg++;
switch5.ethg++ <--> Eth100M <--> R5.ethg++;
R3.pppg++ <--> PppLink100M <--> R6.pppg++;
}
The configuration in omnetpp.ini
is the following:
[Config Step23]
description = "OSPF Path Selection"
network = OSPF_Route_Selection
*.configurator.config = xml("<config> \
<interface hosts='R2' names='eth0' address='1.1.1.1' netmask='255.255.255.0' /> \
<interface hosts='R3' names='ppp1' address='1.1.1.1' netmask='255.255.255.0' /> \
<interface hosts='R6' names='ppp0' address='1.1.1.2' netmask='255.255.255.0' /> \
<interface hosts='R4' names='eth0' address='1.1.1.1' netmask='255.255.255.0' /> \
<interface hosts='R5' names='eth0' address='1.1.1.1' netmask='255.255.255.0' /> \
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x' /> \
</config>")
*.configurator.assignUniqueAddresses = false
*.configurator.assignDisjunctSubnetAddresses = false
*.R*.ospf.ospfConfig = xmldoc("ASConfig_Route_Selection.xml")
*.*.hasStatus = true
*.scenarioManager.script = xml("<scenario> \
<disconnect t='60' src-module='R1' dest-module='R2' /> \
<disconnect t='70' src-module='R1' dest-module='R3' /> \
</scenario>")
The OSPF configuration:
<?xml version="1.0"?>
<OSPFASConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="OSPF.xsd">
<!-- Areas -->
<Area id="0.0.0.1">
<AddressRange address="R3>R6" mask="R3>R6" />
<AddressRange address="R6>R3" mask="R6>R3" />
</Area>
<!-- Routers -->
<Router name="R1" RFC1583Compatible="true">
<PointToPointInterface ifName="ppp0" />
<PointToPointInterface ifName="ppp1" />
<PointToPointInterface ifName="ppp2" />
<PointToPointInterface ifName="ppp3" />
</Router>
<Router name="R2" RFC1583Compatible="true">
<PointToPointInterface ifName="ppp0" />
<BroadcastInterface ifName="eth0" areaID="0.0.0.0" />
</Router>
<Router name="R3" RFC1583Compatible="true">
<PointToPointInterface ifName="ppp0" />
<PointToPointInterface ifName="ppp1" areaID="0.0.0.1" />
</Router>
<Router name="R4" RFC1583Compatible="true">
<PointToPointInterface ifName="ppp0" />
<ExternalInterface ifName="eth0" advertisedExternalNetworkAddress="1.1.1.1" advertisedExternalNetworkMask="255.255.255.0" externalInterfaceOutputCost="10" externalInterfaceOutputType="Type1" />
</Router>
<Router name="R5" RFC1583Compatible="true">
<PointToPointInterface ifName="ppp0" />
<ExternalInterface ifName="eth0" advertisedExternalNetworkAddress="1.1.1.1" advertisedExternalNetworkMask="255.255.255.0" externalInterfaceOutputCost="2" externalInterfaceOutputType="Type2" />
</Router>
<Router name="R6" RFC1583Compatible="true">
<PointToPointInterface ifName="ppp0" areaID="0.0.0.1" />
</Router>
</OSPFASConfig>