Commit Graph

28 Commits

Author SHA1 Message Date
889a54fd21 fix: Begin splitting uses of wpad-wolfssl and wpad-mesh-wolfssl
In commit b46bf38e8 ("feat: Configure network-specific packages"), we
left a mistake, having the package_wpad_mesh configuration setup
actually install wpad-wolfssl as opposed to
wpad-mesh-wolfssl (probably after discovering that wpad-mesh-wolfssl
wasn't sufficient for some purpose or other).

wpad-wolfssl is a feature superset of wpad-mesh-wolfssl, but we'll
want to separate these two sets slowly if we can.
2022-12-19 12:32:07 -05:00
8058f197f1 feat: Add a WPA3 (SAE) variant of Laboratory B's WiFi network
WPA3 is required in order to transmit on >6GHz.
2022-12-19 12:32:07 -05:00
5c1f99965a feat: Add templates for mt791x (11x) wifi-devices
These *need* to run with 'HE' htmode(s) in order to gain the benefits
of higher coding rates
2022-12-19 12:32:07 -05:00
29e103a176 feat: netconfig: Allow wifi-iface(s) to remain without ifname
There are certain situations we do not want to set the ifname on a
wifi-ifae, e.g. when navigating bugs related to
hard-setting the `ifname` as we see on DBDC-capable mt76 devices.

Change our wifi-iface setup so that we do not search for devices by
ifname, but instead, by section name (e.g. `labb5` in `config
wifi-iface 'labb5'`).

Also, add an `force_ifnameless` variable to our wifi-iface YAML so
that we can optionally force-empty the ifname field in settings where
we would like to do so. By default (with `force_ifnameless` unset or
false), we will use the same value for the `ifname` option and for the
section name.

Impacts

- You will need to migrate manually by naming your wifi-iface sections
2022-12-19 12:32:07 -05:00
e05b253210 feat: Setup hostname, timezone, and secure sshd 2022-12-11 16:00:24 -05:00
5d193970bc fix: Specify the wireless.wifi-device.type as mac80211
Before this commit, we do not add a `type` to the wifi-device(s) we
create from scratch; we hope that they'd be available and already set
to `mac80211`.

For example, if we do not have a section in `/etc/config/wireless` for
the phy at sysfs path `ffe09000.pcie...`, creating one with Ansible
with this inventory variable:

```yaml
        - name: radio1
          path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
          template: ath9k_2
          channel: 6
```

would give us

```/etc/config/wireless
config wifi-device 'radio1'
        option htmode 'HT20'
        option band '2g'
        option channel '6'
        option country 'US'
        option disabled '0'
        option path 'ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0'
```

... and not:

```/etc/config/wireless
config wifi-device 'radio1'
        option type 'mac80211'
        option htmode 'HT20'
        option band '2g'
        option channel '6'
        option country 'US'
        option disabled '0'
        option path 'ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0'
```

Force the section as mac80211. This has no support for non-mac80211,
cfg80211-only drivers -- that's fine, as we only see (in practice)
ath9k, ath10k, ath11k and mt76 among the routers we're configuring
with ansible-labb-wifi.

(cherry picked from commit a4b505a4e6c218de4ec02f06f3eb58e97bdb517c)
2022-12-11 16:00:24 -05:00
4be4747f96 fix: Set wifi-device names to ensure ifaces point to correct device
Before this commit, we do not add an uci section name to wifi-device(s).

For example, if we do not have a section in `/etc/config/wireless` for
the phy at sysfs path `ffe09000.pcie...`, creating one with Ansible
with this inventory variable:

```yaml
        - name: radio1
          path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
          template: ath9k_2
          channel: 6
```

would give us

```/etc/config/wireless
config wifi-device
        option type 'mac80211'
        option htmode 'HT20'
        option band '2g'
        option channel '6'
        option country 'US'
        option disabled '0'
        option path 'ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0'
```

... and not:

```/etc/config/wireless
config wifi-device 'radio1'
        option type 'mac80211'
        option htmode 'HT20'
        option band '2g'
        option channel '6'
        option country 'US'
        option disabled '0'
        option path 'ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0'
```

We must name the wifi-device section, since wifi-iface sections point
to the name of their wifi-device exclusively.

(cherry picked from commit 0c8452b9a6d408b1669e273feb6a9161d0a56da6)
2022-12-11 16:00:24 -05:00
9c426a57bf feat: Add hosts: ap3285i4.lan, mr16_4.lan 2022-08-27 21:32:14 -04:00
a689dcabab fix: ap: Globalize disassoc_low_ack for all ap VIFs
In the same way as 2ea51c7833, where
varying skip_inactivity_poll.

I don't think there's a bug. I don't know, though. We'll find out.
2022-08-11 10:01:51 -04:00
6ba330eb81 cleanup: inventory: drop mr16_3 from inventory
Now that this node is gone for good.
2022-08-09 20:43:21 -04:00
2ea51c7833 fix: ap: Globalize skip_inactivity_poll for all ap VIFs
There appears to be a bug in hostapd where this[1]:

```hostapd.conf
interface=vgo5
:
skip_inactivity_poll=1
:
interface=labb5
:
skip_inactivity_poll=0
:
```

... still results in inactivity polling on the vgo5 interface:

Tue Aug  9 04:54:20 2022 daemon.info hostapd: vgo5: STA 3a:0e:52:a1:43:ea IEEE 802.11: disassociated due to inactivity
Tue Aug  9 04:54:21 2022 daemon.info hostapd: vgo5: STA 3a:0e:52:a1:43:ea IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Aug  9 05:18:05 2022 daemon.info hostapd: vgo5: STA 3a:0e:52:a1:43:ea IEEE 802.11: disassociated due to inactivity
Tue Aug  9 05:18:06 2022 daemon.info hostapd: vgo5: STA 3a:0e:52:a1:43:ea IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

Not sure what's going on there. I will have to verify this fix works
in production.

[1]: https://paste.c-net.org/MulanMaybe
2022-08-09 20:32:21 -04:00
50ba10ad0e feat: Add host: ap3825i1.lan
YES, believe it or not, I can now configure mesh nodes with this
playbook.

It's nervewracking, but you better believe it works.
2022-08-06 23:21:13 -04:00
df4fd21984 cleanup: Shift wpad reload from handler to instead occur in-place
We cannot afford to defer things to a handler when reconfiguring the
network: we need to know as soon as possible when our playbook has
gone up in flames and left a remote out-of-reach, so we can know what
broke when we have to go and directly service the unit.

I've hard-set the timeout here to 70 to handle the full one-minute DFS
CAC timeout, but please, for the love of God, don't run mesh on
UNII-2A. You do not want to be waiting that full minute for the device
to come back.
2022-08-06 23:17:55 -04:00
b46bf38e84 feat: Configure network-specific packages
This is probably not the right way to do this ... but it's
tricky. Packages that are REQUIRED for proper network config need to
be handled somewhere before we do network config.

Perhaps this could be moved to the netconfig role on its own, but I
don't really want to try.
2022-08-06 22:51:11 -04:00
ad80c3d464 cleanup: separate network config into a role
Note that this also drops the package setup at the beginning of the
original wireless-setup.yml.

We no longer need to specify -e @default_vars.yml since it is included
in the role.
2022-08-06 21:42:30 -04:00
d139c423cb feat: Replace mr16_3 with ap3825i2
Following up from 08dab0af7da30a90a5bd130977704b0ec2ba60fb; the
replacement is now complete.
2022-08-05 14:49:18 -04:00
08dab0af7d feat: ap3825i2: prep to replace the mr16_3
This commit reconfigures the ap3825i2 in preparation for having it
replace mr16_3. We set up STP, prep some mesh VIFs and match it to the
mr16_3's channels.

Replacing the mr16_3 will fix Matt Woodbury's issues.
2022-08-02 00:15:10 -04:00
e1fd69bfee feat: packages: allow per-host package conf
We want to be able to assert / de-assert the presence of certain
packages.

Note that the ansible-openwrt role already gives us an opkg cache
refresh.
2022-08-02 00:11:23 -04:00
60ded8e0f7 fix: wifi-iface: apply skip_inactivity_poll and dissasoc_low_ack
I neglected to do this before.

Also, since these conf values now apply everywhere, shift the default
settings for these confs to just vgolan, where they are known-working.
2022-08-01 20:53:45 -04:00
3df974ae64 feat: inventory: Configure mr16_3 2022-07-26 15:56:13 -04:00
6592260901 feat: wifi_device: Make band vs hwmode configurable
As per openwrt.org[1], the `band` configurable was introduced in
OpenWrt 21.02.2, replacing `hwmode`.

To handle the pre-21.02.2 nodes to which we're deploying, allow us to
configure either of the two (but defaulting hwmode to null).

[1]: https://openwrt.org/docs/guide-user/network/wifi/basic
2022-07-26 15:35:47 -04:00
df2c87b5fc feat: Add a "vgomesh2" template 2022-07-26 12:45:20 -04:00
48b7e59dc6 cleanup: drop device defaults
We don't have any templating to do here ... yet. Maybe when we have
VPN connections we will.
2022-07-26 12:45:00 -04:00
7cfb5261ab cleanup: Remove ifname if it's still present in network.interface
This was a pre-21.02 thing. We will instead configure a device for the
network.interface to point to.
2022-07-26 12:43:44 -04:00
d265d2d9f7 feat: wifi-iface: Implement mesh_mode variant
- Use empty 'ssid:' in your template when you want it to be removed but
the mesh_id added

- Add an stp network.device option so mesh loops don't break things
2022-07-26 12:42:33 -04:00
c795ef6189 fix: We must set the wifi-iface's mode
... otherwise it won't work. This is usually AP.
2022-07-26 12:41:16 -04:00
772f1a78fb cleanup: DRY: Merge together VGO AP variations 2022-07-26 12:39:33 -04:00
c7e9c5f5b9 labb-wifi: initial commit
To set up WiFi:

```sh
ap -D -i inventory.yml wireless-setup.yml -e @default_vars.yml --ask-vault-pass
```
2022-07-25 22:28:57 -04:00