lightning router overview

2021-12-02 ยท 2 min read

Lightning-enabled "Captive Portal"

"Pay-as-you-go" internet usage with Lightning

Thesis #

Faster, cheaper micro-payments enable finer grained usage billing

Use Cases #

  1. Cafe / Restaurant / Hotel / Airport
  2. Appartment: provide WiFi to neighbors

What is Purchased (Capacity vs Volume) #

One of:

  1. Data Volume + Users purchase a "data rate" contract, e.g., $0.01 / MiB, charged every X MiB + Most cost efficient (?), since users pay only for what they use + Provider can charge many users at once + Variable quality, since it makes no guarantees about how much bandwidth capacity you're getting + Good for: emails, browsing, "spiky" usage
  2. Bandwidth + Users purchase a "bandwidth capacity" contract, e.g., 10 MiB/s, charged every X minutes + Allows users to reserve a "slice of the pipe" all to themselves + Some use cases aren't usable without a minimum bandwidth guarantee (Youtube video buffering, gaming lag). Most useful when the router is under heavy usage by many "data volume" users. + Good for: gaming, Netflix, Youtube, sustained usage
  • Could also provide "slow" connectivity by default, then users pay for better quality.
  • Also need to distinguish Up/Down Volume/Bandwidth

Captive Portal #

captive portal

Flow #

custom auth variables passed in query string

clientipThe ip address of the client to be authenticated
sessionlengthlength of session - minutes
uploadratemaximum allowed upload data rate - kbits/sec
downloadratemaximum allowed download data rate - kbits/sec
uploadquotaallowed upload data quota - kBytes
downloadquotaallowed download data quota - kBytes
customA custom data string that will be sent to BinAuth
  1. client gets captured by openNDS
  2. openNDS redirects client to FAS API along w/ encrypted token (?) (depends on "security level")
  3. FAS API decides whether to auth client by passing them the decrypted token, client hits gateway:port/opennds_auth?tok=XXX with decrypted token to auth.
  4. if client follows lightning flow, FAS API can notify openNDS to increase client