Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - interface naming convention: (7 Items)
   
interface naming convention  
While testing io-pkt I noticed that the interfaces were rename from en0 to bge0 ( broadcom ).

I see a problem with this; it's common for system installed in the field to have the network card replace with a 
different model for what ever reason.  It seems changing the network card model ( and driver ) will end up changing the 
name of the interface. In our case this would break the system, requiring modification of configuration files.

How should this scenario be handle?  

I'm just starting testing with io-pkt, maybe I'm missing something obvious ;-)
Re: interface naming convention  
On Thu, May 01, 2008 at 02:19:11PM -0400, Mario Charest wrote:
> While testing io-pkt I noticed that the interfaces were rename from en0 to bge0 ( broadcom ).
> 
> I see a problem with this; it's common for system installed in the field to have the network card replace with a 
different model for what ever reason.  It seems changing the network card model ( and driver ) will end up changing the 
name of the interface. In our case this would break the system, requiring modification of configuration files.
> 
> How should this scenario be handle?  
> 
> I'm just starting testing with io-pkt, maybe I'm missing something obvious ;-)
> 

There's some mapping code in the stack that will map the
common ioctls: eg. en0 -> <first ethernet iface>

So that basics like 'ifconfig en0 <addr>' should work.  If
you set the qnx.kern.debug sysctl to >0 the stack will log
what it's mapping to the sloginfo.  This mapping can become
confusing if interfaces are unloaded / reloaded so there's
a 'enmap' option to disable it.

# io-pkt -ptcpip enmap=0

You can start with 'ifconfig -l' to see what interfaces are
available.

-seanb
Re: interface naming convention  
> On Thu, May 01, 2008 at 02:19:11PM -0400, Mario Charest wrote:
> > While testing io-pkt I noticed that the interfaces were rename from en0 to bge0 ( broadcom ).
> > 
> > I see a problem with this; it's common for system installed in the field to have the network card replace with a 
different model for what ever reason.  It seems changing the network card model ( and driver ) will end up changing the 
name of the interface. In our case this would break the system, requiring modification of configuration files.
> > 
> > How should this scenario be handle?  
> > 
> > I'm just starting testing with io-pkt, maybe I'm missing something obvious ;-)
> > 
> 
> There's some mapping code in the stack that will map the
> common ioctls: eg. en0 -> <first ethernet iface>
> 
> So that basics like 'ifconfig en0 <addr>' should work.  If
> you set the qnx.kern.debug sysctl to >0 the stack will log
                                       ^^^
                                       >=6
Re: interface naming convention  
> > On Thu, May 01, 2008 at 02:19:11PM -0400, Mario Charest wrote:
> > > While testing io-pkt I noticed that the interfaces were rename from en0 to
>  bge0 ( broadcom ).
> > > 
> > > I see a problem with this; it's common for system installed in the field 
> to have the network card replace with a different model for what ever reason. 
>  It seems changing the network card model ( and driver ) will end up changing 
> the name of the interface. In our case this would break the system, requiring 
> modification of configuration files.
> > > 
> > > How should this scenario be handle?  
> > > 
> > > I'm just starting testing with io-pkt, maybe I'm missing something obvious
>  ;-)
> > > 
> > 
> > There's some mapping code in the stack that will map the
> > common ioctls: eg. en0 -> <first ethernet iface>
> > 
> > So that basics like 'ifconfig en0 <addr>' should work.  If
> > you set the qnx.kern.debug sysctl to >0 the stack will log
>                                        ^^^
>                                        >=6


Just changed this mapping somewhat.
The following will return the result of
the mapping so the qnx.kern.debug sysctl
is no more.
# nicinfo en0
# ifconfig en0

There is now a sysctl to toggle the mapping
as well as the command line arg.

-seanb
Re: interface naming convention  
Using QNX 6.5.0 with the i.MX51, it seems the enmap=0 option has no effect.

#io-pkt-v4-hc -d mx51 mac=00049F00EA2C -p tcpip enmap=0
#ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
fec0: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:04:9f:00:ea:2c
        media: Ethernet none
#slay o-pkt-v4-hc
#io-pkt-v4-hc -d mx51 mac=00049F00EA2C
#ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
fec0: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:04:9f:00:ea:2c
        media: Ethernet none


Seems to enumerate as fec0 regardless of enmap. Is this expected?

RE: interface naming convention  
Hi Pat,
 
I think you misunderstand.
 
'fec0' is the published name for that driver. You'll always get the name(s) that the driver publishes.
 
The enmap option, as I understand it, enables/disables the use of 'en<X>' as a generic way to interact with NIC device 
instances. 
 
So, the question is - does 'ifconfig en0' work in both cases, or only without 'enmap=0'?
 
I could be wrong, but that's how I understood it...
 
Cheers
 
Dave

________________________________

From: Patrick Shelly [mailto:community-noreply@qnx.com]
Sent: Tue 2/1/2011 8:31 AM
To: technology-networking
Subject: Re: interface naming convention



Using QNX 6.5.0 with the i.MX51, it seems the enmap=0 option has no effect.

#io-pkt-v4-hc -d mx51 mac=00049F00EA2C -p tcpip enmap=0
#ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
fec0: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:04:9f:00:ea:2c
        media: Ethernet none
#slay o-pkt-v4-hc
#io-pkt-v4-hc -d mx51 mac=00049F00EA2C
#ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
fec0: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:04:9f:00:ea:2c
        media: Ethernet none


Seems to enumerate as fec0 regardless of enmap. Is this expected?





_______________________________________________

Technology
http://community.qnx.com/sf/go/post82829



Attachment: Text winmail.dat 4.91 KB
Re: RE: interface naming convention  
Thanks Dave. I was confusing the protocol option enmap=0 with the driver option name=en...

Cheers,

Pat