Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #194829 > unrolled thread

how to find out ethernet device name

Started byLong Wind <longwind2@yahoo.com>
First post2018-04-17 23:40 +0200
Last post2018-04-18 15:00 +0200
Articles 8 — 7 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  how to find out ethernet device name Long Wind <longwind2@yahoo.com> - 2018-04-17 23:40 +0200
    Re: how to find out ethernet device name Don Armstrong <don@debian.org> - 2018-04-17 23:50 +0200
      (solved) Re: how to find out ethernet device name Long Wind <longwind2@yahoo.com> - 2018-04-18 00:00 +0200
      Re: how to find out ethernet device name Ben Caradoc-Davies <ben@transient.nz> - 2018-04-18 00:20 +0200
        Re: how to find out ethernet device name Dan Purgert <dan@djph.net> - 2018-04-18 14:30 +0200
          Re: how to find out ethernet device name Brian <ad44@cityscape.co.uk> - 2018-04-18 14:50 +0200
      Re: how to find out ethernet device name Curt <curty@free.fr> - 2018-04-18 10:40 +0200
        Re: how to find out ethernet device name Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-18 15:00 +0200

#194829 — how to find out ethernet device name

FromLong Wind <longwind2@yahoo.com>
Date2018-04-17 23:40 +0200
Subjecthow to find out ethernet device name
Message-ID<vFGut-1QH-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

we used to call them eth0, eth1 ...now we use new names
i have a ethernet card in stretchhow to find out its name? Thanks!

[toc] | [next] | [standalone]


#194830

FromDon Armstrong <don@debian.org>
Date2018-04-17 23:50 +0200
Message-ID<vFGE9-1Uk-1@gated-at.bofh.it>
In reply to#194829
On Tue, 17 Apr 2018, Long Wind wrote:
> we used to call them eth0, eth1 ...now we use new names
> i have a ethernet card in stretchhow to find out its name? Thanks!

sudo ip link;

will show you what the available interface names are.


-- 
Don Armstrong                      https://www.donarmstrong.com

We cast this message into the cosmos. [...] We are trying to survive
our time so we may live into yours. We hope some day, having solved
the problems we face, to join a community of Galactic Civilizations.
This record represents our hope and our determination and our goodwill
in a vast and awesome universe.
 -- Jimmy Carter on the Voyager Golden Record

[toc] | [prev] | [next] | [standalone]


#194832 — (solved) Re: how to find out ethernet device name

FromLong Wind <longwind2@yahoo.com>
Date2018-04-18 00:00 +0200
Subject(solved) Re: how to find out ethernet device name
Message-ID<vFGNP-1Y1-13@gated-at.bofh.it>
In reply to#194830

[Multipart message — attachments visible in raw view] — view raw

Thank Don Armstrong !You are right.
  

    On Wednesday, April 18, 2018 5:46 AM, Don Armstrong <don@debian.org> wrote:
 

 On Tue, 17 Apr 2018, Long Wind wrote:
> we used to call them eth0, eth1 ...now we use new names
> i have a ethernet card in stretchhow to find out its name? Thanks!

sudo ip link;

will show you what the available interface names are.


-- 
Don Armstrong                      https://www.donarmstrong.com

We cast this message into the cosmos. [...] We are trying to survive
our time so we may live into yours. We hope some day, having solved
the problems we face, to join a community of Galactic Civilizations.
This record represents our hope and our determination and our goodwill
in a vast and awesome universe.
 -- Jimmy Carter on the Voyager Golden Record



   

[toc] | [prev] | [next] | [standalone]


#194833

FromBen Caradoc-Davies <ben@transient.nz>
Date2018-04-18 00:20 +0200
Message-ID<vFH7b-2kw-5@gated-at.bofh.it>
In reply to#194830
On 18/04/18 09:46, Don Armstrong wrote:
> On Tue, 17 Apr 2018, Long Wind wrote:
>> we used to call them eth0, eth1 ...now we use new names
>> i have a ethernet card in stretchhow to find out its name? Thanks!
> sudo ip link;
> will show you what the available interface names are.

And if you want the old style (eth0, eth1, wlan0, ...) interface names 
that are not generated from the hardware MAC address, append the kernel 
command line parameter net.ifnames=0 to GRUB_CMDLINE_LINUX in 
/etc/default/grub, run update-grub, and restart.

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

[toc] | [prev] | [next] | [standalone]


#194836

FromDan Purgert <dan@djph.net>
Date2018-04-18 14:30 +0200
Message-ID<vFUnL-2K8-7@gated-at.bofh.it>
In reply to#194833
Ben Caradoc-Davies wrote:
> On 18/04/18 09:46, Don Armstrong wrote:
>> On Tue, 17 Apr 2018, Long Wind wrote:
>>> we used to call them eth0, eth1 ...now we use new names
>>> i have a ethernet card in stretchhow to find out its name? Thanks!
>> sudo ip link;
>> will show you what the available interface names are.
>
> And if you want the old style (eth0, eth1, wlan0, ...) interface names 
> that are not generated from the hardware MAC address, append the kernel 
> command line parameter net.ifnames=0 to GRUB_CMDLINE_LINUX in 
> /etc/default/grub, run update-grub, and restart.

or just set a udev rule.

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281

[toc] | [prev] | [next] | [standalone]


#194837

FromBrian <ad44@cityscape.co.uk>
Date2018-04-18 14:50 +0200
Message-ID<vFUH7-2R8-7@gated-at.bofh.it>
In reply to#194836
On Wed 18 Apr 2018 at 12:13:31 -0000, Dan Purgert wrote:

> Ben Caradoc-Davies wrote:
> > On 18/04/18 09:46, Don Armstrong wrote:
> >> On Tue, 17 Apr 2018, Long Wind wrote:
> >>> we used to call them eth0, eth1 ...now we use new names
> >>> i have a ethernet card in stretchhow to find out its name? Thanks!
> >> sudo ip link;
> >> will show you what the available interface names are.
> >
> > And if you want the old style (eth0, eth1, wlan0, ...) interface names 
> > that are not generated from the hardware MAC address, append the kernel 
> > command line parameter net.ifnames=0 to GRUB_CMDLINE_LINUX in 
> > /etc/default/grub, run update-grub, and restart.
> 
> or just set a udev rule.

Or follow the advice here:

https://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/2018-February/016755.html

No, but you can setup your own naming scheme, matching on whatever you
see fit, including the MAC address.
Say I wanted to name my ethernet device net0, then you could setup
something like

$ cat /etc/systemd/network/70-net.link
[Match]
MACAddress=3D00:11:22:33:44:55:66

[Link]
Name=3Dnet0

If you are going to rename network interfaces, don't reuse the kernel
provided names, i.e. ethX and wlanX, as this is inherently racy.

See man systemd.link for more information on this.

If you are sure, that your system will only ever have a single network
interface, you can also disable the new default network interface naming
scheme and use the kernel provided names. See
/usr/share/doc/udev/README.Debian.gz =E2=86=92 &quot;Network interface naming&quot;=


Let me repeat: Using the kernel provided names is probably only a good
idea if you have a single network interface. With multiple interfaces,
you have no guarantee in which order they are enumerated and named.

I'm closing this bug report, as unfortunately there is nothing really
that systemd/udev can do, if your bios update has such effects.

Regards,
Michael

[toc] | [prev] | [next] | [standalone]


#194835

FromCurt <curty@free.fr>
Date2018-04-18 10:40 +0200
Message-ID<vFQNc-n0-7@gated-at.bofh.it>
In reply to#194830
On 2018-04-17, Don Armstrong <don@debian.org> wrote:
> On Tue, 17 Apr 2018, Long Wind wrote:
>> we used to call them eth0, eth1 ...now we use new names
>> i have a ethernet card in stretchhow to find out its name? Thanks!
>
> sudo ip link;

Do you need sudo for that (would I get something else here if I was
root)?

(I tried as root and cannot distinguish between the two outputs but won't paste that
here so as to not beat the thing over the head too hard.)

curty@einstein:~$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether c8:9c:dc:6f:d3:11 brd ff:ff:ff:ff:ff:ff

> will show you what the available interface names are.
>
>


-- 
"Three prisoners were locked in a cell. When the largest of them finished his
food, he immediately ate the others. Too bad. An apostrophe in the right place
might have prevented a horrible crime." Joe Gunn

[toc] | [prev] | [next] | [standalone]


#194838

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2018-04-18 15:00 +0200
Message-ID<vFUQN-2UB-1@gated-at.bofh.it>
In reply to#194835
On Wed, Apr 18, 2018 at 08:31:14AM +0000, Curt wrote:
> On 2018-04-17, Don Armstrong <don@debian.org> wrote:
> > sudo ip link;
> 
> Do you need sudo for that (would I get something else here if I was
> root)?

No, you don't.  Don is probably just used to the years of needing sudo
or an explicit path to ifconfig.  The ip command is in a place where
users can simply run it without needing either sudo or a prefixed path.

Looks like this has been the case since iproute2 was first added in
squeeze.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web