Skip to content

Commit

Permalink
doc: Document configuring Packet Broker
Browse files Browse the repository at this point in the history
  • Loading branch information
johanstokking committed Mar 28, 2021
1 parent 424d426 commit a07c737
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 35 deletions.
28 changes: 17 additions & 11 deletions doc/content/reference/packet-broker/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ Exchanging traffic can be beneficial for all public and private LoRaWAN network

## How Does it Work?

Packet Broker distinguishes two types of networks: Forwarders and Home Networks. Forwarders are networks with gateways: they simply forward uplink messages from the gateways to Packet Broker, and downlink messages from Packet Broker back to the gateways. Home Networks are networks with end devices.
Packet Broker distinguishes two types of networks: Forwarders and Home Networks. Forwarders are networks with gateways: they forward uplink messages from the gateways to Packet Broker, and downlink messages from Packet Broker back to the gateways. Home Networks are networks with end devices.

Packet Broker routes uplink messages from Forwarders to Home Networks based on the 32-bit `DevAddr` in the uplink message. The first part of the `DevAddr` is the `NetID`, a globally unique identifier of a LoRaWAN network. Packet Broker uses the `NetID` to lookup the Home Network. Besides identifying Home Networks by `NetID`, Packet Broker also supports tenants. Tenants use a `DevAddr` block of a Home Network host.

> For example, a message with `DevAddr` `27ABCD12` has `NetID` `000013` (owned by The Things Network Foundation). The `DevAddr` block `27ABCD00` to `27ABCDFF` might be assigned to a private network `tti`. That `DevAddr` block is noted as `27ABCD00/24`: 24 significant bits. Packet Broker identifies the Home Network then as `NetID` `000013` and tenant ID `tti`.
> For example, a message with `DevAddr` `27ABCD12` has `NetID` `000013` (owned by The Things Network Foundation). The `DevAddr` block `27ABCD00` to `27ABCDFF` might be assigned to a private network `example-com`. That `DevAddr` block is noted as `27ABCD00/24`: 24 significant bits. Packet Broker identifies the Home Network then as `NetID` `000013` and tenant ID `example-com`.
Your {{% tts %}} deployment can be a Forwarder, a Home Network or both. This means that you can make your physical gateway infrastructure available to other networks without having end devices. Likewise, you can deploy end devices as a Home Network, without physical gateway infrastructure.

{{< info >}}The Things Network is identified by `NetID` is `000013` and tenant ID `ttn`.{{< /info >}}

### Routing Policies

Routing policies define rules that Forwarders configure for routing messages to Home Networks. Routing policies are peer-to-peer: a Forwarder can define policies with each individual Home Network. Forwarders can also define an optional default routing policy that is used as fallback when no specific policy is defined.
Expand All @@ -50,21 +52,25 @@ Localization | O | | Gateway locations, timestamps and signal quality

>For instance, a Forwarder may wish to configure three policies:
>
>1. With `NetID` `000013` and tenant ID `ttn` (The Things Network community network): all message types. That is, join-requests and join-accepts, uplink and downlink MAC and application payload messages, and signal quality and localization information.
>2. With `NetID` `000013` and tenant ID `company-a`: only join-requests, join-accepts and uplink and downlink MAC and application payload messages. That is, no metadata.
>1. With Home Network that has `NetID` `000013` and tenant ID `ttn` (The Things Network): all message types. That is, join-requests and join-accepts, uplink and downlink MAC and application payload messages, and signal quality and localization information.
>2. With Home Network that has `NetID` `000013` and tenant ID `example-com`: only join-requests, join-accepts and uplink and downlink MAC and application payload messages. That is, no metadata.
>3. A default policy (for all other networks): only uplink MAC and application payload messages. That is, do not forward join-requests and join-accepts, and do not forward metadata.
### LoRaWAN Roaming vs Packet Broker
## Getting Started

The Things Network or {{% tts %}} Cloud {{< distributions "Cloud" "Dedicated Cloud" "The Things Network" >}} is already connected to Packet Broker. Proceed to [Configuration]({{< relref "configure" >}}) to manage your registration and routing policies with other networks.

When you are using The Things Network {{< distributions "The Things Network" >}}, you cannot configure any routing policies, as The Things Network is a public network and The Things Network Foundation controls with which public or private networks traffic gets exchanged. Upgrade to {{% tts %}} Cloud to manage routing policies for your gateways.

When using {{% tts %}} Enterprise of {{% tts %}} Open Source, learn to [Connect {{% tts %}} to Packet Broker]({{< relref "connect" >}}). {{< distributions "Enterprise" "Open Source" >}}

[Packet Broker](https://www.packetbroker.org) is a global backbone for LoRaWAN traffic. It is designed to securely exchange traffic between LoRaWAN networks.
## LoRaWAN Roaming vs Packet Broker

Packet Broker is a global backbone for LoRaWAN traffic. It is designed to securely exchange traffic between LoRaWAN networks.

Packet Broker supports LoRaWAN passive roaming. However, Packet Broker goes beyond that:

- Packet Broker allows for individual packet selection: networks do not get charged for traffic they did not consume.
- Packet Broker separates traffic routing from billing and clearing: networks are free to put commercial agreements in place to settle balances.
- Packet Broker separates payload from metadata: networks only get charged for the value they need.
- {{% tts %}} has native support for Packet Broker and can access the global coverage provided by The Things Network public community network.

The Things Network or {{% tts %}} Cloud is already connected to Packet Broker. {{< distributions "Cloud" "Dedicated Cloud" "The Things Network" >}}

When using {{% tts %}} Enterprise of {{% tts %}} Open Source, learn to [Connect {{% tts %}} to Packet Broker]({{< relref "connect" >}}). {{< distributions "Enterprise" "Open Source" >}}
- {{% tts %}} has native support for Packet Broker and can access the global coverage provided by The Things Network.
22 changes: 0 additions & 22 deletions doc/content/reference/packet-broker/configure.md

This file was deleted.

13 changes: 13 additions & 0 deletions doc/content/reference/packet-broker/configure/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Configure
description: ""
weight: 2
distributions:
- Cloud
- Dedicated Cloud
- Enterprise
- Open Source
new_in_version: 3.12.0
---

This section shows you how to configure Packet Broker. You can manage your registration, list other networks, configure routing policies with other networks, and see which networks are forwarding traffic to your network.
107 changes: 107 additions & 0 deletions doc/content/reference/packet-broker/configure/registration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: Registration
description: ""
weight: 1
distributions:
- Cloud
- Dedicated Cloud
- Enterprise
- Open Source
new_in_version: 3.12.0
---

This guide explains how to manage your Packet Broker registration.

<!--more-->

{{< cli-only >}}

## Prerequisites

1. {{% tts %}} connected to Packet Broker.
- {{< distributions "Cloud" >}} **{{% tts %}} Cloud** is already connected to Packet Broker.
- {{< distributions "Dedicated Cloud" >}} **{{% tts %}} Dedicated Cloud** can be connected on request. Please contact support.
- {{< distributions "Enterprise" "Open Source" >}} **{{% tts %}} Enterprise** and **Open Source**: see [Connect]({{< relref "connect" >}}).
2. An admin account for the {{% tts %}} deployment. All Packet Broker configuration requires administrative access.

## View Registration

To view the current registration with Packet Broker:

```bash
$ ttn-lw-cli packetbroker registration info
```

<details><summary>Example output with registration</summary>

```json
{
"registration": {
"id": {
"net_id": 19,
"tenant_id": "my-company"
},
"name": "My Company",
"dev_addr_blocks": [
{
"dev_addr_prefix": {
"dev_addr": "27ABCD00",
"length": 24
}
}
],
"contact_info": [
{
"contact_method": "CONTACT_METHOD_EMAIL",
"value": "admin@example.com"
},
{
"contact_type": "CONTACT_TYPE_TECHNICAL",
"contact_method": "CONTACT_METHOD_EMAIL",
"value": "tech@example.com"
}
]
},
"forwarder_enabled": true,
"home_network_enabled": true
}
```

</details>

<details><summary>Example output without registration</summary>

```json
{
"forwarder_enabled": true,
"home_network_enabled": true
}
```

</details>

### Register Tenant

{{< note >}}
You can register with Packet Broker if you are a tenant. This is the case for all users of {{% tts %}} Cloud and in other deployments where you are using a host `NetID`. If you are using your own `NetID` without tenancy, please reach out to [join@packetbroker.org](mailto:join@packetbroker.org) for registration.
{{< /note >}}

To register or update your existing tenant registration:

```bash
$ ttn-lw-cli packetbroker register
```

This updates the registration with Packet Broker based on your {{% tts %}} environment. When using {{% tts %}} Cloud or Dedicated Cloud, the registration is based on your subscription. When using {{% tts %}} Enterprise or Open Source, the registration is based on [your configuration {{< distributions "Enterprise" "Open Source" >}}]({{< relref "configure" >}}).

### Deregister Tenant

{{< warning >}}
This permanently deletes all routing policies that you configured as Forwarder to other Home Networks. It also permanently deletes all routing policies configured by other Forwarders for you as Home Network.
{{< /warning >}}

To deregister from Packet Broker:

```bash
$ ttn-lw-cli packetbroker deregister
```
Loading

0 comments on commit a07c737

Please sign in to comment.