Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - IPV6 support in QNX6.5: (11 Items)
   
IPV6 support in QNX6.5  
Hi,

I'm testing our product on QNX6.5, and I see some failures caused by the IPV6 support.

Here is the issue, our product is using getaddrinfo to get the address, and the function can return two addresses, one 
for IPV4, and one for IPV6.

But the issue is that, there seems to be no way to create a IPV6 socket. I've tried the following 3 ways to create the 
socket, but each way fails.

fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP);
fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_IPV6);
fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);

So, does anyone know how to enable IPV6 support ?  It seems to say that, IPV6 support is not turned on for some licenses
, is that true ?

Thanks
-W
Re: IPV6 support in QNX6.5  
On Mon, May 09, 2011 at 11:10:59PM -0400, David Zhao wrote:
> Hi,
> 
> I'm testing our product on QNX6.5, and I see some failures caused by the
> IPV6 support.
> 
> Here is the issue, our product is using getaddrinfo to get the address,
> and the function can return two addresses, one for IPV4, and one for
> IPV6.
> 
> But the issue is that, there seems to be no way to create a IPV6 socket.
> I've tried the following 3 ways to create the socket, but each way
> fails.
> 
> fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP);
> fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_IPV6);
> fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
> 
> So, does anyone know how to enable IPV6 support ?  It seems to say that,
> IPV6 support is not turned on for some licenses, is that true ?
> 

run io-pkt-v6*

Regards,

-seanb
Re: IPV6 support in QNX6.5  
Hi Seanb,

Thanks for the answer which does somehow enable the IPV6.

I run the io-pkg-v6-hc, and now I can create a socket of AF_INET6. But the issue is that, the machine can not connect 
the outside network now(It can be connected by other hosts using ssh).

Here is what I get whenIping other hosts from this qnx6.5 host:

# ping bdbcn3
ping: Cannot resolve "bdbcn3" (Host name lookup failure)

Likewise, it can not ssh to other machines.

I read some docs these days, but haven't found how to solve this issue.

Does anyone know how to solve this kind of issue ?

Thanks,
-Winter
Re: IPV6 support in QNX6.5  
Look at the docs for /etc/resolv.conf and make sure your routes are set up properly.

Regards,

-seanb

----- Original Message -----
From: David Zhao [mailto:community-noreply@qnx.com]
Sent: Thursday, May 26, 2011 04:50 AM
To: ostech-core_os <post86155@community.qnx.com>
Subject: Re: IPV6 support in QNX6.5

Hi Seanb,

Thanks for the answer which does somehow enable the IPV6.

I run the io-pkg-v6-hc, and now I can create a socket of AF_INET6. But the issue is that, the machine can not connect 
the outside network now(It can be connected by other hosts using ssh).

Here is what I get whenIping other hosts from this qnx6.5 host:

# ping bdbcn3
ping: Cannot resolve "bdbcn3" (Host name lookup failure)

Likewise, it can not ssh to other machines.

I read some docs these days, but haven't found how to solve this issue.

Does anyone know how to solve this kind of issue ?

Thanks,
-Winter




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post86155
Re: IPV6 support in QNX6.5  
Hi Seanb, 

Thanks for your answer first.

I check my /etc/resolv.conf and I think it is fine:

nameserver ip_address1
nameserver ip_address2
nameserver ip_address3
domain cn.XXX.com
search cn.XXX.com

It is same with another Linux host's resolv.conf.

When starting, the QNX machine can visit outside world well. It can ping another machine, and ssh to other machines.  
And when running ifconfig -a, I can see two network interfaces: lo and en0

But after running any of io-pkt-v4,io-pkt-v4-hc or io-pkt-v6-hc(I ran these without any parameter), the network seems to
 break down, and I can only see "lo" when running "ifconfig -a".

I've checked the /etc/net.cfg, and /etc/hosts, and they all look fine.

Since my network card is "Broadcom BCM5754 Gigabit Ethernet", I also tried to call io-pkt-v6-hc with all the broadcom's 
drivers(devnp-bge.so, devnp-bce.so, devnp-bcm43xx.so), but none of them helps:

# io-pkt-v6-hc -v -d /lib/dll/devnp-bge.so
# Unable to init /lib/dll/devnp-bge.so: No such device or address

So, any clue about how to diagnose the issue and solve it ?

Regards,
--Winter

Re: IPV6 support in QNX6.5  
Could you post output of "pidin ar" before and after you try to start io-pkt-xxx?

Regards, PKY
Re: IPV6 support in QNX6.5  
Hi Poval, Seanb,

Here is the output of "pidin ar" before and after running io-pkt-v6-hc:

before:

     pid Arguments
       1 procnto-smp-instr
       2 /sbin/tinit -p
    4099 pci-bios
    4100 slogger -s32
    4101 io-usb -duhci -dohci -dehci
    4102 io-hid -d ps2ser kbd:kbddev:ps2mouse:mousedev -d usb /dev/io-usb/io-usb
    4103 devc-con-hid -n4
    8200 devb-eide blk auto=partition dos exe=all qnx6 sync=optional cam quiet
   20489 pipe
   24586 mqueue
   53259 /usr/sbin/mcd /etc/mcd.conf
   57356 random -t
   61453 enum-devices -c/etc/system/enum/common -i. -I~ -I.bak -ebootdev -Elegacy neednet,$(legacy) -E=D bus=none
   77840 enum-usb
   94222 io-audio
  110607 devc-ser8250 -u1 3f8,4
  110610 devc-par -p0x378
  114708 io-display
  131093 io-pkt-v4-hc -ptcpip
  163857 devc-pty -n 32
  176147 dumper -d /var/dumps
  192534 login
  192535 login
  192536 login
  221211 Photon -g -lphlogin2 "-Sphshutdown -l"
  241692 /usr/photon/bin/io-graphics
  258079 /usr/photon/bin/devi-hid mouse kbd
  270361 login
  335902 pwm
  364576 shelf
  385057 bkgdmgr
  385058 wmswitch
  385059 saver
  434202 pterm
  434205 /bin/sh
  438309 /usr/sbin/sshd
  450596 /usr/sbin/sshd -R
  458790 /usr/sbin/sshd -R
  458791 -sh
  602152 pidin ar


And after:

     pid Arguments
       1 procnto-smp-instr
       2 /sbin/tinit -p
    4099 pci-bios
    4100 slogger -s32
    4101 io-usb -duhci -dohci -dehci
    4102 io-hid -d ps2ser kbd:kbddev:ps2mouse:mousedev -d usb /dev/io-usb/io-usb
    4103 devc-con-hid -n4
    8200 devb-eide blk auto=partition dos exe=all qnx6 sync=optional cam quiet
   20489 pipe
   24586 mqueue
   53259 /usr/sbin/mcd /etc/mcd.conf
   57356 random -t
   61453 enum-devices -c/etc/system/enum/common -i. -I~ -I.bak -ebootdev -Elegacy neednet,$(legacy) -E=D bus=none
   77840 enum-usb
   94222 io-audio
  110607 devc-ser8250 -u1 3f8,4
  110610 devc-par -p0x378
  114708 io-display
  131093 io-pkt-v4-hc -ptcpip
  163857 devc-pty -n 32
  176147 dumper -d /var/dumps
  192534 login
  192535 login
  192536 login
  221211 Photon -g -lphlogin2 "-Sphshutdown -l"
  241692 /usr/photon/bin/io-graphics
  258079 /usr/photon/bin/devi-hid mouse kbd
  270361 login
  335902 pwm
  364576 shelf
  385057 bkgdmgr
  385058 wmswitch
  385059 saver
  434202 pterm
  434205 /bin/sh
  438309 /usr/sbin/sshd
  450596 /usr/sbin/sshd -R
  458790 /usr/sbin/sshd -R
  458791 -sh
  708649 io-pkt-v6-hc
  774184 pidin ar

Sloginfo does not show error information:

May 31 10:24:51    5    14     0 tcpip starting
May 31 10:24:51    3    14     0 Using pseudo random generator.  See "random" option
May 31 10:24:51    5    14     0 initializing IPsec... done
May 31 10:24:51    5    14     0 IPsec: Initialized Security Association Processing.

It seems io-pkt-v4-hc and io-pkt-v6-hc are running at the same time ? So how to turn off the first then ?  I haven't 
found the way in the docs about io-pkt-v4-hc and io-pkt-v6-hc. 

Another question is that, is there any way for me to know which driver in lib/dll is used by io-pkt-v4-hc ?

Regards,
-Winter
Re: IPV6 support in QNX6.5  
Check the sloginfo.  You need to slay off the initial instance of io-pkt first.  The second instance probably can't 
attach to the hardware because the first still has ownership.

Regards,

-seanb

----- Original Message -----
From: David Zhao [mailto:community-noreply@qnx.com]
Sent: Friday, May 27, 2011 04:27 AM
To: ostech-core_os <post86187@community.qnx.com>
Subject: Re: IPV6 support in QNX6.5

Hi Seanb, 

Thanks for your answer first.

I check my /etc/resolv.conf and I think it is fine:

nameserver ip_address1
nameserver ip_address2
nameserver ip_address3
domain cn.XXX.com
search cn.XXX.com

It is same with another Linux host's resolv.conf.

When starting, the QNX machine can visit outside world well. It can ping another machine, and ssh to other machines.  
And when running ifconfig -a, I can see two network interfaces: lo and en0

But after running any of io-pkt-v4,io-pkt-v4-hc or io-pkt-v6-hc(I ran these without any parameter), the network seems to
 break down, and I can only see "lo" when running "ifconfig -a".

I've checked the /etc/net.cfg, and /etc/hosts, and they all look fine.

Since my network card is "Broadcom BCM5754 Gigabit Ethernet", I also tried to call io-pkt-v6-hc with all the broadcom's 
drivers(devnp-bge.so, devnp-bce.so, devnp-bcm43xx.so), but none of them helps:

# io-pkt-v6-hc -v -d /lib/dll/devnp-bge.so
# Unable to init /lib/dll/devnp-bge.so: No such device or address

So, any clue about how to diagnose the issue and solve it ?

Regards,
--Winter





_______________________________________________

OSTech
http://community.qnx.com/sf/go/post86187
Re: IPV6 support in QNX6.5  
Hello,

generally you can't have 2 instances of io-pkt running at the same time.

To get rid of the first one, just kill it (or slay it) before starting the second one.

You can find drivers used by io-pkt by looking through the output of pidin mem.

Regards, PKY
Re: IPV6 support in QNX6.5  
Hi Poval, Seanb,

Thank you both for the help, I've replaced io-pkt-v4-hc with the io-pkt-v6-hc.

But is there any way to configure io-pkt-v6-hc as the default one then ?

Regards,
--Winter
Re: IPV6 support in QNX6.5  
You could give the v4 instance of io-pkt an instance number and specify a custom prefix for the tcpip module:

See the documentation for io-pkt below, I copy a snippet of the command line and some sample uses so you get the general
 idea:

http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_utilities/i/io-pkt.html

io-pkt-v6-hc -i1 -ptcpip
io-pkt-v4 -i2 -ptcpip prefix=/alt

Tip: you will likely need to customize your system startup scripts to add the prefix argument.

Now when you want to the default stack (in this case the v6) you just run your processes as usual:

./networkprocess


If you want to use the alternative stack (in this case the v4) you would do the following:

SOCK=/alt ./legacy_networkprocess

Note, the SOCK environment variable is used to specify the tcpip stack module to use.


Good luck!