Manage Switch Ports from Console
-
Is there a way to manage switch ports from the console port? I would like to at least be able to enable and disable switch ports on my 7100 from within the console.
-
You can do it temporarily using the
etherswitchcfg
command directly.That doesn't get set in the config though so any changes in the GUI would revert it.
You could do it using PHP shell commands. If it's just one port you can record a session to enable/disable it.
https://docs.netgate.com/pfsense/en/latest/development/php-shell.htmlSteve
-
@stephenw10 I just tried changing one of the ports on the 7100 1U from "auto" to "none", and it looks like all the traffic was dropped briefly. Is that expected? And would editing the config file via PHP or enabling the port via etherswitchcfg have the same effect on all the traffic?
-
Applying a change by playing back a php shell script is the same as editing it in the GUI. Assuming the script is correct!
Both those things apply changes via the etherswitchcfg command. So, yes, I'd expect the behaviour to be the same at the time of the change.Steve