[nos-bbs] IP config for tun device

Barry Siegfried k2mf at nnj.k2mf.ampr.org
Tue Jul 25 14:53:09 EDT 2006


["George (Skip) VerDuin" <k8rra at ameritech.net> wrote]:

> Truthfully - I feel really naive in asking this next question.
> I have not sorted out for myself a model for IP ownership - is it
> a) the stack, or b) the terminus of the link, or c) something else?

IP "ownership" is at the interface.  It is a number which describes
where *that* interface lives on *that* network.

> As far as I have gotten is that it may be a mixed bag, and I now
> consider the stack as default (or "native") and the terminus as an
> alias.

I can't comment on that because I have no idea what you're really
talking about.  :(

> Clearly a stack can support multiple IP identities in the stack as is
> appropriate to gateway applications, my quandary is to understand when
> it SHOULD.

Support for multiple IP identities has nothing to do with "the stack".
Rather, a machine can support as many IP identities as the number of
interfaces in it, and then some.  Interfaces may be physical (real,
like an ethernet or serial interface) or virtual (like the 'tun'
device).

> My "Bible" on net subject "TCP/IP Network Administration" by Craig
> Hunt is not answering me...
>
> Take tun configuration as a jnos example.
>
> Maiko and I had significant conversation a long time ago that resulted
> in:
>
> [host ip 192.168.1.32]
> [autoexec.nos]:
> ip address 44.102.132.20
> ifconfig tun0 address 192.168.2.1
> shell ifconfig tun0 192.168.1.249 pointtopoint 192.168.2.1 ...]
> adopted as a go-by for configuration.
> It works just fine - it introduces two "alias IPs".
>
> On the other hand tun may successfully be configured as:
>
> [host ip 192.168.1.32]
> [autoexec.nos]:
> ip address 44.102.132.20
> ifconfig tun0 address 44.102.132.20
> shell ifconfig tun0 192.168.1.32 pointtopoint 44.102.132.20 ...]
> This configuration uses the "default IP' on each end of the tun device.
> Both stacks do get the appropriate route configurations and ping works
> fine.

Generally, if ICMP works, so will everything else that rides under
IP.

> So:  What breaks when you use the "native IP" of the stack as the
> terminal IP of tun?

It depends on what you're trying to accomplish.  Generally, if you
want to have a "presence" in the amprnet, you need to use a 44-net
IP address on your tun device and then secure IPIP (or IPUDP)
routing to it, usually with the assistance of another gateway.
In the case of your gateway, the assistance you are receiving
is from mirrorshades.

> Is the deciding factor for the multiple IPs duplication of socket
> functions?

Do NOT confuse sockets with ports or IP addresses.  IP addresses
are network addresses of interfaces.  Ports (e.g. 23) are transport
access service points to specific applications (e.g. terminal).
Sockets are numbers which are the associated virtual and internal
machine "data conduits" that connect a user's transport layer 4
connection to the application layer 7 (effectively bypassing session
layer 5 and presentation layer 6).

> With one stack on the DOS platform this seems like a need so that
> two "telnets" can be supported on one socket ID.

Not quite.  What you really mean is:

As many TCP (transport) connections can be supported on one IP
(network) address which are limited only by the amount of memory
in the machine and the number of sockets (data conduits) that a
machine is permitted to "open" for that application (e.g. telnet).
For instance, user 1 connects to port 23 at IP address a.a.a.a and
gets socket #1 assigned which serves as the data conduit between
his TCP connection and the telnet application.  User 2 connects to
port 23 at IP address a.a.a.a and gets socket #2 assigned as the
data conduit between his TCP connection and the telnet application.
User 3 connects to port 23 at IP address a.a.a.a and gets socket #3
assigned as the data conduit between his TCP connection and the
telnet application.  And so on, and so on.

Does this make things any clearer for you?

> However duplication is less a factor with the multiple stack
> architecture of the Linux platform jnos application.
>
> I'm looking specifically at application of the tun device (Maiko's
> baby?) with jnos - that's true.

I wish I understood what you were driving at or what you are trying
to accomplish.  The terms you are using may or may not be what you
really mean.

The tun "device" is just like any other interface and can take on
its own network "identity" with its own IP address.

A machine which has more than one IP address in different networks
(which means that it has more than one interface) is considered to
be "multi-homed" in those networks.  This usually means that it
can serve as a router or gateway for switching packets between
those networks (because the machine exists in both networks
simultaneously).

> But I'm also wanting a piece of network wisdom when all is said
> and done...
>
> Is this a question someone on nos-bbs can quickly address - OR -
> is there a reference document that treats this subject cleanly?

Internetworking With TCP/IP
Principles, Protocols and Architecture
Copyright 1988

By Douglas Comer
Department of Computer Sciences
Purdue University
West Lafayette, IN 47907

Published By Prentice Hall
Englewood Cliffs, NJ 07632
A Division of Simon & Schuster

> Thanks in advance for light you shed on this confusion!

TCP/IP *is* somewhat confusing UNTIL you read about it in a book
like "Internetworking With TCP/IP" and then that, combined with
the knowledge you already have from tinkering will make everything
crystal clear.  :)

Hopefully, you can still FIND this book.  Obviously, I got mine in
hardcover in late 1980s.

73, de Barry, K2MF >>
           o
          <|>      Barry Siegfried
+---------/-\---------------------------+
| Internet | bgs at mfnos.net              |
| HomePage | http://www.mfnos.net/~bgs  |
+----------+----------------------------+
| Amprnet  | k2mf at nnj.k2mf.ampr.org     |
| PBBS     | k2mf at k2ge.#cnj.nj.usa.noam |
+----------+----------------------------+




More information about the nos-bbs mailing list