Help!

physical network device to internal device mapping

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  Bug#650771: linux-image-2.6.39-bpo.2-amd64: r8169..  
Author Message
jagdip
External


Since: Dec 02, 2011
Posts: 2



PostPosted: Fri Dec 02, 2011 10:51 am    Post subject: physical network device to internal device mapping
Archived from groups: linux>redhat (more info?)


Hello,

How to know which Physical ethernet port is assigned what device name
such as eth0, eth1 internally ?
is there a command for that ?
Back to top
Eef Hartman
External


Since: Jul 12, 2009
Posts: 91



PostPosted: Sat Dec 03, 2011 7:10 am    Post subject: Re: physical network device to internal device mapping [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

jagdip wrote:
> How to know which Physical ethernet port is assigned what device name
> such as eth0, eth1 internally ?
> is there a command for that ?

When you're using udev (almost all newer distro's/releases):
cat /etc/udev/rules.d/70-persistent-net.rules
It'll give you lines like this:
# PCI device 0x14e4:0x167b (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:81:11:af:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
so with the driver/chipset (in the comment, tg3 is tigon3),
MAC-address and device NAME of all found adaptors.
The file is persistent, so the adaptor with _that_ address will
always be given the same NAME.
--
******************************************************************
** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
** e-mail: E.J.M.Hartman.DeleteThis@tudelft.nl - phone: +31-15-27 82525 **
******************************************************************
Back to top
jagdip
External


Since: Dec 02, 2011
Posts: 2



PostPosted: Mon Dec 19, 2011 9:36 am    Post subject: Re: physical network device to internal device mapping [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 3, 6:20 am, Eef Hartman wrote:
> jagdip wrote:
> > How to know which Physical ethernet port is assigned what device name
> > such as eth0, eth1 internally ?
> > is there a command for that ?
>
> When you're using udev (almost all newer distro's/releases):
> cat /etc/udev/rules.d/70-persistent-net.rules
> It'll give you lines like this:
> # PCI device 0x14e4:0x167b (tg3)
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:81:11:af:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
> so with the driver/chipset (in the comment, tg3 is tigon3),
> MAC-address and device NAME of all found adaptors.
> The file is persistent, so the adaptor with _that_ address will
> always be given the same NAME.
> --
> ******************************************************************
> **  Eef Hartman, Delft University of Technology, dept. SSC/ICT  **
> **  e-mail: E.J.M.Hart....TakeThisOut@tudelft.nl - phone: +31-15-27 82525   **
> ******************************************************************

Eef,

thank you
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum