The Ethernet device naming mistake (or one part of it)

October 18, 2011

In the beginning of Unix, all devices were accessed through the filesystem via files in /dev and ordinary file IO system calls (let's ignore ioctl()). This had all sorts of advantages that have been written up in plenty of Unix books and articles already, so I'm not going to try to repeat them.

Then came Berkeley and BSD Unix. As part of adding networking in general they added devices to represent network interfaces, but they did not put these devices in the filesystem. Your Ethernet devices had names but not /dev nodes, unlike other devices, and they were (and still are) manipulated only through special commands that knew about this special network device namespace and how to do things to it.

I'm sure that plenty of people have written plenty of things about how this is a bad idea and why, but I want to focus on one particular aspect of it today. To wit: you can't give Ethernet devices additional names.

(I would say 'aliases' if that didn't risk getting confused with the sort of aliases that you can give Ethernet devices.)

When devices are just entries in /dev, it is easy to give them not just an arbitrary name of your choice but several names all at once. This makes it easy to accommodate several different naming schemes at once. In turn this makes arguments over the 'proper' naming scheme for devices much less strongly charged; it's easy to have several and it's easy to change naming schemes over time.

(Linux currently has five different naming schemes for hard drives, although that's kind of an extreme case.)

BSD-style network devices don't get any of that. They have a single name, and often it's decided by the kernel. Don't like the kernel's naming scheme? You get to argue with the kernel developers, and if you win the argument other people will promptly start arguing with you.

(If you're lucky you can rename the network devices to new names. In the old days I believe that you didn't even get that; the kernel's name for the device was what you were stuck with, period.)

Written on 18 October 2011.
« What I want out of stable device names
Defending Berkeley's forced choice in network device naming »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Tue Oct 18 03:19:47 2011
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.