Subject: Re: does IPNAT work or not?
To: Olli <oliverko@dialup.nacamar.de>
From: Bruce Anderson <brucea@spacestar.net>
List: netbsd-users
Date: 02/13/1999 17:30:00
>Hello Bruce,
>
>>with 1.3.2  IPNAT simply  will   not   work  at  all,
>>without first patching  the  source  and  doing   make clean.
>
>Where do you know this? Which sources do I have to patch
>(kernel-sources)?
>Where can I get this patches (ftp.netbsd.org)?

First how:
 From personal experiance and help from many people on the NetBSD lists.
The first time I ran up against this problem was with a
Mac IIci running 1.3 then when I  installed 1.3.2 on a i386 box 
I encountered the same problem.

Second:
 Yes the kernel-sources need to be patched.
The file /sys/netinet/ip_nat.c    needs patching.

Third where and how:
The patch for 1.3.2 
ftp.netbsd.org/pub/NetBSD/NetBSD-1.3.2/source/patches/diff-ipnat.gz

How To:
 cd  /usr/src  

ftp -a -p
ftp.netbsd.org/pub/NetBSD/NetBSD-1.3.2/source/patches/diff-ipnat.gz

gunzip diff-ipnat.gz 

patch -p1 -E <diff-ipnat

now you need to remove all the old files from ( build directories)

/usr/src/sys/arch/XXX/compile/
and run,  
 make clean   
in each directory you find there.

( replace <XXX> with your hardware name.  eg. <alpha>)

Now you should be set to build a fresh kernel.

>
>>ppp on demand does not work with dynamic IP's (static only) if one
>>is to beleve the ppp how to.
>
>I read the man pppd. In the abstract about demand option I didn't
>found what you wrote( only that the IP of the remote host is
>necessary). On which position did you read it?


Static-meaning the IP number on each end of the ppp link is always the
same.
Heresay only. I have not attempted demand dial.


----quote---
PPPD(8)                                                   PPPD(8)

NAME
       pppd - Point to Point Protocol daemon


  demand Initiate  the  link  only on demand, i.e. when data
              traffic is present.  With this option,  the  remote
              IP  address  must  be  specified by the user on the
              command line or in an options file.  Pppd will ini-
              tially configure the interface and enable it for IP
              traffic without connecting to the peer.  When traf-
              fic is available, pppd will connect to the peer and
              perform  negotiation,  authentication,  etc.   When
              this  is completed, pppd will commence passing data
              packets (i.e., IP packets) across the link.


[snip]

       When the demand option is used, the interface IP addresses
       have already been set at the point when IPCP comes up.  If
       pppd has not been able to  negotiate  the  same  addresses
       that  it used to configure the interface (for example when
       the peer is an ISP that uses dynamic  IP  address  assign-
       ment),  pppd  has  to change the interface IP addresses to
       the negotiated addresses.  This may disrupt existing  con-
       nections,  and  the use of demand dialling with peers that
       do dynamic IP address assignment is not recommended.

---end quote---


  "Yes, I use UNIX. Why are you laughing?!"