netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PROPOSAL]: Alias names for network interfaces
@ 2009-12-17 13:54 Narendra_K
  2009-12-17 14:48 ` Jan Engelhardt
  0 siblings, 1 reply; 35+ messages in thread
From: Narendra_K @ 2009-12-17 13:54 UTC (permalink / raw)
  To: net-tools, shemminger, netfilter-devel, jgarzik
  Cc: Matt_Domsch, Charles_Rose, Jordan_Hargrave, Sandeep_K_Shandilya

Hello,

[Please let me know if I have missed copying relevant list]

We have been having discussions in the netdev list and
anaconda-devel-list about creating multiple names for the network
interfaces to bring determinism 
into the way network interfaces are named in the OSes. In specific,
"eth0 in the OS does not always map to the integrated NIC Gb1 as labeled
on the chassis". This resulted in failures where user space expected the
port with link up to be "eth0", which in many cases would not be the
case. 
For example, installers and firewall. 

For more information on the issue please refer to
http://linux.dell.com/wiki/index.php/Oss/libnetdevname.

* For every network interface ethN, create a corresponding
/dev/net/ethN, which is a char device node, with minor number as the
interface index of the device.
And create symbolic links to this node under /dev/netdev/ such as
/dev/netdev/by-chassis-label/Embedded_NIC_1 which are based on smbios
names of the interfaces. 
Irrespective of what the OS names the port "Gb1" as,
/dev/netdev/by-chassis-label/Embedded_NIC_1 would always point to the
right interface with link up

http://linux.dell.com/wiki/index.php/Oss/libnetdevname#Proposal_1:

http://marc.info/?l=linux-netdev&m=125510301513312&w=2 - (Re: PATCH:
Network Device Naming mechanism and policy)
http://marc.info/?l=linux-netdev&m=125619338904322&w=2 - ([PATCH] udev:
create empty regular files to represent net)

It was suggested that an installer based approach be adopted

* Installer would provide options to the users to name the interfaces
based on different naming conventions such as

a)Chassis label - For Ex: Embedded_NIC_1[23..]
b)Driver based names - For Ex: bce0, bce1 etc

https://www.redhat.com/archives/anaconda-devel-list/2009-November/msg005
16.html
https://www.redhat.com/archives/anaconda-devel-list/2009-December/msg000
27.html

This was not favored too. These discussions resulted in a solution where
the alias names for network devices be implemented
completely in user space. In this solution libnetdevname would be
suggesting the alias names for network interfaces based on the bios
given
names for the interfaces. The bios names for the network interfaces are
available via smbios tables.

http://linux.dell.com/wiki/index.php/Oss/libnetdevname#Proposal_2


The solution would have below mentioned components - 


1. A library which would provide the following functionality.

    * Given an alias name, it would return the kernel name
    * Given a kernel name, provide a list of aliases
    * Tell us which alias is descriptive for a given kernel name, which
in this case will be Embedded_NIC_N 

2. User space tools like ifconfig, ip and iptables would support these
aliases such as Embedded_NIC_1 in addition to the ethN names.
These tools would call upon the library to map the Embedded_NIC_1 to a
ethN name. This would help bring in determinism in the way 
network interfaces are referred so that tools that expect determinism do
not fail.

For example - 

/sbin/ifconfig Embedded_NIC_1
/sbin/ip Embedded_NIC_N

Embedded_NIC_1 would always refer to the Integrated Port 1 on the system
Chassis labelled "Gb1" irrespective of how it is named by
the kernel and the library would provide this mapping. 


This solution would not need the kernel names of the network interfaces
(i.e ethN) to be changed. Here is how an example patch would 
look like - 

+	if (netdev_alias_to_kernel_name(alias_name,kernel_ifname) < 0) {
+                show_alias_name_usage();
+	}
+        strncpy(ifname, kernel_ifname, IFNAMSIZ);


where alias_name is "Embedded_NIC_N" and kernel name is ethN which is
returned by the library after it maps the bios given name to the 
kernel name of the network interface.( Here are some example patches for
ethtool, ip and net-tools which were written for char device node
solution. The patches to implement new proposal would look similar -

http://linux.dell.com/libnetdevname/patches/net-tools-1.60_libnetdevname
.patch
http://linux.dell.com/libnetdevname/patches/ethtool-6_libnetdevname.patc
h
http://linux.dell.com/libnetdevname/patches/iproute2-2.6.29_libnetdevnam
e.patch )


We would like to know the views of the upstream maintainers of the tools
about this proposal.

With regards,
Narendra K
Linux Engineering


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2010-01-20 16:43 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <EDA0A4495861324DA2618B4C45DCB3EE5899AC@blrx3m08.blr.amer.dell.com>
2010-01-12 19:49 ` Re:[PROPOSAL]: Alias names for network interfaces Narendra K
2010-01-13  0:11   ` Jan Engelhardt
2010-01-13  6:47     ` [PROPOSAL]: " Narendra_K
2010-01-13 11:04       ` Bernd Eckenfels
2010-01-13 17:22         ` John Haxby
2010-01-13 17:46           ` Domsch, Matt
2010-01-13 18:11             ` Bernd Eckenfels
2010-01-13 18:21             ` Jan Engelhardt
2010-01-14  8:44               ` Patrick McHardy
2010-01-14  9:35                 ` Jan Engelhardt
2010-01-15 19:14               ` Narendra_K
2010-01-18 17:07                 ` Marco Innocenti
2010-01-19 17:32                   ` Narendra_K
2010-01-19 22:31                     ` Stephen Hemminger
2010-01-20  1:02                       ` Bernd Eckenfels
2010-01-20 16:42                       ` Narendra_K
2010-01-13 17:54           ` Stephen Hemminger
2010-01-13 13:24   ` Patrick McHardy
2010-01-13 13:43     ` Jan Engelhardt
2010-01-13 16:27       ` Stephen Hemminger
2010-01-13 17:00         ` Narendra_K
2010-01-14  8:41           ` Patrick McHardy
2009-12-17 13:54 Narendra_K
2009-12-17 14:48 ` Jan Engelhardt
2009-12-18  2:02   ` Bernd Eckenfels
2009-12-18 13:19     ` Narendra_K
2009-12-18 13:42       ` Jan Engelhardt
2009-12-18 14:02         ` Domsch, Matt
2009-12-18 14:08         ` Domsch, Matt
2009-12-18 14:15           ` Jan Engelhardt
2009-12-20  0:12             ` Jordan_Hargrave
2009-12-18 17:38       ` Stephen Hemminger
2009-12-21 17:28         ` Narendra_K
2009-12-21 17:36           ` Stephen Hemminger
2009-12-23 17:11             ` Narendra_K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).