Table Of Contents
Table Of Contents

Step 10. LOCAL_PREF Attribute




This step uses the following network:


        configurator: Ipv4NetworkConfigurator {
        visualizer: IntegratedMultiCanvasVisualizer {
        RB1: Router {
        RB2: Router {
        RB3: Router {
        RA: Router {
        switch1: EtherSwitch {
        RC: Router {
        switch2: EtherSwitch {
        RB1.ethg++ <--> Eth100M <--> RB3.ethg++;
        RB2.ethg++ <--> Eth100M <--> RB3.ethg++;
        RA.ethg++ <--> Eth100M <--> RB1.ethg++;
        RA.ethg++ <--> Eth100M <--> RB2.ethg++;
        RC.ethg++ <--> Eth100M <--> RB2.ethg++;
        switch1.ethg++ <--> Eth100M <--> RA.ethg++;
        RC.ethg++ <--> Eth100M <--> switch2.ethg++;

The configuration in omnetpp.ini is the following:

[Config Step10]
description = "LOCAL_PREF Attribute"
network = BGP_LOCAL_PREF

*.configurator.config = xml("<config> \
                                <interface hosts='RA' names='eth0' address='192.168.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RA' names='eth1' address='192.168.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RB1' names='eth1' address='192.168.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RB2' names='eth1' address='192.168.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RB2' names='eth2' address='192.168.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RC' names='eth0' address='192.168.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RA' names='eth2' address='10.x.x.x' netmask='255.x.x.x'/> \
                                <interface among='RB*' address='20.x.x.x' netmask='255.x.x.x'/> \
                                <interface hosts='RC' names='eth1' address='30.x.x.x' netmask='255.x.x.x'/> \

# OSPF configuration
*.RB*.hasOspf = true
*.RB*.ospf.ospfConfig = xmldoc("OSPFConfig_LOCAL_PREF.xml")

*.R*.hasBgp = true
*.R*.bgp.bgpConfig = xmldoc("BGPConfig_LOCAL_PREF.xml")

*.visualizer.routingTableVisualizer[1].displayRoutingTables = false
#*.visualizer.routingTableVisualizer[*].lineShift = 80
*.visualizer.routingTableVisualizer[*].destinationFilter = "*"
*.visualizer.routingTableVisualizer[*].lineColor = "black"

The BGP configuration:

<?xml version="1.0" encoding="ISO-8859-1"?>
<BGPConfig xmlns:xsi="" xsi:schemaLocation="BGP.xsd">

        <connectRetryTime> 120 </connectRetryTime>
        <holdTime>         180 </holdTime>
        <keepAliveTime>    60  </keepAliveTime>
        <startDelay>       50  </startDelay>   <!--long enough for the intra-AS routing protocol to converge-->

    <AS id="64500">
    	<!--router RA-->
        <Router interAddr="">
            <Network address='' />
    <AS id="64600">
    	<!--router RB1-->
        <Router interAddr="">
            <Neighbor address='' nextHopSelf='true' />
            <Neighbor address='' nextHopSelf='true' localPreference='100' />
        <!--router RB2-->
        <Router interAddr="">
            <Neighbor address='' nextHopSelf='true' />
            <Neighbor address='' nextHopSelf='true' localPreference='600' />
        <!--router RB3-->
        <Router interAddr=""/>

    <AS id="64700">
    	<!--router RC1-->
        <Router interAddr=""/>

    <!--bi-directional E-BGP session between RA and RB1-->
    <Session id="1">
        <Router exterAddr=""/>
        <Router exterAddr=""/>
    <!--bi-directional E-BGP session between RA and RB2-->
    <Session id="2">
        <Router exterAddr=""/>
        <Router exterAddr=""/>
    <!--bi-directional E-BGP session between RC and RB2-->
    <Session id="3">
        <Router exterAddr=""/>
        <Router exterAddr=""/>



Use this page in the GitHub issue tracker for commenting on this tutorial.