Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete virtual interface in Linux? [closed]

ip link shows this:

[root@0-25-90-68-79-4a log]# ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000     link/ether 00:25:90:68:79:4a brd ff:ff:ff:ff:ff:ff 5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP      link/ether 00:25:90:68:79:4a brd ff:ff:ff:ff:ff:ff 8: gre0: <NOARP> mtu 1476 qdisc noop state DOWN      link/gre 0.0.0.0 brd 0.0.0.0 10: 35978f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br35978f0 state UP qlen 32     link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 13: br35978f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP      link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 

Here, the interface 35978f0 is the virtual interface which is tied to the bridge br 35978f0. I've already done ifconfig 35978f0 down and brctl delif br35978f0 35978f0.

But how do I delete interface 35978f0?

like image 736
vikas Avatar asked Dec 17 '15 04:12

vikas


People also ask

How do I delete virtual interface?

To delete a virtual interfaceIn the left pane, choose Virtual Interfaces. Select the virtual interfaces and then choose Delete. In the Delete confirmation dialog box, choose Delete.

How do I delete an ifconfig interface?

To delete an alias interface use ifconfig eth0:0 down. Note: for every scope (i.e. same net with address/netmask combination) all aliases are deleted, if you delete the first (primary). up This flag causes the interface to be activated.

How do I turn off an interface in Linux?

How to Disable a Network Interface. The “down” or “ifdown” flag with interface name (eth0) deactivates the specified network interface. For example, the “ifconfig eth0 down” or “ifdown eth0” command deactivates the eth0 interface if it is in an inactive state.


2 Answers

You can use sudo ip link delete to remove the interface.

like image 66
Frederik Deweerdt Avatar answered Sep 29 '22 08:09

Frederik Deweerdt


Have you tried:

ifconfig 10:35978f0 down

As the physical interface is 10 and the virtual aspect is after the colon :.

See also https://www.cyberciti.biz/faq/linux-command-to-remove-virtual-interfaces-or-network-aliases/

like image 43
Just trying to help Avatar answered Sep 29 '22 07:09

Just trying to help