how to disable a switchport?

  • 1
  • Question
  • Updated 3 months ago
the swps would be admin down by default, and we would use net add interface swp<a-b> or swp<x> to enable them. i would like to know how to disable those back. i tried net delete interface swp<x>, restarted switchd, and also tried removing auto and iface commands of a particular swp<x> under /etc/network/interfaces
Photo of shakir


  • 448 Points 250 badge 2x thumb

Posted 3 months ago

  • 1
Photo of Alberto Furia

Alberto Furia

  • 216 Points 100 badge 2x thumb
You can use "ifdown $interface", "ip link set $interface down" or "net add interface $interface link down" to ADMNDN an interface but restarting switchd is definitely not an option. ;-)
Note that last command (net add...) permanently ADMDN the interface with a "link-down yes" in  /etc/network/interfaces.
Photo of Pete B

Pete B, Official Rep

  • 2,774 Points 2k badge 2x thumb
Hi Shakir, Alberto has it right. Here's the documentation on doing this: