VintageNetBridge
adds support for creating Ethernet bridges with VintageNet
.
Bridging two networks joins them together so that they form one LAN. One use
case would be to join a WiFi mesh network with a wired Ethernet LAN. Devices on
the mesh network would look like they're on the Ethernet LAN when in reality all
traffic was being transferred through the bridge. For example, a DHCP server
running on the Ethernet LAN would provide IP addresses for the WiFi mesh
devices. While bridging is not always an appropriate way of joining networks, in
this case, it enables one to provision multiple Mesh WiFi to Ethernet LAN
devices for redundancy in the mesh while still looking like a normal IPv4 LAN.
To use, add :vintage_net_bridge
to your mix
dependencies like this:
def deps do
[
{:vintage_net_bridge, "~> 0.10.0"}
]
end
Bridges typically have names like "br0"
, "br1"
, etc. Here is an example
configuration:
config :vintage_net,
regulatory_domain: "US",
config: [
{"eth0",
%{
type: VintageNetEthernet,
ipv4: %{method: :disabled}
}},
{"br0",
%{
type: VintageNetBridge,
ipv4: %{method: :dhcp},
vintage_net_bridge: %{
interfaces: ["eth0", "mesh0"]
}
}},
{"mesh0",
%{
type: VintageNetWiFi,
ipv4: %{method: :disabled},
vintage_net_wifi: %{
user_mpm: 1,
root_interface: "wlan0",
networks: [
%{
key_mgmt: :none,
ssid: "my-mesh",
frequency: 2432,
mode: :mesh
}
]
}
}}
]