This repository contains the implementation for the DLEP protocol according to RFC 8175.
The application can be started with the following command:
python3 -m dlepard dlep-router-conf.json
The configuration file (e.g. dlep-router-conf.json
) contains the following
information:
local_ipv4addr
: List of IP addresses to bind to. Each address represents a router instance.discovery
ipv4addr
: The service's multicast IPv4 address. According to RFC 8175, this should be224.0.0.117
.port
(optional): The service's port number.
Default is854
(see RFC 8175).disabled
(optional): Whether to deactivate the discovery mechanism and start with the session initialization.
Default isfalse
.
tcp
(optional): A dictionary containing TCP connection configurations. This is only necessary if discovery is disabled.- Key: One of the addresses from
local_ipv4addr
.ipv4addr
: The modem's IP address.port
: The service's TCP port number.
- Key: One of the addresses from
enable_lid_ext
: Wheteher to enable the Link Identifier extension.rest_if
broadcast_url
: The URLs to all REST APIs that require the DLEP information (e.g. the routing protocol or the DLEP Info View).
TCPProxy
is a wrapper class that abstracts the TCP network access. It uses
asyncio's TCP sockets.
UDPProxy
is a wrapper class that abstract the UDP network access. It uses
asyncio's Datagram sockets. UDPProxy
is able to handle multicast communication
as well as unicast communication.
This implementation provides a RESTful service. It uses a REST API to forward the information that is gathered via the DLEP interface. Any application that requires the link information provided by DLEP can use this interface.
The payload is formatted in JSON and structured as follows:
{
"peer": {
"tcp_port": 32222,
"heartbeat_interval": 10000,
"peer_type": 32222,
"ipv4-address": "192.1.1.102",
"ipv4-attached-subnets": "192.1.1.0/24",
"max_datarate_rx": 40000,
"max_datarate_tx": 40000,
"cur_datarate_rx": 0,
"cur_datarate_tx": 0,
"latency": 1000000
},
"events": [
{
"event-type": "dest-up",
"ipv4-addr": "192.1.1.104",
"mac-addr": "00:00:00:00:00:04"
},
{
"event-type": "dest-down",
"ipv4-addr": "192.1.1.103",
"mac-addr": "00:00:00:00:00:03"
}
],
"destinations": [
{
"mac-address": "00:00:00:00:00:04",
"ipv4-address": "192.1.1.104",
"ipv4-attached-subnets": "192.1.1.0/24",
"max_datarate_rx": 40000,
"max_datarate_tx": 40000,
"cur_datarate_rx": 0,
"cur_datarate_tx": 375,
"loss": 5
}
]
}
The DLEP Information Viewer is a web server that provides a simple web GUI to view the current database from DLEP-Router. The web server provides a REST API that the DLEP plugin can use to publish its information.
The web GUI can be and accessed via http://localhost:8080/ and should work with any web browser.
The application can be started with the following command:
python3 -m dlep_infoview -p 8080
- Use explicit IP addresses instead of network interface names
- UDPProxy works on Windows 10
- Discovery mechanism can be disabled
- Let the operating system choose the source port for signals and messages
- No need for sudo any more
- The session module can reassemble packets from the TCP buffer
- Initial stable version
- Supports UDP discovery and TCP session messages
- Supports the following Data Items from RFC 8175:
- Status
- IPv4 Connection Point
- Heartbeat Interval
- MAC Address
- IPv4 Address
- Maximum Data Rate (Receive)
- Maximum Data Rate (Transmit)
- Current Data Rate (Receive)
- Current Data Rate (Transmit)
- Latency
- Please follow the PEP8 Coding Guidelines.
- All contributors are obliged to follow our Code of Conduct.
Copyright (c) Rohde & Schwarz GmbH. & Co. KG. All rights reserved.
The software is licensed under MIT License.