Table Of Contents
Table Of Contents

Step 8. BGP with OSPF and RIP redistribution

Goals

[explanation]

Configuration

This step uses the same network as the previous one.

The configuration in omnetpp.ini is the following:

[Config Step8]
description = "BGP with OSPF and RIP redistribution"
network = BGP_Topology_4

# adding default routes in RA4 and RC1. RIP and OSPF will 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>")

# RIP configuration
*.RA*.hasRip = true
*.RC*.hasRip = true
*.R*.rip.ripConfig = xmldoc("RIPConfig.xml")

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

# BGP configuration
*.RA4.hasBgp = true
*.RB1.hasBgp = true
*.RB4.hasBgp = true
*.RC1.hasBgp = true
*.R*.bgp.bgpConfig = xmldoc("BGPConfig_Redist.xml")
*.R*.bgp.redistributeRip = true
*.R*.bgp.redistributeOspf = "O IA"

# 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>

Discussion

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