BGPRouter

Package: inet.node.bgp

BGPRouter

compound module

IP router with BGPv4 and OSPFv4 support.

status : NodeStatus

Keeps track of the status of network node (up, down, etc.) for other modules, and also displays it...

Source:
status: NodeStatus if hasStatus {
    @display("p=50,50");
} energyStorage : like IEnergyStorage

IEnergyStorage: The energy storage models describe devices that absorb energy produced by generators, and provide...

Source:
energyStorage: <energyStorageType> like IEnergyStorage if energyStorageType != "" {
    parameters:
        @display("p=50,100;i=block/plug;is=s");
} energyManagement : like IEnergyManagement

IEnergyManagement: The energy management models monitors an energy storage, estimates its state, and controls the...

Source:
energyManagement: <energyManagementType> like IEnergyManagement if energyManagementType != "" {
    parameters:
        @display("p=50,125;i=block/plug;is=s");
} energyGenerator : like IEnergyGenerator

IEnergyGenerator: The energy generator models describe the energy generation process of devices over time.

Source:
energyGenerator: <energyGeneratorType> like IEnergyGenerator if energyGeneratorType != "" {
    parameters:
        @display("p=50,150;i=block/plug;is=s");
} mobility : like IMobility

IMobility: The module interface for mobility models.

Source:
mobility: <mobilityType> like IMobility if mobilityType != "" {
    parameters:
        @display("p=53,200");
} networkLayer : like INetworkLayer

INetworkLayer: This module interface provides an abstraction for the upper and lower interfaces of different...

Source:
networkLayer: <networkLayerType> like INetworkLayer {
    parameters:
        @display("p=329,287;q=queue");
} routingTable : like IRoutingTable

IRoutingTable: This module interface provides an abstraction for different routing tables.

Source:
routingTable: <routingTableType> like IRoutingTable if routingTableType != "" {
    parameters:
        @display("p=53,250;is=s");
} interfaceTable : InterfaceTable

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    parameters:
        @display("p=53,300;is=s");
} pcapRecorder[numPcapRecorders] : PcapRecorder

Records PCAP traces of frames sent/received by other modules within the same host.

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    @display("p=53,350,r,10");
} lo0 : LoopbackInterface

Loopback interface.

Source:
lo0: LoopbackInterface {
    @display("p=78,406");
} wlan[numRadios] : like IWirelessNic

Ieee80211Nic: This NIC implements an 802.11 network interface card.

Source:
wlan[numRadios]: <default("Ieee80211Nic")> like IWirelessNic {
    parameters:
        @display("p=216,406,row,60;q=queue");
} eth[sizeof(ethg)] : like IWiredNic

EthernetInterface: Ethernet network interface.

IWiredNic: Prototype module for link layer protocols.

Source:
eth[sizeof(ethg)]: <default("EthernetInterface")> like IWiredNic {
    parameters:
        @display("p=368,406,row,60;q=txQueue");
} ppp[sizeof(pppg)] : like IWiredNic

PPPInterface: PPP interface.

IWiredNic: Prototype module for link layer protocols.

Source:
ppp[sizeof(pppg)]: <default("PPPInterface")> like IWiredNic {
    parameters:
        @display("p=558,406,row,60;q=txQueue");
} ext[numExtInterfaces] : like IExternalNic

ExtInterface: Implements an interface that corresponds to a real interface on the host running the simulation.

Source:
ext[numExtInterfaces]: <default("ExtInterface")> like IExternalNic {
    parameters:
        @display("p=149,406,row,10;q=txQueue;i=block/ifcard");
} tun[numTunInterfaces] : like ITunNic

Source:
tun[numTunInterfaces]: <default("TunInterface")> like ITunNic {
    parameters:
        @display("p=213,406,row,10;q=txQueue;i=block/ifcard");
} ospf : like IIPRouting

OSPFRouting: Implements the OSPFv4 routing protocol.

IIPRouting: Interface for routing protocol modules connected to IP Layer.

Source:
ospf: <"OSPFRouting"> like IIPRouting if hasOSPF {
    parameters:
        @display("p=465,287,row");
} bgp : like IBGPRouting

BGPRouting: Implements BGP Version 4.

IBGPRouting: Interface for BGP routing module.

Source:
bgp: <"BGPRouting"> like IBGPRouting if hasBGP {
    parameters:
        ospfRoutingModule = default(parent.hasOSPF ? "^.ospf" : "");
        @display("p=214,80;i=block/network");
} tcp : like ITCP

ITCP: Interface for TCP protocol implementations.

Source:
tcp: <tcpType> like ITCP if hasBGP && tcpType != "" {
    parameters:
        @display("p=214,180;i=block/transport");
} rip : like IUDPApp

RIPRouting: Routing Information Protocol.

IUDPApp: Template for UDP applications.

Source:
rip: <"RIPRouting"> like IUDPApp if hasRIP {
    parameters:
        @display("p=404,80");
} dhcp : like IUDPApp

DHCPServer: Implements the DHCP server protocol.

IUDPApp: Template for UDP applications.

Source:
dhcp: <"DHCPServer"> like IUDPApp if hasDHCP {
    parameters:
        @display("p=566,80");
} udp : like IUDP

IUDP: UDP protocol interface.

Source:
udp: <udpType> like IUDP if hasRIP || hasDHCP {
    @display("p=404,180");
} pim : like IPIMRouting

Source:
pim: <"PIMRouting"> like IPIMRouting if hasPIM {
    @display("p=175,287");
}

Inheritance diagram

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

Extends

Name Type Description
Router compound module

IPv4 router that supports wireless, Ethernet, PPP and external interfaces. By default, no wireless and external interfaces are added; the number of Ethernet and PPP ports depends on the external connections.

Parameters

Name Type Default value Description
hasStatus bool false
numExtInterfaces int 0
numRadios int 0

the number of radios in the router. by default no wireless

numPcapRecorders int 0

no of PcapRecorders.

numTunInterfaces int 0
osgModel string ""

3D model for OSG visualization, no 3D model by default

osgModelColor string ""

tint color, no colorization by default

mobilityType string numRadios > 0 ? "StationaryMobility" : ""
networkLayerType string "IPv4NetworkLayer"
routingTableType string "IPv4RoutingTable"
forwarding bool true
multicastForwarding bool false
energyStorageType string ""
energyManagementType string ""
energyGeneratorType string ""
hasOSPF bool true
hasRIP bool false
hasBGP bool true
hasPIM bool false
hasDHCP bool false
tcpType string firstAvailableOrEmpty("TCP", "TCP_lwIP", "TCP_NSC")

tcp implementation (e.g. TCP, TCP_lwIP, TCP_NSC) or TCPSpoof

udpType string "UDP"

Properties

Name Value Description
display i=abstract/router
networkNode
labels node

Gates

Name Direction Size Description
radioIn [ ] input numRadios
pppg [ ] inout
ethg [ ] inout

Unassigned submodule parameters

Name Type Default value Description
status.initialStatus string "UP"

TODO @signal, @statistic

routingTable.forwarding bool
routingTable.multicastForwarding bool
interfaceTable.displayAddresses bool false

whether to display IP addresses on links

pcapRecorder.verbose bool false

whether to log packets on the module output

pcapRecorder.pcapFile string ""

the PCAP file to be written

pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

lo0.lo.mtu int 4470B
bgp.interfaceTableModule string

The path to the InterfaceTable module

bgp.routingTableModule string
bgp.ospfRoutingModule string parent.hasOSPF ? "^.ospf" : ""
bgp.dataTransferMode string

Source code

//
// IP router with BGPv4 and OSPFv4 support.
//
module BGPRouter extends Router
{
    parameters:
        hasBGP = true;
        hasOSPF = true;
}

File: src/inet/node/bgp/BGPRouter.ned