

You can still use the -a options because these interfaces are also in the auto class: sudo ifup sudo ifreload -a This allows you to perform operations on only these interfaces using the -allow=uplinks option. For example, if you have multiple interfaces used for uplinks, you can define a class called uplinks: auto swp1 You can add other classes using the allow prefix. The most common class is auto, which you configure like this: auto swp1 You specify classes in the /etc/network/interfaces file. Ifupdown2 enables you to group interfaces into separate classes, where a class is a user-defined label that groups interfaces that share a common function (such as uplink, downlink or compute). Link/ether 44:38:39:00:03:c1 brd ff:ff:ff:ff:ff:ffįor additional information on interface administrative state and physical state, refer to this knowledge base article. ip link show dev swp1ģ: swp1: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 500 In the following example, swp1 is administratively UP and the physical link is UP (LOWER_UP flag). To see the link and administrative state, use the ip link show command.

To bring the interface back up, run the sudo ifup -admin-state command: sudo ifup swp1 -admin-state These commands create the following configuration in the /etc/network/interfaces file: auto swp1 To put an interface into an admin down state, run the sudo ifdown -admin-state command: sudo ifdown swp1 -admin-state When you put an interface into an admin down state, the interface remains down after any future reboots or configuration changes with ifreload -a. Alternatively, you can use NCLU commands.

To administratively bring the interface up or down for example, to bring down a port, bridge, or bond but not the physical connection for a port, bridge, or bond, you can use the -admin-state option. When you bring down the physical connection to an interface, it is brought back up automatically after any future reboots or configuration changes with ifreload -a. The ifdown command always deletes logical interfaces after bringing them down. The following example command brings down the physical connection to swp1: sudo ifdown swp1 To bring down the physical connection to a single interface, run the sudo ifdown command. The following example command brings up the physical connection to swp1: sudo ifup swp1 To bring up the physical connection to an interface or apply changes to an existing interface, run the sudo ifup command. Use the verbose option ( -v) to show commands as they are executed when bringing an interface down or up.
