.. _ipfwd:

=============
IP Forwarding
=============

This section describes the behavior of the SRX-8 when used as an IP router.

With default settings, the SRX-8 will forward IP packets received on either of the Ethernet interfaces,
if the destination IP is in the ``192.168.200.0/24`` subnet. This address and mask is configurable through
the ``sys.net.[en|xg].fwd.ip`` and ``sys.net.[en|xg].fwd.prefix`` properties.

The SRX-8 transmitter will return "Destination Unreachable" ICMP messages if the transmitter is not keyed
up before traffic is submitted on either of the Ethernet interfaces. See :ref:`transmitting` for
more information on how to key up the transmitter.

For example, to configure routing from a Linux PC connected to the 1 Gb/s Ethernet interface:

.. code-block:: none

    satlab@satlab:~$ ip route add 192.168.200.0/24 via 192.168.100.101
    satlab@satlab:~$ ping 192.168.200.1 -c 3 -W 1

A response to the ping is not expected since the SRX-8 simply forwards the message on the RF link.
The ``sys.net.en.packets``, ``gse.pdus`` and ``tx.bbframes`` properties should increment as well
as the ``BBFRAMEs`` and ``GSE PDUs`` counters in the ``tm show`` command.

Note that the ``sys.net.en.enable`` property must be set to ``true``. Updating this
property requires a store followed by a system reset. See :ref:`properties` for
more information.

The example shown above can also be used to configure a route via the 10 Gb/s Ethernet interface,
except that the default IP range is different and that ``sys.net.xg`` props should be used instead.

Ethernet pause frames according to [IEEE_802.3]_ are emitted by the SRX-8 transmitter if the data rate
exceeds what is possible to transmit given the current MODCOD and data rate and if the ``sys.net.[en|xg].pause`` property is
set to ``true`` for the Ethernet interface.

The format of the forwarded packets is controlled by properties in the ``gse`` table.
See :ref:`gse_properties` and below for more information.

Format
------

Forwarded IP packets are packed into BBFRAMEs using Generic Stream Encapsulation (GSE)
according to [ETSI_TS]_. When using GSE, IP packets will be packed into and/or
fragmented across BBFRAMEs depending on their lengths and time of submission.
The exact behavior of the GSE encapsulator depends on configuration:

- BBFRAME parameters: MODCOD, FECFRAME size, pilot enablement, SIS/MIS, ACM/CCM, roll-off,
  ISI (refer to [ETSI_EN]_ section 5.1.6)
- The GSE label type indicator and corresponding 6 or 3 byte label (refer to [ETSI_TS]_ section 4.2)

If IP packets are forwarded via both Ethernet data interfaces at the same time, packets will be interleaved
in the GSE encapsulator.

Depending on configuration, the modulator information rate may be lower or higher than what can be carried
by the Ethernet interface. If the modulator is not fully utilized, DUMMY PLFRAMEs as described
in [ETSI_EN]_ section 5.5.1 or idle BBFRAMEs as described in :ref:`idlebb` are transmitted.
If the input rate exceeds the modulator information rate, Ethernet pause frames as described in [IEEE_802.3]_
are emitted by the SRX-8 (if enabled). The IP packet generator must support pause frames or packets
will be dropped by the SRX-8.

The gigabit Ethernet interface supports autonegotiation and 100BASE-TX/1000BASE-T, and thus
rates up to approximately 1 Gb/s.

The 10 gigabit Ethernet interface supports 10GBASE-R with a line rate of 10.3125 Gb/s and thus rates
far exceeding the maximum modulator input data rate.

Jumbo frames are supported, with payload size up to 9000 bytes.
