Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Sending Packets on different tcp/ip stacks: (15 Items)
   
Sending Packets on different tcp/ip stacks  
Hi all,

I installed qnx 6.4.0 and my machine has two ethernet interfaces (en0 and en1). I checked /dev it has io-net directory 
which contains(en0 and en1).I am able to ping to other machines on both eth interfaces.
I have doubt why the directory name is io-net instead of io-pkt because io-pkt-v4-hc is running.

I tried to initaite second instance of tcp ip stack with the following command
io-pkt-v4-hc -i1 -dpcnet pci=0x1 -ptcpip prefix=/sock2
[My Nic are AMD ]
then i checked /dev directory there was no io-net1
(dir which should contain en0 and en1 so i can configure this tcpip stack to en1 using
SOCK=/sock2 ifconfig en1 up) and ping to other machine using this second stack.please let me know the solution.

thanks
RE: Sending Packets on different tcp/ip stacks  
Hi Rahul:
   What you are seeing under /dev is the entry for the io-net legacy style driver that is being run.  Native io-pkt 
drivers don't create /dev entries.  In terms of your second stack, you can't have two stacks sharing the same interface.
  If your first stack is already using both ethernet NICs, the second stack won't be able to access them.  You need to 
change the way that the first stack is being run to only use a single interface if you want the second interface to be 
used by a second stack.

Checking /dev isn't the best way to find out what interfaces the stack is using, by the way.  ifconfig is the correct 
utility to use for this.

   Robert.

-----Original Message-----
From: RAHUL SABLE [mailto:community-noreply@qnx.com]
Sent: Wed 1/28/2009 6:58 AM
To: ionetmig-networking
Subject: Sending Packets on different tcp/ip stacks
 
Hi all,

I installed qnx 6.4.0 and my machine has two ethernet interfaces (en0 and en1). I checked /dev it has io-net directory 
which contains(en0 and en1).I am able to ping to other machines on both eth interfaces.
I have doubt why the directory name is io-net instead of io-pkt because io-pkt-v4-hc is running.

I tried to initaite second instance of tcp ip stack with the following command
io-pkt-v4-hc -i1 -dpcnet pci=0x1 -ptcpip prefix=/sock2
[My Nic are AMD ]
then i checked /dev directory there was no io-net1
(dir which should contain en0 and en1 so i can configure this tcpip stack to en1 using
SOCK=/sock2 ifconfig en1 up) and ping to other machine using this second stack.please let me know the solution.

thanks


_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post20904


Attachment: Text winmail.dat 3.28 KB
Re: RE: Sending Packets on different tcp/ip stacks  
Hi Robert,


  In which starting script they are initiating default (io-pkt) tcp-ip stack.How we can modify that script so defualt 
stack will use only eno(one interface) ?
How we can bind the tcp/ip stack to use specific ethernet interface.
beacuse there is no option to bind a tcp/ip stack with specific eth interface.I am using below command to initiate the 
second stack please correct me if i am wrong.I tried passing mac address of eth1 in this command.

io-pkt-v4 -i1 -dpcnet pci=0x1 -ptcpip prefix=/sock2
RE: RE: Sending Packets on different tcp/ip stacks  
> How we can modify that script so defualt stack will 
> use only eno(one interface) ?

I would just slay the original stack, and restart
two stacks, the way you want them.

> How we can bind the tcp/ip stack to use specific 
> ethernet interface.

That's all a matter of how you start the driver.

You're on the right track with the pci option.
Start one driver in one stack with "pci=0" and
the other driver in the second stack with "pci=1".

--
aboyd
Re: RE: RE: Sending Packets on different tcp/ip stacks  
I slayed io-pkt-v4-hc which was intiated default by qnx .Then I executed the following cmd to start first intance.

io-pkt-v4-hc -dpcnet pci=0h  -ptcpip

for second instance 

io-pkt-v4-hc -i1 -dpcnet pci=1h -ptcpip prefix=/sock2

then i have given ifconfig I saw only en0 interface according to previous reply  I should see both interfaces.


thanks
Rahul 
Re: RE: RE: Sending Packets on different tcp/ip stacks  
On Wed, Jan 28, 2009 at 12:57:39PM -0500, RAHUL SABLE wrote:
> I slayed io-pkt-v4-hc which was intiated default by qnx .Then I executed the following cmd to start first intance.
> 
> io-pkt-v4-hc -dpcnet pci=0h  -ptcpip
> 
> for second instance 
> 
> io-pkt-v4-hc -i1 -dpcnet pci=1h -ptcpip prefix=/sock2
> 
> then i have given ifconfig I saw only en0 interface according to previous reply  I should see both interfaces.
> 

# ifconfig               <- should show 1
# SOCK=/sock2 ifconfig   <- should show the other
RE: RE: RE: Sending Packets on different tcp/ip stacks  
Side note to this, I don't think that "0h" is valid although it may be
working.  "0x0" is valid, "0" is valid, but   the "h" is probably just
being ignored. 

-----Original Message-----
From: Sean Boudreau [mailto:community-noreply@qnx.com] 
Sent: Wednesday, January 28, 2009 1:00 PM
To: ionetmig-networking
Subject: Re: RE: RE: Sending Packets on different tcp/ip stacks

On Wed, Jan 28, 2009 at 12:57:39PM -0500, RAHUL SABLE wrote:
> I slayed io-pkt-v4-hc which was intiated default by qnx .Then I
executed the following cmd to start first intance.
> 
> io-pkt-v4-hc -dpcnet pci=0h  -ptcpip
> 
> for second instance
> 
> io-pkt-v4-hc -i1 -dpcnet pci=1h -ptcpip prefix=/sock2
> 
> then i have given ifconfig I saw only en0 interface according to
previous reply  I should see both interfaces.
> 

# ifconfig               <- should show 1
# SOCK=/sock2 ifconfig   <- should show the other

_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post20942
RE: RE: RE: Sending Packets on different tcp/ip stacks  
Right - strtoul() is used in the common mii lib 
to parse the pci=X option (pci device index) and 
I don't think it understands the trailing "h" which 
actually isn't required.

Just stick with "pci=0" and "pci=1"

If you really need to specify a hex value, 
do it with a prefixed zero x or X: "0x1" or 
"0X1" which are both decimal 1 (one).

A bare prefixed zero indicates an octal value
follows.  Not many people need octal any more.

--
aboyd
Re: RE: RE: RE: Sending Packets on different tcp/ip stacks  
Hi all,

I tried the following things and the results are

First i slayed default io-pkt-v4-hc
then i configured the first tcp ip stack with pci

#io-pkt-v4 -dpcnet pci=0

for second instance
#io-pkt-v4 -i1 -dpcnet pci=1 -ptcpen0ip prefix=/sock2

#ifconfig
lo0: loop back inteface
en0: <mtu etc >
        address 00:0c:29:28:ff:dd

#SOCK=/sock2 ifconfig
lo0: loop back inteface
en0: <mtu etc >
        address 00:0c:29:28:ff:e7

I have seen here the mac addresses are different may be they are binding to the different ethernet interfaces but when i
 tried to assign ip addresses I got the following errors

#ifconfig en0 192.168.1.5 up
ifconfig:SIOCGIFLAGS en0:No such device or address

#SOCK=/sock2 ifconfig en0 192.168.2.5 up
ifconfig:SIOCGIFLAGS en0:No such device or address

and i also  verified /dev/io-net and /dev/io-net1
both has en0 interfaces. Please let me know where i am wrong

thanks




 
RE: RE: RE: RE: Sending Packets on different tcp/ip stacks  
> for second instance
> #io-pkt-v4 -i1 -dpcnet pci=1 -ptcpen0ip prefix=/sock2

I hope that's a typo - that should be "-ptcpip" above,
not "-ptcpen0ip".

I'm puzzled by what you see - you say that (eg first
invocation) "ifconfig" shows the interface, but 
"ifconfig en0" fails?  That message generally means
that it can't find the stack at all - usually, it's
simply not running.

P.S.  Be sure, before you start io-pkt, that you have
killed off all previous copies of it!  ie

  # pidin | grep io-pkt

should come up empty.

--
aboyd
Re: RE: RE: RE: RE: Sending Packets on different tcp/ip stacks  
Hi Andrew,

 The second one typo error it was -ptcpip.I ensured that no io-pkt-v4-hc was running coz i have given the slay commnad 
for io-pkt-v4-hc twice. second time it was giving unable to find the process(io-pkt-v4-hc).
As you said i slayed io-pkt-v4-hc and then started tcp/ip stacks.Do you see any mistake in my commands. My requirement 
is simple i have 2 nic cards(ethernet interfaces) and i want to intiate two tcp ip stacks one should bind with en0 and 
other should bind with en1. and then i want to ping to other machines as bleow.
on default stack without prefix 

#ping ipadress
on second instance with prefix
#SOCK=/sock2 ping ipaddress

Please let me know where i am going wrong.

Thanks
RE: RE: RE: RE: RE: Sending Packets on different tcp/ip stacks  
> My requirement is simple i have 2 nic cards
> (ethernet interfaces) and i want to intiate 
> two tcp ip stacks one should bind with en0 
> and other should bind with en1

Close.  Both stacks will have an "en0" - there
will be NO en1.

> Please let me know where i am going wrong.

Your invocations of io-pkt look good to me - 
many of us here at QNX run multiple stacks,
often even mixtures of io-net and io-pkt.

Can you paste the output of "pci" here?

Thx,

--
aboyd
RE: RE: RE: RE: RE: Sending Packets on different tcp/ip stacks  
One tip for you:  when I run multiple stacks,
I usually do it with different hardware:  eg
one speedo card, one i28544.  So, each stack
runs a different driver.  This keeps my life
simple.  You can do it with two nics of the
exact same type, but it's easier to get things
confused, especially if it's the first time
you've ever run more than one stack at the 
same time.

--
aboyd
Re: RE: RE: RE: RE: Sending Packets on different tcp/ip stacks  
Hi all,

 Everything is working fine.Now i am able to send the data on both stacks.I was confused because it was showing en0 in /
dev/io-net and /dev/io-net1.Thanks for the suggestions.

Thanks,
Rahul  
RE: RE: RE: RE: Sending Packets on different tcp/ip stacks  
The ifconfig (SIOCGIFLAGS) failure looks suspicious. What does nicinfo
say?

Thanks
Weijie


-----Original Message-----
From: RAHUL SABLE [mailto:community-noreply@qnx.com] 
Sent: January 29, 2009 1:42 AM
To: ionetmig-networking
Subject: Re: RE: RE: RE: Sending Packets on different tcp/ip stacks

Hi all,

I tried the following things and the results are

First i slayed default io-pkt-v4-hc
then i configured the first tcp ip stack with pci

#io-pkt-v4 -dpcnet pci=0

for second instance
#io-pkt-v4 -i1 -dpcnet pci=1 -ptcpen0ip prefix=/sock2

#ifconfig
lo0: loop back inteface
en0: <mtu etc >
        address 00:0c:29:28:ff:dd

#SOCK=/sock2 ifconfig
lo0: loop back inteface
en0: <mtu etc >
        address 00:0c:29:28:ff:e7

I have seen here the mac addresses are different may be they are binding
to the different ethernet interfaces but when i tried to assign ip
addresses I got the following errors

#ifconfig en0 192.168.1.5 up
ifconfig:SIOCGIFLAGS en0:No such device or address

#SOCK=/sock2 ifconfig en0 192.168.2.5 up
ifconfig:SIOCGIFLAGS en0:No such device or address

and i also  verified /dev/io-net and /dev/io-net1
both has en0 interfaces. Please let me know where i am wrong

thanks




 


_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post20970