[comp.protocols.tcp-ip.ibmpc] Giving each interface an IP address in KA9Q

EE599038@RVAX.CCIT.ARIZONA.EDU (Paul Charette) (03/06/90)

	Okay ... I found out how I'm _supposed_ to give each KA9Q interface
an IP address, but it doesn't seem to work.  Perhaps I'm missing something.
My understanding is that any packets that are sent on an interface will 
get their IP source address from that interface's IP address, but it doesn't
seem to be working that way.  Below is a log of a run of net.exe {with
comments in braces} which illustrates my quandry:

=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

KA9Q Internet Protocol Package, v900214 NOS
Copyright 1989 by Phil Karn, KA9Q

net> ip address [128.196.68.2]

{Identify myself as a memeber of the [128.196.68.0] class C subnet, which will
 be reachable through the "sl0" interface - currently a slip link}

net> attach asy 0x3f8 4 slip sl0 8092 576 9600 [128.196.68.2]

{Attach a slip interface to the [128.196.68.0] class C subnetwork,
 defined for COM1}

net> attach packet 0x60 lan 5 1500 [128.196.28.26]

{Attach a packet interface (for an Ethernet card) to the [128.196.28.0] class
 C subnetwork identifying my address on that network as [128.196.28.26]}

{Now here comes the weirdness}

net> ifconfig lan
lan        IP addr 128.196.68.2 MTU 1500 Link encap Ethernet
           Link addr 02:60:8c:2a:fe:aa
           flags 0 trace 0x0 netmask 0x00000000 broadcast 0.0.0.0
           sent: ip 0 tot 0 recv: ip 0 tot 0

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The lan interface is now configured with the wrong IP address!  If I eliminate
the "ip address" line (contrary to nosdoc.txt), it still doesn't work (it's 
address becomes [0.0.0.0]).  If I start sending packets out through the lan 
interface, they carry an IP source address of [128.196.68.2], which is not what
I want at all.  

	Is my understanding of multi-homed hosts flawed?  Is KA9Q not working
properly?  Or am I just not saying the right magic words to it?

	Any and all help is greatly appreciated!

Regards,
Paul Charette
Department of Computer and Electrical Engineering
University of Arizona
Tucson, Arizona

"Another dreaded sunny day, so I'll meet at the cemetary gates.
 Keats and Yates are on your side, while Wilde is on mine."

karn@ka9q.bellcore.com (Phil Karn) (03/07/90)

A while ago I removed the ip address arguments from the attach commands;
they're probably being ignored in your version. To set an IP address
on an interface, use the ifconfig command after attaching the interface:

ifconfig lan ipaddr 1.2.3.4

Phil