Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 1998 14:25:45 +0100
From:      "Tom Jobbins" <T_Jobbins@bpiassociates.co.uk>
To:        <freebsd-isdn@FreeBSD.ORG>
Subject:   isdn4bsd with natd under FreeBSd
Message-ID:  <000001bdc462$6163c710$1e01a8c0@ntws-1.bpi>

Next in thread | Raw E-Mail | Index | Archive | Help
Hello,

I am using isdn4bsd on a FreeBSD 2.2.7-STABLE box with a Teles S0/16.3 card

I have configured the card and sPPP without problems - I can connect to the
net and ping machines, connect to web sites, etc.  I have a dynamic IP
address, therefore I have configured isppp0 with the command:  ifconfig
isppp0 0.0.0.0 0.0.0.1 link1

I need to use natd with my ISDN line, so that other machines on the network
can access the Internet through my FreeBSD box.  I have been able to do this
using ppp (interface tun0) with no problems, however natd does not work
correctly with isd4nbsd and a dynamic IP address.

The problem is that natd does not detect when the IP address of interface
isppp0 changes.  I am running natd with the -dynamic option, which means it
is supposed to detect a change in IP address on the interface.  It does
detect this change with ppp and tun0, but not with isdn4bsd and isppp0.

I have run natd with the -v verbose option to see what is happening, and saw
the following:

------------------------------------------------
[I have forced isppp0 to connect to the net by pinging an IP, I then run
natd:]
bpiserver1:/usr/local# natd -dynamic -n isppp0 -v
Out [ICMP] 193.149.75.48 -> 158.152.1.222 aliased to
           193.149.75.48 -> 158.152.1.222
In  [ICMP] 158.152.1.222 -> 193.149.75.48 aliased to
           158.152.1.222 -> 193.149.75.48
Out [ICMP] 193.149.75.48 -> 158.152.1.222 aliased to
           193.149.75.48 -> 158.152.1.222
In  [ICMP] 158.152.1.222 -> 193.149.75.48 aliased to
           158.152.1.222 -> 193.149.75.48
[so far, so good.  Now I "ifconfig isppp0 down ; ifconfig isppp0 up" to
force the line to drop:]
Routing message E received.
Routing message E received.
[Now I ping the IP address again, forcing isppp0 to reconnect]
Out [ICMP] 0.0.0.0 -> 158.152.1.222 aliased to
           193.149.75.48 -> 158.152.1.222
Out [ICMP] 0.0.0.0 -> 158.152.1.222 aliased to
           193.149.75.48 -> 158.152.1.222
Out [ICMP] 193.149.70.237 -> 158.152.1.222 aliased to
           193.149.75.48 -> 158.152.1.222
[natd does not realise that my IP address has changed, and thus changes all
IP addresses to my old IP address.  No packets will now reach me.  I am
forced to manually "kill -HUP natd"]
------------------------------------------------

Now I repeat the test using ppp and interface tun0.  Most of the output is
the same, however when my IP address changes, natd is aware of it:

------------------------------------------------
Routing message 2 received.
Routing message D received.
Routing message C received.
Interface address has changed.
Routing message 1 received.
Routing message 2 received.
Routing message 2 received.
Routing message 2 received.
Routing message 2 received.
Routing message 2 received.
Routing message 1 received.
------------------------------------------------

>From the man page of natd:

    -dynamic    If the -n or -interface option is used, natd will monitor
the
                 routing socket for alterations to the interface passed.  If
                 the interfaces IP number is changed, natd will dynamically
                 alter its concept of the alias address.

Therefore I presume that isdn4bsd is not notifying the system of the change
in IP address in the same way that ppp does?  Is this a bug?

I am afraid I am not a coder, so I cannot myself look through the source to
see the reason for this problem.  If anyone else has the time to investigate
this for me - perhaps I am doing something wrong? - I would be most
appreciative.

One workaround solution I did think of would be to simply call a
"killall -HUP natd" every time isdnd connected.  Is it possible to tell
isdnd to execute a command every time it makes a call?  Obviously this is
not a very good solution, but it would solve the problem if this is a
genuine bug that needs time to fix (I wish I could help do it myself!)

Keep up the good work with isdn4bsd!

Thanks in advance,


Tom Jobbins.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?000001bdc462$6163c710$1e01a8c0>