From owner-freebsd-isdn Mon Aug 10 06:26:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA10881 for freebsd-isdn-outgoing; Mon, 10 Aug 1998 06:26:06 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from bpiserver1.bpi (userb600.uk.uudial.com [193.149.83.75]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA10875 for ; Mon, 10 Aug 1998 06:26:00 -0700 (PDT) (envelope-from T_Jobbins@bpiassociates.co.uk) Received: from ntws-1 (ntws-1 [192.168.1.30]) by bpiserver1.bpi (8.8.8/8.8.8) with SMTP id OAA01141 for ; Mon, 10 Aug 1998 14:25:33 +0100 (BST) From: "Tom Jobbins" To: Subject: isdn4bsd with natd under FreeBSd Date: Mon, 10 Aug 1998 14:25:45 +0100 Message-ID: <000001bdc462$6163c710$1e01a8c0@ntws-1.bpi> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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