Ualcmp

Package: simu5g.mec.ualcmp

Ualcmp

compound module

Represents a host performing the functions of the User Application Lifecycle Management Proxy (UALCMP) defined by the ETSI Multi-access Edge Computing (MEC) specifications. It includes a complete network protocol stack and a UalcmpApp application module that implements the logic of the UALCMP entity. It is typically connected directly to a MEC orchestrator, and forwards to it the creation and deletion requests from the Device App modules of User Equipment. It can be configured to receive packets from a real, external Device App application via the external Ethernet interface submodule.

interfaceTable : InterfaceTable
[from inet] ↗

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    @display("p=61,74;is=s");
} pppIf : PppInterface
[from inet] ↗

This module implements a PPP network interface.

Source:
pppIf: PppInterface {
    @display("p=446,506");
} extEth[numExtEthInterfaces] : like IEthernetInterface

IEthernetInterface [from inet] ↗: This module interface is implemented by Ethernet network interfaces.

Source:
extEth[numExtEthInterfaces]: <default("ExtLowerEthernetInterface")> like IEthernetInterface {
    parameters:
        @display("p=641,506,row,150;q=txQueue");
} ipv4 : like INetworkLayer

Ipv4NetworkLayer [from inet] ↗: Network layer of an IPv4 node.

INetworkLayer [from inet] ↗

Source:
ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 {
    parameters:
        @display("p=420,372;q=queue");
} ipv6 : like INetworkLayer

Ipv6NetworkLayer [from inet] ↗: Represents an IPv6 network layer (L3).

INetworkLayer [from inet] ↗

Source:
ipv6: <default("Ipv6NetworkLayer")> like INetworkLayer if hasIpv6 {
    parameters:
        @display("p=657,374;q=queue");
}

        //#
        //# Transport layer modules and corresponding application modules
        //#
		// =============== UDP ============== // ualcmpApp : UalcmpApp

Implements (part of) the Mx2 reference point defined by the ETSI GS MEC 016 V2.2.1 (2020-04)...

Source:
ualcmpApp: UalcmpApp {
                    // hostname of the reference orchestrator
    mecOrchestratorHostname = parent.mecOrchestratorHostname;
    @display("p=549,74,row");
} udp : Udp
[from inet] ↗

UDP protocol implementation, for IPv4 (~Ipv4) and IPv6 (~Ipv6).

Source:
udp: Udp {
    @display("p=460,217");
} tcp : Tcp
[from inet] ↗

TCP protocol implementation.

Source:
tcp: Tcp {
    @display("p=627,217");
} at : MessageDispatcher
[from inet] ↗

This module connects multiple applications, protocols and interfaces with each other and...

Source:
at: MessageDispatcher {
    parameters:
        @display("p=550,146;b=600,5,,,,1");
} tn : MessageDispatcher
[from inet] ↗

This module connects multiple applications, protocols and interfaces with each other and...

Source:
tn: MessageDispatcher {
    parameters:
        @display("p=550,300;b=600,5,,,,1");
} nl : MessageDispatcher
[from inet] ↗

This module connects multiple applications, protocols and interfaces with each other and...

Source:
nl: MessageDispatcher {
    parameters:
        @display("p=550,446;b=600,5,,,,1");
}

Usage diagram

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

Used in

Name Type Description
ExtMecAppExample network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator, plus one NrUe. Nothing here is external: which node talks to a real host, and over which interface, is configured in the ini file.

ExtUeAppExample network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator, plus one NrUe. Nothing here is external: which node talks to a real host, and over which interface, is configured in the ini file.

ExtUeAppMecAppExample network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator, plus one NrUe. Nothing here is external: which node talks to a real host, and over which interface, is configured in the ini file.

MultiMecHost network

Two gNodeB cells, each on an intermediate Upf of its own with a MecHost hung off it, so every cell has its own MEC host. Both intermediate Upf nodes meet at the anchor Upf, which carries the Ualcmp and, behind it, the MecOrchestrator. An X2 link joins the two gNodeBs. numUe NrUe terminals attach, and numBgCells BackgroundCell cells can be added as interferers.

MultiMecHost_delay network

MultiMecHost with the two intermediate Upf nodes linked directly to each other, and with no X2 link between the gNodeBs. The length of that link -- and so its propagation delay -- follows the routersDelay parameter, which makes the distance between the two MEC hosts configurable.

MultiOperator network

Two operator networks side by side. Each has three gNodeB cells chained by X2, an intermediate Upf that feeds them and carries the operator's MecHost, an anchor Upf, and a Ualcmp with its MecOrchestrator. The two anchor Upf nodes meet at a shared router, the only node the operators have in common. numUe_A and numUe_B NrUe terminals attach to operator A and B respectively, and numBgCells BackgroundCell cells can be added as interferers.

RnisTest network

The topology of SingleMecHost -- one gNodeB and one MecHost on a shared intermediate Upf, with a Ualcmp and a MecOrchestrator behind the anchor Upf -- without its playground size parameters. numUes NrUe terminals attach to the gNodeB.

SingleMecHost network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator. numUes NrUe terminals attach to the gNodeB.

UrbanNetwork network (no description)

Parameters

Name Type Default value Description
nodeType string "MecOrchestrator"
gateway string "upf"
mecOrchestratorHostname string "mecOrchestrator"

Hostname of the reference orchestrator

hasIpv4 bool true
hasIpv6 bool false
numExtEthInterfaces int 0

Properties

Name Value Description
networkNode
display i=device/mainframe;bgb=1006,692

Gates

Name Direction Size Description
ppp [ ] inout

To external networks (internet)

toMecOrchestrator output
fromMecOrchestrator input

Connection to the ME App output gate

Unassigned submodule parameters

Name Type Default value Description
interfaceTable.displayAddresses bool false

whether to display IP addresses on links

pppIf.pcapRecorder.verbose bool true

whether to log packets on the module output

pppIf.pcapRecorder.pcapFile string ""

the PCAP file to be written

pppIf.pcapRecorder.fileFormat string "pcapng"
pppIf.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

pppIf.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

pppIf.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

pppIf.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

pppIf.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

pppIf.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

pppIf.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

pppIf.pcapRecorder.alwaysFlush bool false

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

pppIf.pcapRecorder.displayStringTextFormat string "rec: %n pks"
pppIf.ppp.interfaceTableModule string

The path to the InterfaceTable module

pppIf.ppp.displayStringTextFormat string "rate: %b\nsent: %s, rcvd: %r\nqueue: %q, drop: %d"
pppIf.ppp.sendRawBytes bool false

when true packets are serialized into a sequence of bytes before sending out

pppIf.ppp.mtu int 4470B
pppIf.ppp.stopOperationExtraTime double -1s

extra time after lifecycle stop operation finished

pppIf.ppp.stopOperationTimeout double 2s

timeout value for lifecycle stop operation

extEth.bitrate double
ualcmpApp.binderModule string "binder"
ualcmpApp.serviceName string "Ualcmp"
ualcmpApp.requestQueueSize int 0
ualcmpApp.subscriptionQueueSize int 0
ualcmpApp.localAddress string ""

Local address; may be left empty ("")

ualcmpApp.localPort int 1000

localPort number to listen on

ualcmpApp.requestServiceTime double 5us
ualcmpApp.subscriptionServiceTime double 10us
ualcmpApp.serverThreadClass string "simu5g.mec.platform.services.base.SocketManager"
ualcmpApp.tos int -1

If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

udp.interfaceTableModule string

The path to the InterfaceTable module

udp.icmpModule string "^.ipv4.icmp"
udp.icmpv6Module string "^.ipv6.icmpv6"
udp.crcMode string "declared"
udp.defaultMulticastLoop bool true
tcp.crcMode string "declared"
tcp.advertisedWindow int 14*this.mss

in bytes, corresponds with the maximal receiver buffer capacity (Note: normally, NIC queues should be at least this size)

tcp.delayedAcksEnabled bool false

delayed ACK algorithm (RFC 1122) enabled/disabled

tcp.nagleEnabled bool true

Nagle's algorithm (RFC 896) enabled/disabled

tcp.limitedTransmitEnabled bool false

Limited Transmit algorithm (RFC 3042) enabled/disabled (can be used for TcpReno/TcpTahoe/TcpNewReno/TcpNoCongestionControl)

tcp.increasedIWEnabled bool false

Increased Initial Window (RFC 3390) enabled/disabled

tcp.sackSupport bool false

Selective Acknowledgment (RFC 2018, 2883, 3517) support (header option) (SACK will be enabled for a connection if both endpoints support it)

tcp.windowScalingSupport bool false

Window Scale (RFC 1323) support (header option) (WS will be enabled for a connection if both endpoints support it)

tcp.windowScalingFactor int -1

Window Scaling Factor to the power of 2. -1 indicates that manual window scaling is turned off.

tcp.timestampSupport bool false

Timestamps (RFC 1323) support (header option) (TS will be enabled for a connection if both endpoints support it)

tcp.mss int 536

Maximum Segment Size (RFC 793) (header option)

tcp.msl int 120s

Maximum Segment Lifetime

tcp.tcpAlgorithmClass string "TcpReno"

TODO: use the following @enum or similar, but it must allow new values for user defined algorithms (omnetpp-6.1 checks @enum strictly): @enum("TcpVegas", "TcpWestwood", "TcpNewReno", "TcpReno", "TcpTahoe", "TcpNoCongestionControl")

tcp.useDataNotification bool false

turn the notifications for arrived data on or off

tcp.dupthresh int 3

used for TcpTahoe, TcpReno and SACK (RFC 3517) DO NOT change unless you really know what you are doing

tcp.initialSsthresh int 0xFFFFFFFF

initial value for Slow Start threshold used in TahoeRenoFamily. The initial value of ssthresh SHOULD be set arbitrarily high (e.g.,to the size of the largest possible advertised window) Without user interaction there is no limit...

tcp.stopOperationExtraTime double 0s

extra time after lifecycle stop operation finished

tcp.stopOperationTimeout double 2s

timeout value for lifecycle stop operation

tcp.ecnWillingness bool false

true if willing to use ECN

tcp.dctcpGamma double 0.0625

A fixed estimation gain for calculating dctcp_alpha (RFC 8257 4.2)

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

determines the text that is written on top of the submodule

at.forwardServiceRegistration bool true
at.forwardProtocolRegistration bool true
tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

tn.forwardServiceRegistration bool true
tn.forwardProtocolRegistration bool true
nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

nl.forwardServiceRegistration bool true
nl.forwardProtocolRegistration bool true

Source code

//
// Represents a host performing the functions of the User Application Lifecycle Management
// Proxy (UALCMP) defined by the ETSI Multi-access Edge Computing (MEC) specifications. It includes a
// complete network protocol stack and a ~UalcmpApp application module that implements the logic of the
// UALCMP entity. It is typically connected directly to a MEC orchestrator, and forwards to it the
// creation and deletion requests from the Device App modules of User Equipment. It can be configured to receive
// packets from a real, external Device App application via the external Ethernet interface submodule.
//
//
module Ualcmp
{
    parameters:
        @networkNode();
        @display("i=device/mainframe;bgb=1006,692");

        //# Node specs
        string nodeType = "MecOrchestrator";						// DO NOT CHANGE
        string gateway = default("upf");

        // Hostname of the reference orchestrator
        string mecOrchestratorHostname = default("mecOrchestrator");

        bool hasIpv4 = default(true);
        bool hasIpv6 = default(false);
        *.interfaceTableModule = default(absPath(".interfaceTable"));
//        *.routingTableModule = default("^.ipv4.routingTable");

        int numExtEthInterfaces = default(0);

    gates:
        // To external networks (internet)
        inout ppp[];

        output toMecOrchestrator;
        input fromMecOrchestrator;			// Connection to the ME App output gate

    submodules:

        interfaceTable: InterfaceTable {
            @display("p=61,74;is=s");
        }

        //#
        //# ppp modules
        //#
        //        pppIf[sizeof(ppp)]: PppInterface {
        //            @display("p=550,508");
        //        }
        pppIf: PppInterface {
            @display("p=446,506");
        }

        // ethernet interface used for communicating with external applications in emulation mode
        extEth[numExtEthInterfaces]: <default("ExtLowerEthernetInterface")> like IEthernetInterface {
            parameters:
                @display("p=641,506,row,150;q=txQueue");
        }

        //#
        //# Network layer module
        //#
        ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 {
            parameters:
                @display("p=420,372;q=queue");
        }
        ipv6: <default("Ipv6NetworkLayer")> like INetworkLayer if hasIpv6 {
            parameters:
                @display("p=657,374;q=queue");
        }

        //#
        //# Transport layer modules and corresponding application modules
        //#
		// =============== UDP ============== //
        ualcmpApp: UalcmpApp {
                    // hostname of the reference orchestrator
            mecOrchestratorHostname = parent.mecOrchestratorHostname;
            @display("p=549,74,row");
        }

        udp: Udp {
            @display("p=460,217");
        }

        tcp: Tcp {
            @display("p=627,217");
        }

        // message dispatcher for SAP between application and transport layer
        at: MessageDispatcher {
            parameters:
                @display("p=550,146;b=600,5,,,,1");
        }
        // message dispatcher for SAP between transport and network layer
        tn: MessageDispatcher {
            parameters:
                @display("p=550,300;b=600,5,,,,1");
        }
        // message dispatcher for SAP to link layer
        nl: MessageDispatcher {
            parameters:
                @display("p=550,446;b=600,5,,,,1");
        }

    connections allowunconnected:

        //#
        //# UALCMP to transport layer connections
        //#
        ualcmpApp.socketOut --> at.in++;
        ualcmpApp.socketIn <-- at.out++;

        ualcmpApp.toMecOrchestrator --> toMecOrchestrator;
        ualcmpApp.fromMecOrchestrator <-- fromMecOrchestrator;

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

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


        //#
        //# Transport layer to network layer connections
        //#
        udp.ipOut --> tn.in++;
        udp.ipIn <-- tn.out++;

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


        ipv4.ifIn <-- nl.out++ if hasIpv4;
        ipv4.ifOut --> nl.in++ if hasIpv4;

        ipv4.transportIn <-- tn.out++ if hasIpv4;
        ipv4.transportOut --> tn.in++ if hasIpv4;

        ipv6.ifIn <-- nl.out++ if hasIpv6;
        ipv6.ifOut --> nl.in++ if hasIpv6;

        ipv6.transportIn <-- tn.out++ if hasIpv6;
        ipv6.transportOut --> tn.in++ if hasIpv6;
        //
        //        for i=0..sizeof(ppp)-1 {
        //            pppIf[i].upperLayerOut --> nl.in++;
        //            pppIf[i].upperLayerIn <-- nl.out++;
        //            pppIf[i].phys <--> gtpEndpoint.pppg++;
        //        }

        pppIf.upperLayerOut --> nl.in++;
        pppIf.upperLayerIn <-- nl.out++;
        pppIf.phys <--> ppp++;

        for i=0..numExtEthInterfaces-1 {
            extEth[i].upperLayerOut --> nl.in++;
            extEth[i].upperLayerIn <-- nl.out++;
        }
}
File: src/simu5g/mec/ualcmp/Ualcmp.ned