*BSD News Article 57586


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!quanta.com!rsww
From: rsww@quanta.com (Ross Walker)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Again, pppd problems...
Date: 22 Dec 1995 04:07:19 GMT
Organization: Quanta Communications, Inc.
Lines: 112
Distribution: inet
Message-ID: <4bdatn$aqd@news.quanta.com>
References: <4b4ku4$9dm@lily.redrose.net>
NNTP-Posting-Host: quanta.quanta.com
X-Newsreader: TIN [version 1.2 PL2]

Andrew Solberg (asolberg@success.net) wrote:

: One again, I am having problems with pppd, gateways, and routing.

: I use FreeBSD-2.1-RELEASE on a machine to dial up my ISP.  It is
: also connected to our local network.  I have pppd working fine.
: I can access the Internet from the FreeBSD machine without any
: problems.  The problem that I am having is trying to use the
: FreeBSD machine as the gateway for the other computers on the
: local network (about 5 other machines).

: Here are my IPs that I use: 205.246.81.113->205.246.81.127.
: There are 15 of em.  I am using 255.255.255.240 for my netmask
: on all the machine on the local net.  I have my FreeBSD box (athena)
: using 205.246.81.113 for ed1 and ppp0.  The terminal server that
: pppd connects to always gives me 205.246.81.113:205.246.83.35.

: All the other machines (Win95, WinNT, and 3.11) machines use
: 205.246.81.113 (athena) as the gateway.  Should I be using the remote
: ip that ppp0 uses (205.246.83.35)?  (I don't think so, since it
: is 83.35 not in 81.)

: Here is some of my sysconfig that related to routing and gateways:
:  # Set to the name of your host - this is pretty important!
:  hostname="athena.mycrowynn.com"
:  # Set to the NIS domainname of your host, or NO if none
:  defaultdomainname=NO
:  ...
:  network_interfaces="ed1 lo0"
:  ifconfig_ed1="inet 205.246.81.113 netmask 255.255.255.240 link1"
:  ifconfig_lo0="inet localhost"
:  ...
:  static_routes="multicast loopback"
:  route_multicast="224.0.0.0 -netmask 0xf0000000 -interface ${hostname}"
:  route_loopback="${hostname} localhost"
:  ...
:  # Set to the host you'd like set as your default router, or NO
:  defaultrouter=NO
:  # These are the flags you'd like to start the routing daemon with
:  routedflags=-q
:  ...
:  # If you want this host to be a gateway, set to YES.
:  gateway=YES
:  # Set to YES if you want to run gated
:  gated=NO

: And here is my netmask -rn (ppp0 is up here):
: Routing tables

: Internet:
: Destination      Gateway            Flags     Refs     Use     Netif Expire
: default          205.246.83.35      UGc         0        0      ppp0
: 127.0.0.1        127.0.0.1          UH          1        0       lo0
: 205.246.81.112   link#1             UC          1        0
: 205.246.81.113   127.0.0.1          UGHS        0        0       lo0
: 205.246.83.35    205.246.81.113     UH          2        0      ppp0
: 224              link#1             UCS         0        0

: ------
: OK the problem:
: My apollo machine (Win95) has an ip 205.246.81.115.  Netmask for apollo
: is 255.255.255.240, and the gateway is the FreeBSD box (athena)
: 205.246.81.113.  I can ping any machine on the local net.  If I use
: tracert -d to access a host outside (say ftp.cdrom.com), It will give me:

:  D:\WIN95>tracert -d 192.215.191.11

:  Tracing route to 192.215.191.11 over a maximum of 30 hops

:    1     2 ms     1 ms     1 ms  205.246.81.113
:    2     *        *        *     Request timed out.
:    3     *        *        *     Request timed out.
:    4
:  D:\WIN95>

: The problem seems to be that FreeBSD is not routing the address from
: ed1 to ppp0.  I had the same setup for FreeBSD-2.0-RELEASE and some
: 2.1-SNAPS that worked fine.  (BTW, I did not compile in the GATEWAY
: option in the kernel, some told me it was not used anymore.)

: Any ideas, or help???
: --
:  >> Andrew Solberg
:  >> asolberg@success.net

Did you set options GATEWAY in the kernel config file for your machine,
and re-compiled the kernel to use this gateway option. This must be done
even if you have gateway=YES in your sysconfig. If you want to done
multicast routing over the gateway interface you must also put an
options MROUTING in your kernel config file.

The kernel config files and templates are in
/usr/src/sys/i386/conf

Follow the ones there, do a config <YOUR FILE NAME>, change to
/usr/src/sys/compile/<YOUR FILE NAME>/ directory, do a
make depend, followed by a make, move the old /kernel to /kernel.old
and then move the just made kernel to /.

This should do it.

Cheers,

Ross Walker

--
------------------------------------------------------------------------------
|  /\/   | Ross S. W. Walker (rsww@quanta.com)
|  \/\   |
| |   |\ | finger rsww@quanta.com for PGP key    _____________________________
| |___|/ |                                      |  Quanta Communications, Inc.
------------------------------------------------------------------------------