[Xorp-hackers] Network interface naming

Pavlin Radoslavov pavlin@icir.org
Sat, 22 Jan 2005 12:38:42 -0800


All,

Below I am including an email from "Kurt J. Lidl" <lidl@pix.net>
with some very interesting thoughts on the subject of network
interface naming (email included with author's permission).

This is definitely something that has to be considered, hence I am
forwarding his email to the list to start a discussion on the
subject.

Thanks,
Pavlin

------- Forwarded Message
Date: Thu, 20 Jan 2005 22:00:58 -0500
From: "Kurt J. Lidl" <lidl@pix.net>
To: Pavlin Radoslavov <pavlin@icir.org>
Subject: Re: [Xorp-hackers] Large Number of Interfaces

On Thu, Jan 20, 2005 at 03:58:23PM -0800, Pavlin Radoslavov wrote:
> > One of the things that most modern routers "get right" is that the
> > interfaces present have consistant names, more or less based on
> > slot number/interface number.  And these names don't change if you
> > put more hardware into the router/switch.
> > 
> > Back in the bad old days at UUNET (I was one of the early ones there),
> > we used Cisco AGS routers.   These are multibus based computers, with
> > either a 68030 or 68040 based CPU board, with or without flash to boot
> > from, and various multibus based interfaces (2E2T, 4T, 4S, 2E), etc.
> > 
> > The IOS code from that decade just attached interfaces as it found
> > them, scanning from one slot to the next.  (Similar to the way that
> > unix machines do it today.)  If slot 1 had a 2E2T card, you had
> > ethernet0, ethernet1, serial0, serial1.  If you skipped a slot,
> > and then had a 4T card, you got additional interfaces - serial2..serial5.
> > If you inserted a 4S card into the empty slot, the router would
> > come up with ethernet0, ethernet1 and serial0..serial9.  Of course,
> > serial2..serial5 are now on the 4S card, not the 4T card!
> > 
> > So, you'd have to furiously delete and move configurations from
> > serial interface to serial interface many times when you changed
> > the hardware.  This sucked majorly.
> > 
> > On modern cisco/juniper machines, you have a slot number/interface
> > number scheme, so you might have gigabitethernet 0/1 or 0/2, and
> > the interfaces don't go changing names out from under you, just
> > because a new one got installed in the machine.
> > 
> > This problem is more or less ingrained into BSD style networking
> > stacks -- they just attach each instance of each driver type as
> > it is probed and attached.
> > 
> > One notable exception to this is the modified version of BSD/OS
> > that Ascend changed for the GRF router.  They had interfaces that
> > had slot and unit numbers encoded in them, so the first ethernet
> > on the machine might be ge000, and the second g001, etc.
> > Where the unit numbers where 0XY and X==board, and Y==interface.
> > 
> > There's going to be a understanding mis-match with XORP on unix
> > machines and the router folks that expect interface names to remain
> > consistant, even if hardware is added.  And it will cause problems.
> > It's not an XORP problem, but rather a fundemental difference in how
> > BSD-ish systems attach interfaces.
> > 
> > It might be interesting to figure out how hard it would be to
> > change the interface probe and attach stuff to have things
> > reordered/renamed by xorp.  ie, the system attaches the following
> > cards:
> > 	fxp0 (single port pci card),
> > 	fxp1 (first port on a dual-port PCI card),
> > 	fxp2 (second port on a dual-port PCI card),
> > 	fxp3 (single port pci card),
> > 
> > but XORP could rename them to be fxp00,fxp10,fxp11,fxp20
> > 
> > Something to think about, at any rate...
> 
> Very interesting, indeed.
> I will inform the rest of the core team, and we will think about it.

If you need/want to discuss this with me, I'd be happy to participate
in email discussions about it.  One other thing that strikes me, since
the difficulty of getting the BSD systems (let alone any of the other
unix-like platforms XORP runs on) to change to make them operate
more like "routers" is large, you probably need to address this inside
of XORP.

While the "renaming" of devices like the example I gave might be nice,
it might be sufficient to have a interface mapping section of the
configuration file, where you could map:

device name  -> interface "label"
	fxp0 -> fxp000
	fxp1 -> fxp010
	fxp2 -> fxp011
	fxp3 -> fxp020

I realized, from a completely addressibility issue, you really want to
have names like aaaXYZ:
	where aaa = interface driver, X = bus #, Y = slot, Z = instance

Having the bus number brought out might be overkill, but it would
matter on really big machines where there are multiple busses, such
as many multiprocessor machines today.

If you had a mapping section like that, the rest of the configuration
could just use the "label" (eg fxp000) for what routing protocols need
to attached to what interfaces later in the configuration.  It's an
idea, but I don't know if it will work in all instances.

I'm not sure how you do completely virtual interfaces, such as vlans
(although I guess they are tied to particular physical interfaces),
or say async ppp...

- -Kurt

------- End of Forwarded Message