Package: inet.node.mpls


compound module

An LDP-capable router.

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

NodeStatus InterfaceTable Ldp MessageDispatcher Ted LinkStateRouting ITcp IUdp MessageDispatcher Ipv4NetworkLayer MessageDispatcher ILoopbackInterface IPppInterface Mpls LibTable MessageDispatcher

Usage diagram

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


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


Name Value Description
labels node
display i=abstract/router


Name Direction Size Description
pppg [ ] inout

Unassigned submodule parameters

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

TODO @signal, @statistic

interfaceTable.displayAddresses bool false

whether to display IP addresses on links

ldp.interfaceTableModule string

The path to the InterfaceTable module

ldp.routingTableModule string
ldp.libTableModule string
ldp.tedModule string
ted.interfaceTableModule string

The path to the InterfaceTable module

ted.routingTableModule string
linkStateRouting.interfaceTableModule string

The path to the InterfaceTable module

linkStateRouting.routingTableModule string
linkStateRouting.tedModule string
ipv4.configurator.interfaceTableModule string

The path to the InterfaceTable module

ipv4.configurator.routingTableModule string
ipv4.configurator.networkConfiguratorModule string "configurator"

TODO: eventually rename to networkConfigurator

ipv4.configurator.configureRoutingTable bool true

add routing entries to routing table (uses the configurator module)

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.icmp.interfaceTableModule string

The path to the InterfaceTable module

ipv4.icmp.routingTableModule string
ipv4.icmp.crcMode string "declared"
ipv4.ip.interfaceTableModule string

The path to the InterfaceTable module

ipv4.ip.routingTableModule string
ipv4.ip.arpModule string
ipv4.ip.icmpModule string
ipv4.ip.crcMode string "declared"
ipv4.ip.procDelay double 0s
ipv4.ip.timeToLive int 32
ipv4.ip.multicastTimeToLive int 32
ipv4.ip.fragmentTimeout double 60s
ipv4.ip.forceBroadcast bool false
mpls.interfaceTableModule string

The path to the InterfaceTable module

mpls.libTableModule string
libTable.config xml xml("")

table contents to be loaded on startup

Source code

// An LDP-capable router.
// LDP Capable Routers are the main building blocks for an LDP MPLS network.
module LdpMplsRouter
        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 = routerId;
        *.interfaceTableModule = default(absPath(".interfaceTable"));
        *.routingTableModule = default(absPath(".ipv4.routingTable"));
        *.tedModule = default(absPath(".ted"));
        *.libTableModule = default(absPath(".libTable"));
        inout pppg[] @labels(PppFrame-conn);
        status: NodeStatus if hasStatus {
        interfaceTable: InterfaceTable {
        ldp: Ldp {
                holdTime = holdTime;
                helloInterval = helloInterval;
        at: MessageDispatcher {
        ted: Ted {
        linkStateRouting: LinkStateRouting {
                peers = peers;
        tcp: <default(firstAvailable("Tcp","TcpLwip","TcpNsc"))> like ITcp {
        udp: <default(firstAvailable("Udp"))> like IUdp {
        tn: MessageDispatcher {
        ipv4: Ipv4NetworkLayer {
        nm: MessageDispatcher {
        lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
        ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
        mpls: Mpls {
                //peers = peers,
                classifierModule = "^.ldp";
        libTable: LibTable {

        ml: MessageDispatcher {
    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.netwIn;
        mpls.netwOut --> nm.in++;
        mpls.ifOut --> ml.in++;
        ml.out++ --> mpls.ifIn;
File: src/inet/node/mpls/LdpMplsRouter.ned