mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 00:04:54 +00:00
Change default UDP port to 2121 and EtherType to 0x2121
Update the default UDP bind port from 4000 to 2121 (decimal) and the default Ethernet EtherType from 0x88B5 to 0x2121 across all source code, documentation, configuration templates, test fixtures, and scripts. Remove references to "IEEE 802 experimental range" since 0x2121 is not in that range.
This commit is contained in:
@@ -243,7 +243,7 @@ stale address mappings.
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
|-----------|------|---------|-------------|
|
||||
| `transports.udp.bind_addr` | string | `"0.0.0.0:4000"` | UDP bind address and port |
|
||||
| `transports.udp.bind_addr` | string | `"0.0.0.0:2121"` | UDP bind address and port |
|
||||
| `transports.udp.mtu` | u16 | `1280` | Transport MTU |
|
||||
| `transports.udp.recv_buf_size` | usize | `2097152` | UDP socket receive buffer size in bytes (2 MB). Linux kernel doubles the requested value internally. Host `net.core.rmem_max` must be >= this value. |
|
||||
| `transports.udp.send_buf_size` | usize | `2097152` | UDP socket send buffer size in bytes (2 MB). Host `net.core.wmem_max` must be >= this value. |
|
||||
@@ -256,7 +256,7 @@ Requires `CAP_NET_RAW` or running as root. Linux only.
|
||||
| Parameter | Type | Default | Description |
|
||||
|-----------|------|---------|-------------|
|
||||
| `interface` | string | *(required)* | Network interface name (e.g., `"eth0"`, `"enp3s0"`) |
|
||||
| `ethertype` | u16 | `0x88B5` | IEEE EtherType (802 experimental range) |
|
||||
| `ethertype` | u16 | `0x2121` | EtherType |
|
||||
| `mtu` | u16 | *(auto)* | Override MTU. Default: interface MTU minus 1 (for frame type prefix) |
|
||||
| `recv_buf_size` | usize | `2097152` | Socket receive buffer size in bytes (2 MB) |
|
||||
| `send_buf_size` | usize | `2097152` | Socket send buffer size in bytes (2 MB) |
|
||||
@@ -320,7 +320,7 @@ dns:
|
||||
|
||||
transports:
|
||||
udp:
|
||||
bind_addr: "0.0.0.0:4000"
|
||||
bind_addr: "0.0.0.0:2121"
|
||||
mtu: 1472
|
||||
|
||||
peers:
|
||||
@@ -328,7 +328,7 @@ peers:
|
||||
alias: "node-b"
|
||||
addresses:
|
||||
- transport: udp
|
||||
addr: "172.20.0.11:4000"
|
||||
addr: "172.20.0.11:2121"
|
||||
connect_policy: auto_connect
|
||||
```
|
||||
|
||||
@@ -347,7 +347,7 @@ tun:
|
||||
|
||||
transports:
|
||||
udp:
|
||||
bind_addr: "0.0.0.0:4000"
|
||||
bind_addr: "0.0.0.0:2121"
|
||||
mtu: 1472
|
||||
ethernet:
|
||||
interface: "eth0"
|
||||
@@ -361,7 +361,7 @@ peers:
|
||||
alias: "internet-peer"
|
||||
addresses:
|
||||
- transport: udp
|
||||
addr: "203.0.113.5:4000"
|
||||
addr: "203.0.113.5:2121"
|
||||
connect_policy: auto_connect
|
||||
```
|
||||
|
||||
@@ -468,13 +468,13 @@ dns:
|
||||
|
||||
transports:
|
||||
udp:
|
||||
bind_addr: "0.0.0.0:4000"
|
||||
bind_addr: "0.0.0.0:2121"
|
||||
mtu: 1280
|
||||
recv_buf_size: 2097152 # 2 MB (kernel doubles to 4 MB actual)
|
||||
send_buf_size: 2097152 # 2 MB
|
||||
# ethernet: # uncomment to enable (requires CAP_NET_RAW)
|
||||
# interface: "eth0" # required: network interface name
|
||||
# ethertype: 0x88B5 # IEEE 802 experimental EtherType
|
||||
# ethertype: 0x2121 # default EtherType
|
||||
# mtu: null # null = interface MTU - 1 (typically 1499)
|
||||
# recv_buf_size: 2097152 # 2 MB
|
||||
# send_buf_size: 2097152 # 2 MB
|
||||
@@ -489,7 +489,7 @@ peers: # static peer list
|
||||
# alias: "node-b"
|
||||
# addresses:
|
||||
# - transport: udp
|
||||
# addr: "10.0.0.2:4000"
|
||||
# addr: "10.0.0.2:2121"
|
||||
# priority: 100
|
||||
# connect_policy: auto_connect
|
||||
# auto_reconnect: true # reconnect after link-dead removal
|
||||
|
||||
@@ -239,7 +239,7 @@ sysctl net.core.rmem_max net.core.wmem_max
|
||||
Actual buffer sizes are logged at startup:
|
||||
|
||||
```text
|
||||
UDP transport started local_addr=0.0.0.0:4000 recv_buf=4194304 send_buf=4194304
|
||||
UDP transport started local_addr=0.0.0.0:2121 recv_buf=4194304 send_buf=4194304
|
||||
```
|
||||
|
||||
## Ethernet: The Local Network Transport
|
||||
@@ -261,7 +261,7 @@ UDP (1500 vs 1472 MTU).
|
||||
### Implementation
|
||||
|
||||
The Ethernet transport uses Linux AF_PACKET sockets in SOCK_DGRAM mode with
|
||||
EtherType 0x88B5 (IEEE 802 experimental/local use range). SOCK_DGRAM mode
|
||||
EtherType 0x2121. SOCK_DGRAM mode
|
||||
lets the kernel handle Ethernet header construction and parsing — the
|
||||
transport deals only with payloads and MAC addresses.
|
||||
|
||||
@@ -271,7 +271,7 @@ beacons and data to share the same EtherType and socket.
|
||||
|
||||
| Property | Value |
|
||||
| -------- | ----- |
|
||||
| EtherType | 0x88B5 (IEEE 802 experimental) |
|
||||
| EtherType | 0x2121 |
|
||||
| Socket type | AF_PACKET SOCK_DGRAM |
|
||||
| Frame type prefix | 0x00 = data, 0x01 = beacon |
|
||||
| Effective MTU | Interface MTU - 1 (typically 1499) |
|
||||
@@ -450,7 +450,7 @@ transitions through `Starting` to `Up` (operational). `stop()` moves to
|
||||
| --------- | ------ | ----- |
|
||||
| UDP/IP | **Implemented** | Primary transport, async send/receive, configurable MTU |
|
||||
| TCP/IP | Future direction | Requires stream framing, TCP-over-TCP concern |
|
||||
| Ethernet | **Implemented** | AF_PACKET SOCK_DGRAM, EtherType 0x88B5, beacon discovery, Linux only |
|
||||
| Ethernet | **Implemented** | AF_PACKET SOCK_DGRAM, EtherType 0x2121, beacon discovery, Linux only |
|
||||
| WiFi | Future direction | Infrastructure mode = Ethernet driver |
|
||||
| Tor | Future direction | High latency, .onion addressing |
|
||||
| BLE | Future direction | ATT_MTU negotiation, per-link MTU |
|
||||
|
||||
Reference in New Issue
Block a user