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


Groups > linux.debian.user > #194837

Re: how to find out ethernet device name

From Brian <ad44@cityscape.co.uk>
Newsgroups linux.debian.user
Subject Re: how to find out ethernet device name
Date 2018-04-18 14:50 +0200
Message-ID <vFUH7-2R8-7@gated-at.bofh.it> (permalink)
References <vFGut-1QH-5@gated-at.bofh.it> <vFGut-1QH-3@gated-at.bofh.it> <vFGE9-1Uk-1@gated-at.bofh.it> <vFH7b-2kw-5@gated-at.bofh.it> <vFUnL-2K8-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web