Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - io-pkt-v4-hc and multiple network interfaces: (5 Items)
   
io-pkt-v4-hc and multiple network interfaces  
Greetings QNX community

Our QNX 6.5.0 SP1 project requires two Ethernet connections, both using USB Ethernet style adapters. Although the 
adapters are of the same nature, they are different mfg/part numbers and hence use different QNX drivers.

Both devices are successfully enumerated by the HC (as listed by usb tool)  and I can get each connection to work 
separately using io-pkt-v4-hc/ifconfig harness:

io-pkt-v4-hc -vvvv -d<driver> -ptcpip
ifconfig en0 <ip> netmask <mask>

The problem starts when I'm trying to get both interfaces up at the same time:

io-pkt-v4-hc -vvvv -d<driver1> -ptcpip   <-- Success, /dev/io-net/en0  appears
io-pkt-v4-hc -vvvv -d<driver2> -ptcpip   <-- Success, but en1 doesn't appear anywhere as i was expecting. No errors 
reported though. 

Then I read carefully again through io-pkt-v4-hc documentation and found something called "instance" in there. So I 
tried specifying different instance numbers for each adapter:

io-pkt-v4-hc -i 1 -vvvv -d<driver1> -ptcpip   <-- Success, /dev/io-net1/en0  appears
io-pkt-v4-hc -i 2 -vvvv -d<driver2> -ptcpip   <-- Success, /dev/io-net2/en0  appears

At this point I'm very confused, this is clearly is not what I want to achieve. This seems to be creating separate 
stacks and further I don't quite see how to use ifconfig in this setup as both interfaces are registered as "en0". 

I also tried to play with "enmap" parameter but this one seems to be ignored completely.  

All I want is just to get my two network interfaces under /dev/io-net/ as

/dev/io-net/en0
/dev/io-net/en1

So that I can configure them as usual with

ifconfig en0 <ip1> netmask <mask1>
ifconfig en1 <ip2> netmask <mask2>
     

Any suggestions?

Thanks.
Re: io-pkt-v4-hc and multiple network interfaces  
Sounds like you simply want:

# io-pkt -d driver1 -d driver2

If you want multiple stacks you'll have do add the 'prefix' option
to target them individually with utilities.

# io-pkt -d driver1
# ifconfig

# io-pkt -d driver2 -ptcpip prefix=/alt
# SOCK=/alt ifconfig

This is all be documented in the io-pkt docs.

On Tue, Jan 29, 2013 at 03:53:48PM -0500, Oleg V wrote:
> Greetings QNX community
> 
> Our QNX 6.5.0 SP1 project requires two Ethernet connections, both using USB Ethernet style adapters. Although the 
adapters are of the same nature, they are different mfg/part numbers and hence use different QNX drivers.
> 
> Both devices are successfully enumerated by the HC (as listed by usb tool)  and I can get each connection to work 
separately using io-pkt-v4-hc/ifconfig harness:
> 
> io-pkt-v4-hc -vvvv -d<driver> -ptcpip
> ifconfig en0 <ip> netmask <mask>
> 
> The problem starts when I'm trying to get both interfaces up at the same time:
> 
> io-pkt-v4-hc -vvvv -d<driver1> -ptcpip   <-- Success, /dev/io-net/en0  appears
> io-pkt-v4-hc -vvvv -d<driver2> -ptcpip   <-- Success, but en1 doesn't appear anywhere as i was expecting. No errors 
reported though. 
> 
> Then I read carefully again through io-pkt-v4-hc documentation and found something called "instance" in there. So I 
tried specifying different instance numbers for each adapter:
> 
> io-pkt-v4-hc -i 1 -vvvv -d<driver1> -ptcpip   <-- Success, /dev/io-net1/en0  appears
> io-pkt-v4-hc -i 2 -vvvv -d<driver2> -ptcpip   <-- Success, /dev/io-net2/en0  appears
> 
> At this point I'm very confused, this is clearly is not what I want to achieve. This seems to be creating separate 
stacks and further I don't quite see how to use ifconfig in this setup as both interfaces are registered as "en0". 
> 
> I also tried to play with "enmap" parameter but this one seems to be ignored completely.  
> 
> All I want is just to get my two network interfaces under /dev/io-net/ as
> 
> /dev/io-net/en0
> /dev/io-net/en1
> 
> So that I can configure them as usual with
> 
> ifconfig en0 <ip1> netmask <mask1>
> ifconfig en1 <ip2> netmask <mask2>
>      
> 
> Any suggestions?
> 
> Thanks.
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post98877
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
Re: io-pkt-v4-hc and multiple network interfaces  
Thanks Sean

Interesting, I just checked again io-pkt docs at http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/i/io-pkt.
html and seems can't find any mention you can load more than one driver at a time. 

Just to confirm, are you saying I can simply do:

io-pkt-v4-hc -vvvv -d<driver1> -d<driver2> -ptcpip
ifconfig en0 ...
ifconfig en1 ...

Is that correct?

Thanks 
Re: io-pkt-v4-hc and multiple network interfaces  
On Tue, Jan 29, 2013 at 04:06:37PM -0500, Oleg V wrote:
> Thanks Sean
> 
> Interesting, I just checked again io-pkt docs at http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/i/io-pkt.
html and seems can't find any mention you can load more than one driver at a time. 

In first message you mentioned 6.5 sp1.  Docs are here:

http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp?topic=%2Fcom.qnx.doc.neutrino_utilities%2Fi%2Fio-pkt.html

> 
> Just to confirm, are you saying I can simply do:
> 
> io-pkt-v4-hc -vvvv -d<driver1> -d<driver2> -ptcpip
> ifconfig en0 ...
> ifconfig en1 ...
> 
> Is that correct?

Right.
Re: io-pkt-v4-hc and multiple network interfaces  
Thanks Sean! I'll give it a try in the morning.