IP-STACKS(9) XR32 REFERENCE MANUAL 2/2/2013
NAME
IP-STACKS -- TCP/IP Stacks in XR32.
DESCRIPTION
A TCP/IP "stack" is a set of protocols layered on top of
each other in such a way that each layer only talks to the
layer immediately above or below it. There is no lateral
communication within layers.
At the top of the stack is the "Application Layer", which is
basically where humans and processes interact with the stack,
and at the bottom is the "Physical Layer", which is where the
PC interfaces to the outside world, via Network Interface
Cards (NIC's), sound cards, COM ports etc.
The following diagram is a greatly simplified version of
XR32's TCP/IP stack. Some components have been omitted for
clarity, and to save space.
.----------------------------------------------------.
| (Application Layer) |
| TELNET | FTP | HTTP | etc.. | DNS | RIP | PING etc.|
|--------'-----'------'-------'-----------'----------|
| TCP | UDP | ICMP |
|-----------------------------'-----------'----------|
| IP |
|--------------------------------------.------.------|
| ARP | | |
|------------.-------------------------| | |
| Ethernet | Ax25 | SLIP | PPP |
|------------|------------------.------| | |
| NDISXPKT | AGWPE | KISS | | |
|------------|-----------.------'------'------'------'
| NIC | SOUNDCARD | COM PORTS |
| (Physical Layer) |
'----------------------------------------------------'
Fig.1 - XR32's TCP/IP Stack
To illustrate the workings of a TCP/IP stack, imagine that the
application initiates a TELNET connection. It can be seen from
Fig.1 that in order to reach the outside world, TELNET uses
TCP, which in turn uses IP. From that point downwards there
are several choices, depending on the destination address, the
IP routing tables, and the hardware interfaces that have been
defined in XROUTER.CFG.
If the destination is an Internet site, the data may pass down
through ARP, Ethernet and NDIS, to emerge from the NIC onto
the LAN, thence to the Internet router and the Internet.
If however the destination was a local Ham Radio TCP/IP hub,
the data might pass from IP down through ARP and AX25, then it
would either go via KISS and a COM port to a TNC, or via AGW
Packet Engine and a sound card, thence to the radio.
Alternatively the destination may be another PC, linked via
COM ports. In this case, the data would pass from IP down
through SLIP or PPP to the COM port.
Multiple Stacks
~~~~~~~~~~~~~~~
As shown in Fig.1 above, XR32 has its own TCP/IP stack that is
completely independent of Windows. This stack is multi-homed,
i.e. it can exist on several networks at the same time, with
different IP addresses on each network. For example it may be
simultaneously using the IP address 44.131.91.2 for radio
links, 192.168.0.23 for Ethernet, and 10.0.0.2 on a SLIP link.
If you use the NdisXpkt driver, XR32's TCP/IP stack can share
the network card (NIC) used by Windows, whilst using its own
IP address. Alternatively it could use any other NIC installed
in the PC. This is shown in the simplified diagram below
(which omits KISS etc. for clarity):
.-----------------------------------------.
| XR32 Application Layer |
|-----------------------------------------|
| XR32 IP Stack | Windows IP stack |
| 192.168.0.23 | 192.168.0.1 |
|-----------------------------------------|
| NdisXpkt Driver | NDIS layer |
|-----------------------------------------|
| Ethernet NIC |
'-----------------------------------------'
Fig.2 - XR32 With NdisXpkt Driver
If you don't use the NdisXpkt driver (e.g. because you are
using 64-bit Windows), XR32's TCP/IP stack cannot access the
Ethernet NIC. This is shown diagramatically below:
.-----------------------------------------.
| XR32 Application Layer |
|-----------------------------------------|
| XR32 IP Stack | Windows IP stack |
| | 192.168.0.1 |
|--------------------|--------------------|
| KISS SLIP PPP AGW | NDIS layer |
|--------------------|--------------------|
| (Physical layer) | Ethernet NIC |
'--------------------'--------------------'
Fig.3 XR32 Without NdisXpkt Driver
Fig.3 shows that there is no connection between XR32's stack
and the Ethernet NIC, but the stack may still communicate with
the outside world via via the serial ports, using SLIP, PPP,
or KISS, or via AGW Packet Engine.
However, in addition to its own TCP/IP stack, XR32 can also
use the one built into Windows. This can be seen at the top of
Fig.3, where XR32's application layer sits atop both stacks.
So even without NdisXpkt you can still use *almost* the full
range of TCP/IP services, via Windows' stack. The only
difference is that traffic via XR32's stack is fully
traceable, whereas traffic via Windows is not. And XR32 must
use the Windows IP address for such operation.
Which Stack to Use?
~~~~~~~~~~~~~~~~~~~
The choice of how your TCP/IP packets are routed and which
stack they use is entirely under your control (it could have
been automated, but that would have deprived you of choice).
By default, all TCP/IP traffic is routed via XR32's own stack.
This would be inappropriate if for example the only interface
with the outside world was via TNC's and you wanted to route
traffic other than amprnet (44.x.x.x). But perfectly valid if
you were using NdisXpkt to access the Internet via Ethernet
etc.
The way to force traffic via the Windows stack is by means of
IP ROUTE entries with mode "w" instead of "d". Anything not
caught by a "w" entry will be routed via XR32's stack.
SEE ALSO
IP(1) -- IP Configuration Commands.
IPROUTE.SYS(9) -- IP Configuration & Routing File.
IP-PRIMER(9) -- IP Primer.
IP-ROUTING(9) -- IP Routing.
NDISXPKT(9) -- NdisXpkt Driver.
IP-STACKS(9) END OF DOCUMENT
|