Ieee8021dRelay

Package: inet.linklayer.ieee8021d.relay

simple module Ieee8021dRelay

Forwards frames (~EtherFrame) based on their destination MAC addresses to appropriate ports.

It can work in two modes:

  • STP unaware mode (If no module is connected to its STP gate):

    Looks up the frame’s destination address in the MacForwardingTable. If it finds the address, it sends it through that port; otherwise, it broadcasts it.

  • STP aware mode (If an Stp or Rstp module is connected to its STP gate):

    Handles BPDU frames. If relaying a message, it also checks the port’s status in the InterfaceTable.

See also: ~EtherFrame, MacForwardingTable, Stp, Rstp

inet.linklayer.ieee8021d.relay.Ieee8021dRelayIeee8021dRelaysimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

AccessPoint

compound module

A wireless access point device that connects wireless stations (like WirelessHost) to a wired network. Supports multiple wireless radios and multiple Ethernet ports.

Known subclasses

Name

Type

Description

MrpRelay

simple module

Relay unit with support for the Media Redundancy Protocol (MRP), defined in IEC 62439-2.

Extends

Name

Type

Description

MacRelayUnitBase

simple module

Abstract base module for MAC relay unit implementations (Ethernet switches). Provides core functionality for MAC address learning and frame forwarding in bridged Ethernet networks. Contains functionality for maintaining a MAC address table that maps addresses to ports, learning addresses from incoming frames, and forwarding frames to appropriate interfaces. It is able to handle unicast, multicast, and broadcast traffic according to standard Ethernet switching rules.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“proc: %p\ndisc: %d”

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

macTableModule

string

interfaceTableModule

string

Properties

Name

Value

Description

class

Ieee8021dRelay

display

i=block/switch

Gates

Name

Direction

Size

Description

lowerLayerIn

input

lowerLayerOut

output

upperLayerIn

input

upperLayerOut

output

Signals

Name

Type

Unit

Description

packetDropped

inet::Packet

packetReceivedFromLower

inet::Packet

packetReceivedFromUpper

inet::Packet

packetSentToLower

inet::Packet

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

packetDropped

packets dropped

count,sum(packetBytes),vector(packetBytes)

none

Source code

//
// Forwards frames (~EtherFrame) based on their destination MAC addresses to appropriate ports.
//
// It can work in two modes:
// - STP unaware mode (If no module is connected to its STP gate):
//     Looks up the frame's destination address in the ~MacForwardingTable. If it finds the address, it sends it through
//     that port; otherwise, it broadcasts it.
// - STP aware mode (If an ~Stp or ~Rstp module is connected to its STP gate):
//     Handles BPDU frames.
//     If relaying a message, it also checks the port's status in the `InterfaceTable`.
//
// @see ~EtherFrame, ~MacForwardingTable, ~Stp, ~Rstp
//
simple Ieee8021dRelay extends MacRelayUnitBase like IMacRelayUnit
{
    parameters:
        @class(Ieee8021dRelay);
}

File: src/inet/linklayer/ieee8021d/relay/Ieee8021dRelay.ned