如何删除网络?

如何删除网络?

/etc/sysconfig/network-scripts/在 RHEL 上有 3 个网络:

ifcfg-lan0 ifcfg-lan1 ifcfg-lo

ip a将列出这些信息:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    ....
2: lan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    ....
3: lan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    ....

我想删除lan1

我删除了ifcfg-lan1/etc/sysconfig/network-scripts/

运行$ sudo ip link delete lan1得到:

RTNETLINK answers: Operation not supported

重启网络服务

sudo systemctl restart network

重新启动系统然后得到:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    ....
2: lan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    ....
3: lan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    ....

如何去除lan1

相关内容