On Thu, May 14, 1998 at 10:30:33AM -0700, Alan Su wrote: > My linux box is connected to a campus network, and i'd like to provide > access to that network to a machine connected over a serial/modem line > via PPP. i *think* the normal way to do this would be:
> - get an IP assigned for the PPP box You'll need this one, except when you do ip_masquerading. This is however not necessary here and I recommend against it. See below, You'll just need a free IP on the subnet the linux box is on. > - compile the linux kernel with IP forwarding and have it route > packets to and from the PPP box This will be needed in any case. > - make the gateway that my linux box uses accept packets from the new > IP with my ethernet card's hardware address and through my ethernet > port > the first two I can do, but the third one may be problematic, as I'm > not an administrator for the gateway or anything. i have been told > that i can have multiple machines connect through my port (using a > hub), but it expects each IP to have a unique hardware address. > > My question is: can I fake this? Yes. In short: use the proxyarp option of pppd In long: Assume the network your linux box is connected to is a class C network 1.2.3.x, your box is 1.2.3.1, your default gateway (for the linux box) is 1.2.3.254 and a not yet used IP on the class C network is 1.2.3.2 ppp options on the linux box: 1.2.3.1:1.2.3.2 # local address : remote address proxyarp silent auth ppp options on the ppp box: ipcp-accept-local ipcp-accept-remote defaultroute (a few other might be needed that are just for every ppp connection to be established, like proper connect scripts, flow control, tty settings, ...) What then happens is that every other host on the campus lan thinks the ppp box is directly connected to the LAN. Assume, the link is up now. If host A wants to sent a packet to the ppp box, it asks for the hardware address corresponding to 1.2.3.2. The linux box answers with it's own, receives the corresponding packet and forwards it over the ppp link because it has a host route to 1.2.3.2 over this link. When the ppp box sends a packet back, it first sends it to the linux box, because that one is the default gateway for everything (execpt loopback :-), and the linux box passes this packet on to its destination. Nils -- *-----------------------------------------------------------------------------* | Quotes from the net: L> Linus Torvalds, W> Winfried Truemper | | L>this is the special easter release of linux, more mundanely called 1.3.84 | | W>Umh, oh. What do you mean by "special easter release"?. Will it quit | * W>working today and rise on easter? *
pgp8teXOxH8K1.pgp
Description: PGP signature