L2NodeConfigurator

Package: inet.linklayer.configurator.common

simple module L2NodeConfigurator

Has one instance per network node, and it acts like a bridge between the node and the network’s global configurator module, L2NetworkConfigurator.

L2NetworkConfigurator only computes and remembers configuration data (port priority, link cost, etc.), but doesn’t configure the nodes’ routing tables and interfaces accordingly. The actual configuration is carried out by this module, at network initialization time and also when the node restarts (i.e. after a shutdown or a crash.)

This module is needed because of failure/restart scenarios: L2NetworkConfigurator would not be able to configure the node after a restart, because, being a global module, it doesn’t know about node lifecycle events.

inet.linklayer.configurator.common.L2NodeConfiguratorL2NodeConfiguratorsimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

EthernetSwitch

compound module

EthernetSwitch models a Layer 2 Ethernet switch with support for various IEEE 802.1 protocols and features. It provides frame forwarding based on MAC addresses and implements multiple switching technologies.

Extends

Name

Type

Description

SimpleModule

simple module

Base module for all INET simple modules.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“”

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

hasStp

bool

false

hasMrp

bool

false

interfaceTableModule

string

l2ConfiguratorModule

string

“l2NetworkConfigurator”

The absolute path to the L2NetworkConfigurator; use “” if there is no configurator

Properties

Name

Value

Description

class

L2NodeConfigurator

display

i=block/cogwheel

Source code

//
// Has one instance per network node, and it acts like a bridge
// between the node and the network's global configurator module,
// ~L2NetworkConfigurator.
//
// ~L2NetworkConfigurator only computes and remembers configuration data
// (port priority, link cost, etc.), but doesn't configure the nodes'
// routing tables and interfaces accordingly. The actual configuration is
// carried out by this module, at network initialization time and also when
// the node restarts (i.e. after a shutdown or a crash.)
//
// This module is needed because of failure/restart scenarios:
// ~L2NetworkConfigurator would not be able to configure the node after
// a restart, because, being a global module, it doesn't know about node
// lifecycle events.
//
simple L2NodeConfigurator extends SimpleModule like IL2NodeConfigurator
{
    parameters:
        @class(L2NodeConfigurator);
        @display("i=block/cogwheel");
        bool hasStp = default(false);
        bool hasMrp = default(false);
        string interfaceTableModule;
        string l2ConfiguratorModule = default("l2NetworkConfigurator"); // The absolute path to the ~L2NetworkConfigurator; use "" if there is no configurator
}

File: src/inet/linklayer/configurator/common/L2NodeConfigurator.ned