LdpMplsRouter

Package: inet.node.mpls

LdpMplsRouter

compound module

An LDP-capable router.

LDP Capable Routers are the main building blocks for an LDP MPLS network.

status : NodeStatus

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

Source:
status: NodeStatus if hasStatus {
    @display("p=100,300;is=s");
} interfaceTable : InterfaceTable

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    parameters:
        @display("p=100,100;is=s");
} ldp : Ldp

Handles and processes LDP messages.

Source:
ldp: Ldp {
    parameters:
        holdTime = parent.holdTime;
        helloInterval = parent.helloInterval;
        @display("p=450,80");
} at : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
at: MessageDispatcher {
    parameters:
        @display("p=450,160;b=153,5,,,,1");
} ted : Ted

Traffic Engineering Database.

Source:
ted: Ted {
    parameters:
        @display("p=100,400;is=s");
} linkStateRouting : LinkStateRouting

Implements a very minimalistic link state routing protocol.

Source:
linkStateRouting: LinkStateRouting {
    parameters:
        peers = parent.peers;
        @display("p=900,80");
} tcp : like ITcp

ITcp: Interface for TCP protocol implementations.

Source:
tcp: <default(firstAvailable("Tcp","TcpLwip","TcpNsc"))> like ITcp {
    parameters:
        @display("p=300,200");
} udp : like IUdp

IUdp: UDP protocol interface.

Source:
udp: <default(firstAvailable("Udp"))> like IUdp {
    parameters:
        @display("p=600,200");
} tn : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
tn: MessageDispatcher {
    parameters:
        @display("p=700,240;b=1000,5,,,,1");
} ipv4 : Ipv4NetworkLayer

Network layer of an IPv4 node.

Source:
ipv4: Ipv4NetworkLayer {
    parameters:
        @display("p=500,320");
} nm : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
nm: MessageDispatcher {
    parameters:
        @display("p=700,400;b=1000,5,,,,1");
} lo[numLoInterfaces] : like ILoopbackInterface

LoopbackInterface: Implements a loopback network interface.

ILoopbackInterface: Interface for loopback network interfaces.

Source:
lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
    @display("p=250,640");
} ppp[sizeof(pppg)] : like IPppInterface

PppInterface: Implements a PPP network interface.

IPppInterface: Interface for PPP network interfaces.

Source:
ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
    parameters:
        @display("p=400,640,row,150;q=l2queue");
} mpls : Mpls

Implements the MPLS protocol.

Source:
mpls: Mpls {
    parameters:
        //peers = parent.peers;
        classifierModule = "^.ldp";
        @display("p=500,480");
} libTable : LibTable

Stores the LIB (Label Information Base), accessed by ~Mpls and its associated control protocols...

Source:
libTable: LibTable {
    parameters:
        @display("p=100,200;is=s");
} ml : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
ml: MessageDispatcher {
    parameters:
        @display("p=700,560;b=1000,5,,,,1");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Used in

Name Type Description
LDPTEST network (no description)

Parameters

Name Type Default value Description
hasStatus bool false
holdTime double 15s
helloInterval double 5s
numLoInterfaces int 1
peers string
routerId string "auto"

Properties

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

Gates

Name Direction Size Description
pppg [ ] inout

Unassigned submodule parameters

Name Type Default value Description
status.displayStringTextFormat string ""

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

status.initialStatus string "UP"

TODO @signal, @statistic

interfaceTable.displayStringTextFormat string ""

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

interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

ldp.displayStringTextFormat string ""

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

ldp.interfaceTableModule string

The path to the InterfaceTable module

ldp.routingTableModule string
ldp.libTableModule string
ldp.tedModule string
ldp.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

ldp.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

at.displayStringTextFormat string "processed %p pk (%l)"

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

at.interfaceTableModule string

Module path to the ~InterfaceTable module

at.forwardServiceRegistration bool true
at.forwardProtocolRegistration bool true
at.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

at.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

at.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

ted.displayStringTextFormat string ""

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

ted.interfaceTableModule string

The path to the InterfaceTable module

ted.routingTableModule string

The path to the RoutingTable module

linkStateRouting.displayStringTextFormat string ""

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

linkStateRouting.interfaceTableModule string

The path to the InterfaceTable module

linkStateRouting.routingTableModule string
linkStateRouting.tedModule string
tn.displayStringTextFormat string "processed %p pk (%l)"

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

tn.interfaceTableModule string

Module path to the ~InterfaceTable module

tn.forwardServiceRegistration bool true
tn.forwardProtocolRegistration bool true
tn.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

tn.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

tn.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

ipv4.routingTable.displayStringTextFormat string ""

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

ipv4.routingTable.interfaceTableModule string

The path to the InterfaceTable module

ipv4.routingTable.routerId string "auto"

For routers, the router id using IPv4 address dotted notation; specify "auto" to select the highest interface address; should be left empty ("") for hosts

ipv4.routingTable.netmaskRoutes string "*"

Maintain netmask routes for interfaces

ipv4.routingTable.forwarding bool true

Turns IP forwarding on/off

ipv4.routingTable.multicastForwarding bool false

Turns multicast forwarding on/off

ipv4.routingTable.useAdminDist bool false

Use Cisco-like administrative distances

ipv4.routingTable.routingFile string ""

Routing table file name

ipv4.natTable.displayStringTextFormat string ""

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

ipv4.natTable.networkProtocolModule string "^.ip"
ipv4.natTable.config xml xml("")

XML configuration parameters for network address translation

ipv4.up.displayStringTextFormat string "processed %p pk (%l)"

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

ipv4.up.interfaceTableModule string

Module path to the ~InterfaceTable module

ipv4.up.forwardServiceRegistration bool true
ipv4.up.forwardProtocolRegistration bool true
ipv4.up.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

ipv4.up.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ipv4.up.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

ipv4.icmp.displayStringTextFormat string ""

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

ipv4.icmp.interfaceTableModule string

The path to the InterfaceTable module

ipv4.icmp.routingTableModule string
ipv4.icmp.checksumMode string "declared"
ipv4.icmp.quoteLength int 8B

Number of bytes from original packet to quote in ICMP reply

ipv4.mp.displayStringTextFormat string "processed %p pk (%l)"

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

ipv4.mp.interfaceTableModule string

Module path to the ~InterfaceTable module

ipv4.mp.forwardServiceRegistration bool true
ipv4.mp.forwardProtocolRegistration bool true
ipv4.mp.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

ipv4.mp.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ipv4.mp.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

ipv4.ipsec.displayStringTextFormat string ""

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

ipv4.ipsec.networkProtocolModule string "^.ip"
ipv4.ipsec.interfaceTableModule string
ipv4.ipsec.spdModule string "^.spd"
ipv4.ipsec.sadModule string "^.sad"
ipv4.ipsec.spdConfig xml
ipv4.ipsec.defaultProtection string ""

If not "": value to use where <Protection> element is absent from the configuration

ipv4.ipsec.defaultEspMode string ""

If not "": value to use where <EspMode> element is absent from the configuration

ipv4.ipsec.defaultEncryptionAlg string ""

If not "": value to use where <EncryptionAlg> element is absent from the configuration

ipv4.ipsec.defaultAuthenticationAlg string ""

If not "": value to use where <defaultAuthenticationAlg> element is absent from the configuration

ipv4.ipsec.defaultMaxTfcPadLength int 0

Value to use where <MaxTfcPadLength> element is absent from the configuration

ipv4.ipsec.ahProtectOutDelay double 0.0s
ipv4.ipsec.ahProtectInDelay double 0.0s
ipv4.ipsec.espProtectOutDelay double 0.0s
ipv4.ipsec.espProtectInDelay double 0.0s
ipv4.spd.displayStringTextFormat string ""

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

ipv4.sad.displayStringTextFormat string ""

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

ipv4.lp.displayStringTextFormat string "processed %p pk (%l)"

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

ipv4.lp.interfaceTableModule string

Module path to the ~InterfaceTable module

ipv4.lp.forwardServiceRegistration bool true
ipv4.lp.forwardProtocolRegistration bool true
ipv4.lp.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

ipv4.lp.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ipv4.lp.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

nm.displayStringTextFormat string "processed %p pk (%l)"

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

nm.interfaceTableModule string

Module path to the ~InterfaceTable module

nm.forwardServiceRegistration bool true
nm.forwardProtocolRegistration bool true
nm.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

nm.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

nm.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

mpls.displayStringTextFormat string ""

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

mpls.interfaceTableModule string

The path to the InterfaceTable module

mpls.libTableModule string
libTable.displayStringTextFormat string ""

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

libTable.config xml xml("")

Table contents to be loaded on startup

ml.displayStringTextFormat string "processed %p pk (%l)"

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

ml.interfaceTableModule string

Module path to the ~InterfaceTable module

ml.forwardServiceRegistration bool true
ml.forwardProtocolRegistration bool true
ml.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

ml.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ml.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

Source code

//
// An LDP-capable router.
//
// LDP Capable Routers are the main building blocks for an LDP MPLS network.
//
module LdpMplsRouter
{
    parameters:
        @networkNode();
        @labels(node);
        @display("i=abstract/router");
        bool hasStatus = default(false);
        double holdTime @unit(s) = default(15s);
        double helloInterval @unit(s) = default(5s);
        int numLoInterfaces = default(1);
        string peers;
        string routerId = default("auto");
        *.forwarding = true;
        *.routingTable.routerId = this.routerId;
        *.interfaceTableModule = default(absPath(".interfaceTable"));
        *.routingTableModule = default(absPath(".ipv4.routingTable"));
        *.tedModule = default(absPath(".ted"));
        *.libTableModule = default(absPath(".libTable"));
    gates:
        inout pppg[] @labels(PppFrame-conn);
    submodules:
        status: NodeStatus if hasStatus {
            @display("p=100,300;is=s");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=100,100;is=s");
        }
        ldp: Ldp {
            parameters:
                holdTime = parent.holdTime;
                helloInterval = parent.helloInterval;
                @display("p=450,80");
        }
        at: MessageDispatcher {
            parameters:
                @display("p=450,160;b=153,5,,,,1");
        }
        ted: Ted {
            parameters:
                @display("p=100,400;is=s");
        }
        linkStateRouting: LinkStateRouting {
            parameters:
                peers = parent.peers;
                @display("p=900,80");
        }
        tcp: <default(firstAvailable("Tcp","TcpLwip","TcpNsc"))> like ITcp {
            parameters:
                @display("p=300,200");
        }
        udp: <default(firstAvailable("Udp"))> like IUdp {
            parameters:
                @display("p=600,200");
        }
        tn: MessageDispatcher {
            parameters:
                @display("p=700,240;b=1000,5,,,,1");
        }
        ipv4: Ipv4NetworkLayer {
            parameters:
                @display("p=500,320");
        }
        nm: MessageDispatcher {
            parameters:
                @display("p=700,400;b=1000,5,,,,1");
        }
        lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
            @display("p=250,640");
        }
        ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
            parameters:
                @display("p=400,640,row,150;q=l2queue");
        }
        mpls: Mpls {
            parameters:
                //peers = parent.peers;
                classifierModule = "^.ldp";
                @display("p=500,480");
        }
        libTable: LibTable {
            parameters:
                @display("p=100,200;is=s");
        }

        ml: MessageDispatcher {
            parameters:
                @display("p=700,560;b=1000,5,,,,1");
        }
    connections allowunconnected:
        linkStateRouting.ipOut --> tn.in++;
        tn.out++ --> linkStateRouting.ipIn;

        ldp.socketIn <-- at.out++;
        ldp.socketOut --> at.in++;

        at.out++ --> udp.appIn;
        at.in++ <-- udp.appOut;

        at.out++ --> tcp.appIn;
        at.in++ <-- tcp.appOut;

        udp.ipOut --> tn.in++;
        tn.out++ --> udp.ipIn;

        tcp.ipOut --> tn.in++;
        tn.out++ --> tcp.ipIn;

        for i=0..numLoInterfaces-1 {
            lo[i].upperLayerOut --> nm.in++;
            nm.out++ --> lo[i].upperLayerIn;
        }

        for i=0..sizeof(pppg)-1 {
            pppg[i] <--> ppp[i].phys;

            ppp[i].upperLayerOut --> ml.in++;
            ml.out++ --> ppp[i].upperLayerIn;

        }
        ipv4.transportOut --> tn.in++;
        tn.out++ --> ipv4.transportIn;
        ipv4.ifOut --> nm.in++;
        nm.out++ --> ipv4.ifIn;
        nm.out++ --> mpls.upperLayerIn;
        mpls.upperLayerOut --> nm.in++;
        mpls.lowerLayerOut --> ml.in++;
        ml.out++ --> mpls.lowerLayerIn;
}

File: src/inet/node/mpls/LdpMplsRouter.ned