Closed hall closed 1 year ago
Added functionality to set the pvid
and allowed_vlans
. Is there any documentation on this /click
filesystem interface? Just sort of poking through what you already have to see what works. For example, I'm not sure which file to write to enable/disable a port.
Added functionality to set the
pvid
andallowed_vlans
. Is there any documentation on this/click
filesystem interface? Just sort of poking through what you already have to see what works. For example, I'm not sure which file to write to enable/disable a port.
The click project exists, but I think it has diverged significantly from what Cisco use on their devices.
I am not aware of any public documentation for the click
filesystem.
I'm not sure how to disable a port, that's never been a use case I tested.
Here are some failed attempts:
echo "PORT 2, ALLOWED_VLANS 1, ALLOW_TAGGED_IN 0, ALLOW_UNTAGGED_IN 0, PVID 1, UNTAGGED_VID 1" > /click/switch_port_table/set_vlan_allports_conf
echo "PORT 2, MODE forced, FORCE_SPEED 0" > /click/switch_port_table/set_port_phy_cfgs
Alright, using another Meraki switch with stock firmware (but with root access) I've figured out how to disable a port:
echo "PORT 1, MODE off" > /click/switch_port_table/set_port_phy_cfgs
To reenable the port, do the following:
echo "PORT 1, MODE aneg" > /click/switch_port_table/set_port_phy_cfgs
You can also force the port speed with the following:
echo "PORT 5, MODE forced, FORCE_SPEED 100fdx" > /click/switch_port_table/set_port_phy_cfgs
Nice find! I would never have guessed aneg
(even though that's what's shown in /click/switch_port_table/dump_port_phy_cfgs
).
I added port enable/disable functionality and a forced link speed setting (where 0
reverts to auto-negotiated).
Closing in favor of #29.
Initial shell script daemon to poll
/etc/switch.json
for changes. Intended to manage the config describe in #2 and eventually be the backend for #3.Currently, only PoE enable/disable is implemented as a proof of concept.
The following steps should work for testing.
switch.json
file:./configd
(first time will take a minute, depending on number of ports)/etc/switch.json
Implemented: