Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 1998 09:51:51 -0800 (PST)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        Michelle Brownsworth <michelle@eugene.net>
Cc:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: FreeBSD as a PPP Dialup Router
Message-ID:  <Pine.BSF.3.96.980217092804.11995A-100000@gdi.uoregon.edu>
In-Reply-To: <v03007823b10ed34cbf95@[206.100.174.69]>

next in thread | previous in thread | raw e-mail | index | archive | help
If you don't mind, I want to keep this on -questions so the ppp-meister
can jump in if need be.

> >Thanks to advances in modern technology and the fact that you're
> >gatewaying through another FreeBSD machine makes this point moot.

> Yes, I kinda figured that I could handle it by proxying, and I do want to
> set up a proxy server at some point just for the learning experience.  For
> now, however, I want the experience of setting up a subnet. 

Ok. I thought about this for a little bit and have a possible solution
if you want to statically allocate the other end.  The ppp server is
basically a dual-homed host.

The main reason for having both ends of the PPP link on the same subnet is
for routing.  Messages will never get to the remote LAN if the ISP LAN
doesn't know how to reach the remote LAN, and if a part of the remote LAN
(in the pppd server) isn't visible on the ISP LAN they'll never make it.  

You'll need to swipe two addresses from the remote LAN's IP block to make
this work.  For illustration, say that the remote subnet is using
10.0.0.x.

1.  Assign the outgoing ppp interface on the server to 10.0.0.2 and the
client's address to be 10.0.0.3, so the link goes between 10.0.0.2 <->
10.0.0.3.  

2.  Add a net route on the PPP server to route 10.0.0.x addresses through
the ppp interface.  You may want to do this at link-up time.

3.  Set "enable_gateway=yes" in /etc/rc.conf on the server and either
reboot or run `sysctl -w net.inet.ip.forwarding=1' to enable ip
forwarding.

4.  Teach your LAN's router that 10.0.0.x addresses gateway through your
ppp server.

I think that should work.  I need to borrow a computer I can assimilate to
FreeBSD for a whle and play with this stuff. 

> I work for a
> large wholesale provider (here in Eugene, BTW) and addresses are not a
> problem; in a sense, I'm my own ISP.  I have some jobs coming up for my
> company that involve subnetting. 

Need an assistant over the summer? :-)

> I'm using pppd on the server on the T1, and iijppp on the client server at
> home.  Question:  Does using -alias with ppp place the server in proxy
> mode? 

It places the client in proxy/NAT mode, essentially yes.  

> Is that what I want with a subnet? 

It's a good option if you want to connect a fakenet-IP'd LAN to the
Internet proper without having to get an IP block and renumber the hosts.

> I inferred from reading the docs that using -alias mode was the only way
> to allow the other hosts on a network to share the PPP connection.  Yet,
> "alias" in this context _does_ imply proxying... 

Not quite.  A ppp connection is a link, much like a T1 running between
your site and your ISP's.  You can route all the traffic you want over the
link -- the ends just act like routers.  The only thing special about PPP
is that it has some built-in configurability.

> >This is of course assuming you're running fairly recent versions of
> >FreeBSD, ie 2.2.x series OR have updated your ppp to the one at
> >http://www.freebsd.org/~brian/userppp.html.
> 
> The server I'm connecting to:  FreeBSD 2.1.5-RELEASE.  (I know...  but it's
> been incredibly stable for over a year and a half.)  The server at home
> that's dialing out:  FreeBSD 2.2.2-RELEASE.  (I'm not committed to vintage
> OS versions, however.  I am running 2.2.5 on neuromancer.primelogic.com,
> one of my other servers.)  Do you think 2.2.2's ppp is somehow contributing
> to the problems?

Maybe.  A newer ppp certainly wouldn't hurt.

> Doug, I do thank you for your time and trouble.  I'm reluctant to impose
> further, but I wouldn't hesitate to produce them if you wanted to have a
> peek at my configuration files...

No problem.  

In terms of your LCP problems, I would make sure that the client & server
are on the same wavelength.  Try logging in manually using `term'.  With
the new ppp you can enable an insane amount of logging, and Brian Somers
can decode them for us. 

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980217092804.11995A-100000>