[Xorp-hackers] Large Number of Interfaces

Pavlin Radoslavov pavlin@icir.org
Thu, 20 Jan 2005 12:23:01 -0800


> >BTW, can you be a bit more specific about the type of dynamic
> >interfaces you want to create/use, This can help defining the
> >solution.
> 
> By "dynamic", I meant the ability to create/delete interfaces on the fly
> (inside of xorpsh for example), as you said. I didn't mean "dynamic
> interface" as a different type of interfaces. That is, it's just a plain
> interface, which could be for example a plain Ethernet interface or a
> logical interface on a physical interface. Sorry for the confusion.

A small clarification.
On UNIX, you cannot from add from useland, say, an Ethernet
interface if the hardware is not in the machine. The creation of
such hardware-associated interfaces is done automatically by the
kernel.

> >Adding this functionality is on our TODO list.
> 
> Adding this would be very nice. Obviously one could build something that
> add/delete interfaces to/from OS via a different path, but I hope that
> xorpsh will be the interface that one does everything. This would be a
> keen to CLI of any switch/router. Is XORP-sh extensible? In other words,
                                    ~~~~~~~~~~~~~~~~~~~~~~
XORP (the eXtensible Open Router Platform) is suppose to be
extensible by definition :)

> could I add my own commands and interfaces? The platform I am working
> with has capabilities other than routing such as Ethernet switching
> (including VLAN), MPLS, etc. It would be nice that I could use xorpsh to
> integrate my Ethernet switching and MPLS commands.

Yes, you could extend xorpsh to run external commands from within
the CLI. Currently, you can use the operational commands mode to do
that (those are the "show"-like commands before you type
"configure"). For example, the xorpsh "ping" and "traceroute"
commands are implemented by running the external OS command.

Please have a look in the "etc/templates/misc.cmds" and
"etc/templates/host.cmds" files for examples of how to add your own
external commands. Also, please have a look at Section 4.1
"Operational Commands and xorpsh" in the "XORP Router Manager
Process (rtrmgr)" design document.

You can use same mechanism to add the appropriate OS commands (e.g.,
ifconfig) to create the network interfaces you need. However, I
would not recommend sticking with this hack for creating the network
interfaces as a long-term solution. Configurating the system should
be done within the configurational mode only. Hence, you should have
it in mind that what you do now should be refactored to some more
appropriate solution once XORP has the support for it.

Regards,
Pavlin