Bgp

Package: inet.routing.bgpv4

Bgp

simple module

C++ definition

Implements BGP Version 4 routing protocol.

The bgpConfig parameter can specify an XML file describing the configuration of all BGP routers and their interfaces in the network.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Used in compound modules

Name Type Description
BGPRouterEx compound module

Example IP router with BGPv4 and OSPFv4 support.

BGPRouterSimple compound module

Example Ipv4 router with BGPv4 support.

Extends

Name Type Description
SimpleModule simple module

Base module for all INET simple modules.

Parameters

Name Type Default value Description
displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

interfaceTableModule string
routingTableModule string
ospfRoutingModule string
startupTime double 0s

Delay before starting BGP

bgpConfig xml
ExternalPeerStartDelayOffset double 0.5s
redistributeRip bool false

Redistribute routes learned by RIP into BGP

redistributeOspf string ""

Redistribute routes learned by OSPF into BGP (O IA E1 E2)

redistributeInternal bool false

Redistribute BGP routes into OSPF (as external routes)

nextHopSelf bool false
localPreference int 100
connectedCheck bool true
ebgpMultihop int 1

Properties

Name Value Description
class Bgp
display i=block/network2
selfMessageKinds inet::bgp::BgpSelfMsgKind

Gates

Name Direction Size Description
socketIn input
socketOut output

Source code

//
// Implements BGP Version 4 routing protocol.
//
// The `bgpConfig` parameter can specify an XML file describing the
// configuration of all BGP routers and their interfaces in the network.
//
//# TODO config file!
//
simple Bgp extends SimpleModule like IBgp
{
    parameters:
        @class(Bgp);
        string interfaceTableModule;
        string routingTableModule;
        string ospfRoutingModule;
        volatile double startupTime @unit(s) = default(0s); // Delay before starting BGP
        xml bgpConfig;
        double ExternalPeerStartDelayOffset @unit(s) = default(0.5s);
        bool redistributeRip = default(false);        // Redistribute routes learned by RIP into BGP
        string redistributeOspf = default("");        // Redistribute routes learned by OSPF into BGP (O IA E1 E2)
        bool redistributeInternal = default(false);   // Redistribute BGP routes into OSPF (as external routes)
        bool nextHopSelf = default(false);
        int localPreference = default(100);
        bool connectedCheck = default(true);
        int ebgpMultihop = default(1);
        @display("i=block/network2");
        @selfMessageKinds(inet::bgp::BgpSelfMsgKind);
    gates:
        input socketIn @messageKinds(inet::TcpStatusInd);
        output socketOut @messageKinds(inet::TcpCommandCode);
}

File: src/inet/routing/bgpv4/Bgp.ned