-
Notifications
You must be signed in to change notification settings - Fork 8
sarp
Table of content
⚠️ TODO: This page needs to be updated.
In OpenSAND, encapsulation protocols used to transport data over the emulated satellite link use terminal IDs to identify the source and destination. However, for some purposes (e.g. routing), these IDs need to be translated into network addresses. The protocol Satellite Address Resolution Protocol (SARP) is used to that end.
In particular, in OpenSAND the SARP allows to link terminal IDs to IPv4, IPv6 and MAC (Ethernet) addresses.
⚠️ OpenSAND SARP table is not standard, nor inspired from the DVB standards.
The SARP uses serveral SARP tables (one for each protocol), to link the terminal ID to network addresses. These tables are automatically generated, with information gathered using zeroconf (Avahi): when a new terminal is detected, its addresses are added to the table. However, they can be also manually configured in the OpenSAND Manager.
To do so, the Advanced mode
must be activated in the Simulation
menu. In the Advanced
dialog of the Configuration
tab, the SARP tables are located under sarp
, in the TOPOLOGY
section.
There is a total of three tables: one for IPv4, one for IPv6, and one for Ethernet. Each table entry has the following values:
-
addr
: the address of the terminal in the protocol (IP or Ethernet). -
mask
: the mask of the address, if pertinent (no mask for Ethernet). -
tal_id
: the terminal ID associated to this address.
There is also an extra value, located at the top of the window, named default
. This value indicates the default terminal ID to use when the address (IP or Ethernet) is not found in any of the tables. By default, this value is -1
, which means no terminal (e.g. if a packet needs to be routed to this ID, it will be dropped).
The default
terminal ID is usually changed when forcing internet traffic from a terminal via the satellite link: since the destination IP addresses are not necessary known by OpenSAND, and to prevent the packets being dropped, the traffic must be routed via the gateway (terminal ID: 0), which will redirect the traffic to the internet.
The SARP protocol is used in the Lan Adaptation block for routing purposes: the mandatory plugins IP and Ethernet use the respective SARP table to make a link between network protocol addresses and terminal IDs.
SARP tables are implemented by the class SarpTable
, with the following methods:
-
bool add (MacAddress *, tal_id_t)
: add a new entry to the Ethernet SARP table. Returnstrue
if successful. -
bool add (IpAddress *, tal_id_t)
: add a new entry to the IP SARP table. Returnstrue
if successful. -
bool getTalByIp(IpAddress *, tal_id_t &)
: get the terminal ID of an IP address. Returntrue
if terminal found, or a default is set. -
bool getTalByMac(MacAddress *, tal_id_t &)
: get the terminal ID of an MAC address. Returntrue
if terminal found, or a default is set. -
bool getMacByTal(tal_id_t, MacAddress &)
: get the MAC address of ther terminal. Returntrue
if terminal found. -
void setDefaultTal(tal_id_t)
: set the default terminal ID.