On Sun, Nov 8, 2015 at 7:52 AM, Jonathan Billings billings@negate.org wrote:
On Nov 2, 2015, at 2:40 PM, Mike - st257 silvertip257@gmail.com wrote:
But when I try to remove it, I'm either trying to do something _actually_ not supported or I don't have the proper syntax to accomplish what I
want.
It doesn’t look like ‘ip link’ has the syntax to remove an alias, but it can be done via sysfs:
;-) Nice. [Forest for the trees!] I didn't think of sysfs because I was fixated on the ip link utility.
Thanks Jonathan!
# ip link show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 # ip link set dev lo alias loopback # ip link show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 alias loopback # echo > /sys/class/net/lo/ifalias # ip link show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
It also can be set there too:
# echo hicentos > /sys/class/net/lo/ifalias # ip link show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 alias hicentos
-- Jonathan Billings billings@negate.org
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos