VirtualisationInfrastructure

Package: simu5g.nodes.mec.VirtualisationInfrastructure

VirtualisationInfrastructure

compound module

This module represents the Virtualisation Infrastructure in a MEC host. It takes care of forwarding packets coming from the 5G core network to the appropriate MEC applications, applying the processing required by all the necessary network protocol layers. Optionally, it can host "independent" MEC applications, i.e., applications that are statically created at initialization, without going through the normal lifecycle (i.e., through the UALCMP and MEC orchestrator). It provides the external interface to communicate with emulated MEC applications, running outside the simulation environment.

interfaceTable : InterfaceTable

Keeps the table of network interfaces.

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

This module implements a PPP network interface.

Source:
pppIf[sizeof(ppp)]: PppInterface {
    @display("p=736,660");
} extEth[numExtEthInterfaces] : like IEthernetInterface

IEthernetInterface: This module interface is implemented by Ethernet network interfaces.

Source:
extEth[numExtEthInterfaces]: <default("ExtLowerEthernetInterface")> like IEthernetInterface {
    parameters:
        @display("p=326,660,row,150;q=txQueue");
} encap : like IEthernetLayer

EthernetEncapsulation: Performs Ethernet II or Ethernet with LLC/SNAP encapsulation/decapsulation.

Source:
encap: <default("EthernetEncapsulation")> like IEthernetLayer if typename != "" {
    parameters:
        registerProtocol = true;
        @display("p=326,511");
} lo : like ILoopbackInterface

LoopbackInterface: This module implements a loopback network interface.

ILoopbackInterface: This module interface is implemented by loopback network interfaces.

Source:
lo: <default("LoopbackInterface")> like ILoopbackInterface {
    parameters:
        @display("p=548,660,row,150");
} ipv4 : like INetworkLayer

Ipv4NetworkLayer: Network layer of an IPv4 node.

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

Ipv6NetworkLayer: Represents an IPv6 network layer (L3).

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

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

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

TCP protocol implementation.

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

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

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

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 compound modules

Name Type Description
MECHost compound module

This module represents a model of a Multi-access Edge Computing (MEC) host belonging to a MEC system, as specified by the ETSI GS MEC 003 specifications. It runs MEC applications within its VirtualisationInfrastructure and can provide a number of MEC services via the MEC platform. MEC applications can be created either dynamically by the MEC orchestrator or statically at the initialization of the simulation. The MEC host possesses a configurable number of computing resources (such as CPU speed, RAM, and storage) and keeps track of the utilization of these resources by the MEC applications via the VirtualisationInfrastructureManager. Moreover, this module includes a User Plane Function (UPF) that allows it to be connected with the 5G core network.

Parameters

Name Type Default value Description
hasIpv4 bool true
hasIpv6 bool false
numIndependentMecApp int 0
numExtEthInterfaces int 0
gateway string ""

Properties

Name Value Description
networkNode
display bgb=1350,750;i=block/dispatch

Gates

Name Direction Size Description
ppp [ ] inout

connection with GtpEndpoint and local/external networks

independentMecAppOut [ ] output numIndependentMecApp

connection to the ME App input gate

independentMecAppIn [ ] input numIndependentMecApp

connection to the ME App output gate

meAppOut [ ] output

connection to the ME App input gate

meAppIn [ ] input

connection to the ME App output gate

mecPlatform [ ] inout

connection to the MEC Platform

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
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

//
// This module represents the Virtualisation Infrastructure in a MEC host.
// It takes care of forwarding packets coming from the 5G core network to the
// appropriate MEC applications, applying the processing required by all the necessary
// network protocol layers.
// Optionally, it can host "independent" MEC applications, i.e., applications that
// are statically created at initialization, without going through the normal
// lifecycle (i.e., through the UALCMP and MEC orchestrator).
// It provides the external interface to communicate with emulated MEC applications,
// running outside the simulation environment.
//
module VirtualisationInfrastructure
{
    parameters:
        @networkNode();
        @display("bgb=1350,750;i=block/dispatch");
        @figure[applicationLayer](type=rectangle; pos=250,6; size=600,130; lineColor=#808080; cornerRadius=5; fillColor=#ffff00; fillOpacity=0.1);
        @figure[applicationLayer.title](type=text; pos=845,11; anchor=ne; text="application layer");
        @figure[transportLayer](type=rectangle; pos=250,156; size=600,130; fillColor=#ff0000; lineColor=#808080; cornerRadius=5; fillOpacity=0.1);
        @figure[transportLayer.title](type=text; pos=845,161; anchor=ne; text="transport layer");
        @figure[networkLayer](type=rectangle; pos=250,306; size=600,130; fillColor=#00ff00; lineColor=#808080; cornerRadius=5; fillOpacity=0.1);
        @figure[networkLayer.title](type=text; pos=845,311; anchor=ne; text="network layer");
        @figure[linkLayer](type=rectangle; pos=250,456; size=600,130; fillColor=#0000ff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1);
        @figure[linkLayer.title](type=text; pos=845,461; anchor=ne; text="link layer");
        @figure[submodules];

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

        int numIndependentMecApp = default(0);
        int numExtEthInterfaces = default(0);
        string gateway = default("");

    gates:
        inout ppp[];				// connection with GtpEndpoint and local/external networks

        output independentMecAppOut[numIndependentMecApp];			// connection to the ME App input gate
        input independentMecAppIn[numIndependentMecApp];			// connection to the ME App output gate

        output meAppOut[];			// connection to the ME App input gate
        input meAppIn[];			// connection to the ME App output gate

        inout mecPlatform[];			// connection to the MEC Platform

    submodules:

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

        //#
        //# link-layer modules
        //#
        pppIf[sizeof(ppp)]: PppInterface {
            @display("p=736,660");
        }

        // ethernet interface used for communicating with external applications in emulation mode
        extEth[numExtEthInterfaces]: <default("ExtLowerEthernetInterface")> like IEthernetInterface {
            parameters:
                @display("p=326,660,row,150;q=txQueue");
        }
        encap: <default("EthernetEncapsulation")> like IEthernetLayer if typename != "" {
            parameters:
                registerProtocol = true;
                @display("p=326,511");
        }

        lo: <default("LoopbackInterface")> like ILoopbackInterface {
            parameters:
                @display("p=548,660,row,150");
        }

        //#
        //# 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: 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:

        for i=0..numIndependentMecApp -1 {
            at.out++ --> independentMecAppOut++;
            at.in++ <-- independentMecAppIn++;
        }

        for i=0..sizeof(mecPlatform)-1 {
            at.out++ --> mecPlatform$o[i];
            at.in++ <-- mecPlatform$i[i];
        }

        //#
        //# App layer to transport layer connections
        //#
        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;

        //#
        //# Network layer to link layer connections
        //#
        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 <--> ppp++;
        }

        for i=0..numExtEthInterfaces-1 {
            encap.lowerLayerOut --> extEth[i].upperLayerIn;
            encap.lowerLayerIn <-- extEth[i].upperLayerOut;
        }
        encap.upperLayerOut --> nl.in++ if numExtEthInterfaces != 0;
        encap.upperLayerIn <-- nl.out++ if numExtEthInterfaces != 0;

        nl.out++ --> lo.upperLayerIn;
        lo.upperLayerOut --> nl.in++;
}
File: src/nodes/mec/VirtualisationInfrastructure/VirtualisationInfrastructure.ned