Re: Multiple TCP/IP Stacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2003-10-21 at 01:53, Amit Limaye wrote:
> Hello
>     Is it possible to run multiple TCP/IP stacks on the same machine on
> different interfaces just as we can bind the TCP/IP stacks in windows
> multiple times in to the same interface
> 
> -SIGTERM
> amit
> 
> 
> Humanity's first sin was faith; its first virtue doubt
> 
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Yes you can.

In my earlier company, we ran 2 TCP stacks and 2 1/2 IP stacks while
developing, and then shipped with 1 TCP stack and 1 1/2 IP stacks - Let
me explain where the half comes from.

TCP/IP Stack #1 - debug port runs TCP/IP with different socket
definitions - TCP/IP - useful while developing, not present in final
product. Needed cos platform measurement tools used this socket
representation.

TCP/IP Stack #2 - present in the product and used over the routing
interfaces. ran routing protocols, SNMP software etc which used the 2nd
socket representation.

IP Stack #2 1/2 - highly fine-tuned microcode stack that dealt only with
common case scenarios. Hence its not a full IP stack, only 1/2.

Tip - while its easy to mix IP packets, its very difficult to mix TCP
flows - that's my take on it. So at the TCP level, you WILL have a split
personality machine if you run multiple stacks.

Hope that cleared a few things out for you.

To make things even cooler - after doing this, I took the packets at the
rx and tx level of the PHY level, and packed them into RPC over TCP and
sent it to a Verilog server that was running an RPC interface and that's
how we verified the Verilog-based software-model of the hardware chip
that we were designing - this takes a HECK of a long time - not for the
faint hearted - but very useful when you're a startup spinning off a
multi-million dollar ASIC.

So in this case, we did 2 1/2 TCP/IP stacks out of which the 1 1/2
TCP/IP stacks were encapsulated within its OWN TCP/IP stack unless the
packets were headed for the specified Verilog server. heady stuff.

(I know this is TCP within TCP - but there's no other way - we cannot
control that inner traffic (TCP/UDP etc), and the outer tunnel needs to
be {reliable} TCP to instill RPC with some semblance of sanity).

So, is it doable in reality ? Yes and it has its uses.

Now, is it doable specifically in Linux ? I dont think so. However, Dave
Miller can answer that way better than I can.

The closest answer that says yes is "on interface 1 run ipv4 and disable
ipv6. on interface 2 run ipv6 and disable ipv4". Now you have 2
different TCP/IP stacks running on two different interfaces. However its
not the same VERSION of TCP/IP - that's probably not possible cos many
knowledgable people think (for various reasons) that the TCP/IP stack in
Linux should be hard-wired - I think otherwise bcos of reasons related
to allowing innovation, or allowing flexibility during development, or
even for research.

HTH,

-- 

Ranjeet Shetye
Senior Software Engineer
Zultys Technologies
Ranjeet dot Shetye2 at Zultys dot com
http://www.zultys.com/
 
The views, opinions, and judgements expressed in this message are solely
those of the author. The message contents have not been reviewed or
approved by Zultys.


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux