Point-to-Point Links¶
Overview¶
For simulating wired point-to-point links, the INET Framework contains a minimal implementation of the PPP protocol and a corresponding network interface module.
Ppp is a simple module that performs encapsulation of network datagrams into PPP frames and decapsulation of the incoming PPP frames. It can be connected to the network layer directly or can be configured to get the outgoing messages from an output queue. The module collects statistics about the transmitted and dropped packages.
PppInterface is a compound module that complements the Ppp module with an output queue. It implements the IWiredInterface interface. Input and output hooks can be configured for further processing of the network messages.
PPP (RFC 1661) is a complex protocol which, in addition to providing a method for encapsulating multi-protocol datagrams, also contains control protocols for establishing, configuring, and testing the data-link connection (LCP) and for configuring different network-layer protocols (NCP).
The INET implementation only covers encapsulation and decapsulation of data into PPP frames. Control protocols, which do not have a significant effect on the links’ capacity and latency during normal link operation, are not simulated. In addition, header field compressions (PFC and ACFC) are also bot supported, so a simulated PPP frame always contains 1-byte Address and Control fields and a 2-byte Protocol field.
The PPP module¶
The PPP module receives packets from the upper layer in the
netwIn
gate, adds a PppHeader, and send
it to the physical layer through the phys
gate. The packet with
PppHeader is received from the phys
and sent to the upper
layer immediately through the netwOut
gate.
Incoming datagrams are waiting in a queue if the line is currently busy.
In routers, PPP relies on an external queue module (implementing
IPacketQueue) to model finite buffer, implement QoS and/or RED,
and requests packets from this external queue one-by-one. The name of
this queue is given as the queueModule
parameter.
In hosts, no such queue is used, so Ppp contains an internal
queue to store packets wainting for transmission.
Conceptually the queue is of inifinite size, but for better diagnostics
one can specify a hard limit in the packetCapacity
parameter – if
this is exceeded, the simulation stops with an error.
The module can be used in simulations where the nodes are connected and disconnected dinamically. If the channel between the PPP modules is down, the messages received from the upper layer are dropped (including the messages waiting in the queue). When the connection is restored it will poll the queue and transmits the messages again.
The PPP module registers itself in the interface table of the node. The
mtu
of the entry can be specified by the mtu
module
parameter. The module checks the state of the physical link and updates
the entry in the interface table.
PppInterface¶
PppInterface is a compound module that implements the IWiredInterface interface. It contains a Ppp module and a passive queue for the messages received from the network layer.
The queue type is specified by the typename
parameter of the queue
submodule. It can be set to PacketQueue
or to a module type implementing
the IPacketQueue interface. There are implementations with QoS and
RED support.
In typical use of the Ppp module it is augmented with other nodes
that monitor the traffic or simulate package loss and duplication. The
PppInterface module abstract that usage by adding IHook
components to the network input and output of the Ppp component.
Any number of hook can be added by specifying the numOutputHooks
and numInputHooks
parameters and the types of the
outputHook
and inputHook
components. The hooks are chained
in their numeric order.