Date: Sat, 24 May 1997 22:35:29 -0600 (MDT) From: Wes Peters <softweyr@xmission.com> To: robert@chalmers.com.au Cc: questions@freebsd.org Subject: Trying to solve ppp to remote link Message-ID: <199705250435.WAA27579@obie.softweyr.ml.org> In-Reply-To: <338770A1.70D2@chalmers.com.au> References: <338770A1.70D2@chalmers.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
robert@chalmers.com.au writes: > Hi, > I'm trying to nut out a soultion to a ppp problem here, > > I have a class C network, and a temporary 'permanent' dial up > connection to an internet connected site. What I want to be able > to do is dial that site using fbsd's ppp, and have my network > be connected to the internet via that link. Now, the problem is, > the other site assigns my side 203.22.80.21, > whereas my network is 203.1.96.0,and the server is 203.1.96.5. For > other reasons, I would prefer to have my end of the ppp link set > as 203.1.96.4. (I will have a 'permanent', permanent link again soon). > At the moment I dial up using my '95 box, talking to both sides of > the network. The '95 box can't forward packets obviously. I wish it > could. > The big question is. How do I set up ppp and routing, so that the FBSD > box can dial the other network, accept the given number, and route > packets across the link, so that my network behaves as it should, > visible to the rest of the internet. > Or can I even do that? I've gone around in so many circles that I'm > lost now. Yes, you are. First, lets get the basic routing straightened out. Your "router" as you call it doesn't have an IP address. Each interface on the router has an IP address. This is why I hate the term "hostname", it really isn't a hostname, its an interface name (and address). Now that we've got that settled, you will see that your router must have *two* IP addresses -- one for the LAN, which I assume is ethernet, and one for the WAN, in this case, the PPP link. The LAN interface on your router is 203.1.96.5, which is the interface for network 203.1.96.0. The physical link layer for this network is your ethernet. A route for this network is automagically added when your system boots and configures the ethernet interface. The WAN interface on your router, which is your end of the PPP link, is the 203.22.80.21 address assigned by your ISP. This is the interface for *everything except* 203.1.96.0. In order to make your machine route to the internet, you will need to add a "default route," or a route to address 0.0.0.0, via the *other end* of the PPP link, when the link comes up. This is done with the 'add' keyword in your ppp.linkup file if you're using user-mode ppp on FreeBSD (aka iij-ppp). Now you can see how this works: when the IP output layer receives a packet, it first checks to see if it has an explicit route for the packet. If the packet is destined for your network, 203.1.96.xxx, it will route it to the ethernet. Once it has checked *all* of the explicit routes, just one in your case, it will then check to see if you have a default route. If so, it will forward the packet to that interface. If not, it will drop the packet. Write back if you need specific help with configuration files and such; I have a three-day weekend and a little bit of time to spare. ;^) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://www.xmission.com/~softweyr softweyr@xmission.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705250435.WAA27579>