Table Of Contents
Table Of Contents

The Ethernet Model

Overview

Ethernet is the most popular wired LAN technology nowadays, and its use is also growing in metropolitan area and wide area networks. Since its introduction in 1980, Ethernet data transfer rates have increased from the original 10Mb/s to the latest 400Gb/s. Originally, The technology has changed from using coaxial cables and repeaters to using unshielded twisted-pair cables with hubs and switches. Today, switched Ethernet is prevalent, and most links operate in full duplex mode. The INET Framework contains support for all major Ethernet technologies and device types.

In Ethernet networks containing multiple switches, broadcast storms are prevented by use of a spanning tree protocol (STP, RSTP) that disables selected links to eliminate cycles from the topology. Ethernet switch models in INET contain support for STP and RSTP.

Nodes

There are several node models that can be used in an Ethernet network:

  • Node models such as StandardHost and Router are Ethernet-capable
  • EtherSwitch models an Ethernet switch, i.e. a multiport bridging device
  • EtherHub models an Ethernet hub or multiport repeater
  • EtherBus models the coaxial cable (10BASE2 or 10BASE5 network segments) on legacy Ethernet networks
  • EtherHost is a sample node which can be used to generate “raw” Ethernet traffic

EtherSwitch

EtherSwitch models an Ethernet switch. Ethernet switches play an important role in modern Ethernet LANs. Unlike passive hubs and repeaters that work in the physical layer, the switches operate in the data link layer and relay frames between the connected subnets.

In modern Ethernet LANs, each node is connected to the switch directly by full duplex lines, so no collisions are possible. In this case, the CSMA/CD is not needed and the channel utilization can be high.

The duplexMode parameters of the MACs must be set according to the medium connected to the port; if collisions are possible (it’s a bus or hub) it must be set to false, otherwise it can be set to true. By default it uses half-duplex MAC with CSMA/CD.

EtherHub

EtherHub models an Ethernet hub. Ethernet hubs are a simple broadcast devices. Messages arriving on a port are regenerated and broadcast to every other port.

The connections connected to the hub must have the same data rate. Cable lengths should be reflected in the delays of the connections.

EtherBus

The EtherBus component can model a common coaxial cable found in early Ethernet LANs. The nodes are attached via taps at specific positions on the cable. When a node sends a signal, it will propagate along the cable in both directions at the given propagation speed.

The gates of the EtherBus represent taps. The positions of the taps are given by the positions parameter as a space separated list of distances in metres. If there are more gates then positions given, the last distance is repeated. The bus component send the incoming message in one direction and a copy of the message to the other direction (except at the ends). The propagation delays are computed from the distances of the taps and the propagationSpeed parameter.

The Physical Layer

Stations on an Ethernet networks are connected by coaxial, twisted pair or fibre cables. (Coaxial only has historical importance, but is supported by INET anyway.) There are several cable types specified in the standard.

In the INET framework, the cables are represented by connections. The connections used in Ethernet LANs must be derived from ned::DatarateChannel and should have their delay and datarate parameters set. The delay parameter can be used to model the distance between the nodes. The datarate parameter can have four values:

  • 10Mbps (classic Ethernet)
  • 100Mbps (Fast Ethernet)
  • 1Gbps (Gigabit Ethernet, GbE)
  • 10Gbps (10 Gigabit Ethernet, 10GbE)
  • 40Gbps (40 Gigabit Ethernet, 40GbE)
  • 100Gbps (100 Gigabit Ethernet, 100GbE)

There is currently no support for 200Gbps and 400Gbps Ethernet.

Eth10M, Eth100M, Eth1G, Eth10G, Eth40G, Eth100G

Ethernet Interface

The EthernetInterface compound module implements the IWiredInterface interface. Complements EtherMac and EtherEncap with an output queue for QoS and RED support. It also has configurable input/output filters as IHook components similarly to the PppInterface module.

The Ethernet MAC (Media Access Control) layer transmits the Ethernet frames on the physical media. This is a sublayer within the data link layer. Because encapsulation/decapsulation is not always needed (e.g. switches does not do encapsulation/decapsulation), it is implemented in a separate modules (EtherEncap and EtherLlc) that are part of the LLC layer.

Nowadays almost all Ethernet networks operate using full-duplex point-to-point connections between hosts and switches. This means that there are no collisions, and the behaviour of the MAC component is much simpler than in classic Ethernet that used coaxial cables and hubs. The INET framework contains two MAC modules for Ethernet: the EtherMacFullDuplex is simpler to understand and easier to extend, because it supports only full-duplex connections. The EtherMac module implements the full MAC functionality including CSMA/CD, it can operate both half-duplex and full-duplex mode.

Components

The following components are present in the model:

EtherMacFullDuplex

From the two MAC implementation EtherMacFullDuplex is the simpler one, it operates only in full-duplex mode (its duplexEnabled parameter fixed to true in its NED definition). This module does not need to implement CSMA/CD, so there is no collision detection, retransmission with exponential backoff, carrier extension and frame bursting.

EtherMac

Ethernet MAC layer implementing CSMA/CD. It supports both half-duplex and full-duplex operations; in full-duplex mode it behaves as EtherMacFullDuplex. In half-duplex mode it detects collisions, sends jam messages and retransmit frames upon collisions using the exponential backoff algorithm. In Gigabit Ethernet networks it supports carrier extension and frame bursting. Carrier extension can be turned off by setting the carrierExtension parameter to false.

EtherEncap

The EtherEncap module performs Ethernet II or Ethernet with SNAP encapsulation/decapsulation.

EtherLlc

The EtherLlc module provides Ethernet 802.3 encapsulation/decapsulation.

MacRelayUnit

INET framework ethernet switches are built from IMacRelayUnit components. Each relay unit has N input and output gates for sending/receiving Ethernet frames. They should be connected to EthernetInterface modules.

The relay unit holds a table for the destination address -> output port mapping in a MacAddressTable module. When the relay unit receives a data frame, it updates the table with the source address->input port.

If the destination address is not found in the table, the frame is broadcast. The frame is not sent to the same port it was received from, because then the target should already have received the original frame.

A simple scheme for sending PAUSE frames is built in (although users will probably change it). When the buffer level goes above a high watermark, PAUSE frames are sent on all ports. The watermark and the pause time is configurable; use zero values to disable the PAUSE feature.

MacAddressTable

The MacAddressTable module stores the mapping between ports and MAC addresses. Entries are deleted if their age exceeds a certain limit.

If needed, address tables can be pre-loaded from text files at the beginning of the simulation; this controlled by the addressTableFile module parameter. In the file, each line contains a literal 0 (reserved for VLAN id), a hexadecimal MAC address and a decimal port number, separated by tabs. Comment lines beginning with ’#’ are also allowed:

0    01 ff ff ff ff    0
0    00-ff-ff-ee-d1    1
0    0A:AA:BC:DE:FF    2

Entries are deleted if their age exceeds the duration given as the agingTime parameter.

Ieee8021dRelay

Ieee8021dRelay is a MAC relay unit that should be used instead of MacRelayUnit that when STP or RSTP is needed.

Stp

The Stp module type implements Spanning Tree Protocol (STP). STP is a network protocol that builds a loop-free logical topology for Ethernet networks. The basic function of STP is to prevent bridge loops and the broadcast radiation that results from them.

STP creates a spanning tree within a network of connected layer-2 bridges, and disables those links that are not part of the spanning tree, leaving a single active path between any two network nodes.

Rstp

Rstp implements Rapid Spanning Tree Protocol (RSTP), an improved version of STP. RSTP provides significantly faster recovery in response to network changes or failures.

Implemented Standards

The Ethernet model operates according to the following standards:

  • Ethernet: IEEE 802.3-1998
  • Fast Ethernet: IEEE 802.3u-1995
  • Full-Duplex Ethernet with Flow Control: IEEE 802.3x-1997
  • Gigabit Ethernet: IEEE 802.3z-1998