Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #2117
| From | Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> |
|---|---|
| Newsgroups | comp.os.linux.networking |
| Subject | Re: ifalias of a network device |
| Date | 2013-05-08 11:31 +0200 |
| Organization | Plouf ! |
| Message-ID | <kmd60r$gu1$1@saria.nerim.net> (permalink) |
| References | <ce2dc81b-eb97-4cc5-99bd-8bd14e2f6af4@googlegroups.com> |
Hello, johnsonzjo@gmail.com a écrit : > > I tried: > ip link set em1 alias myalias > and > cat /sys/class/net/em1/ifalias > gives: > myalias > > I also tried: > ifconfig p2p1:0 1.2.3.4 > but: > cat /sys/class/net/p2p1/ifalias > gives nothing. > > what is the difference between the two ? /sys/class/net/p2p1/ifalias contains an arbitrary text attribute associated to the network interface p2p1. AFAIK, it cannot be used as an interface name by commands such as ifconfig or ip. p2p1:0 is a label associated to a specific IPv4 address assigned to p2p1, sometimes referred to as "IP alias". Note "IP", not "interface". "ip addr" shows it in the line containing that IPv4 address. Labels are a legacy from old times and are not supported for IPv6 address. It can be used as an interface name by ifconfig to refer to the associated IPv4 address or by ip but then it refers to the whole interface, not just the associated address (ip seems to strip the :* part). > is there a way that I will set an alias with > ifconfig so I will see it in /sys/class/net/em1/ifalias? I don't think so. These are two completely different unrelated things.
Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ifalias of a network device johnsonzjo@gmail.com - 2013-05-08 01:45 -0700 Re: ifalias of a network device Richard Kettlewell <rjk@greenend.org.uk> - 2013-05-08 09:58 +0100 Re: ifalias of a network device Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2013-05-08 11:31 +0200 Re: ifalias of a network device wkevin <wkevils@gmail.com> - 2013-05-13 20:08 -0700
csiph-web