Bringing an interface up or down with ip link set dev IFACE up|down is the standard runtime way to change the administrative state of a network device on Linux. This is useful for short maintenance windows, failover tests, or resetting a secondary interface without editing persistent network configuration yet.

The up and down actions change the interface immediately, but they control administrative state only. After an interface is set up, it still needs lower-layer readiness such as carrier, a live peer, or any required network policy before it can actually pass traffic.

Taking down the wrong interface can cut off the current SSH session or interrupt production traffic. Confirm the target interface first and use console or out-of-band access when working on the primary management path.

  1. Check the current state of the target interface before changing it.
    $ ip link show dev lab0
    13: lab0@lab1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
        link/ether 86:95:dd:71:34:c6 brd ff:ff:ff:ff:ff:ff

    Replace lab0 with the actual interface name. Exact interface index numbers, MAC addresses, and peer suffixes vary by host.

  2. Bring the interface down when it should stop carrying traffic.
    $ sudo ip link set dev lab0 down

    No output usually means the kernel accepted the state change.

    Do not run this against the interface carrying the current remote session unless another management path is ready.

  3. Verify that the interface is administratively down.
    $ ip link show dev lab0
    13: lab0@lab1: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
        link/ether 86:95:dd:71:34:c6 brd ff:ff:ff:ff:ff:ff

    When the interface is down, the UP flag disappears and the reported state becomes DOWN.

  4. Bring the interface back up when it should return to service.
    $ sudo ip link set dev lab0 up

    No output usually means the kernel accepted the state change.

  5. Verify that the interface is administratively up again.
    $ ip link show dev lab0
    13: lab0@lab1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
        link/ether 86:95:dd:71:34:c6 brd ff:ff:ff:ff:ff:ff

    Look for the UP flag after the command. LOWER_UP or state UP still depends on the lower layer, so an unplugged cable or inactive peer can leave the interface unusable even after up succeeds.

  6. Update the host's persistent network configuration separately if the new state must survive interface recreation or a reboot.

    ip link set changes live kernel state only, so network-management tooling or the next boot can restore a different interface state.