Summary: PPP routing

From: Shouben Zhou (
Date: Thu Oct 06 1994 - 22:56:52 CDT

I have received many responses which are all correct. The trick is not at
remote end ( router ), but at local end. If the local end is Mac there
is no trouble at all, but if the local end is the UNIX ( ex. sun ), I
have to disable the le0 or set the information in the route table in the
right order. Otherwise the local end will not send the request through
the PPP port.

Many thanks to:

From: Kenton C. Phillips <>
From: Phil Kearns <kearns@CS.WM.EDU>
From: Kenneth.Erickson@Eng.Sun.COM (Ken Erickson)
From: grevemes@VTC.TACOM.Army.Mil (Steven Grevemeyer)
From: JC Touvet <>
From: Richard Crane <crane@cadlab.ECE.Drexel.EDU>

Original post:

> I have made PPP connection and both nodes can talk to each other. Could
> anybody help me how to setup routing information, so that the node has
> the internet connection can be the router for another PPP end.
> We are running SunOS 4.1.3.

From: Kenneth.Erickson@Eng.Sun.COM (Ken Erickson)

All you should have to do is set up a default route on the machine
on the end of the ppp link.

Something like

route add default <internet-host> 1

or put the internet-connected host's name or dotted-quad address
in /etc/defaultrouter on the remote ppp machine.


Ken Erickson | ken.erickson@Sun.COM
SunSoft, Inc | Voice: (415)336-3123
2550 Garcia Avenue, M/S MTV05-44 | Fax: (415)336-6015
Mountain View, CA 94043 |

From: Kenton C. Phillips <>

I have just such a setup, and have solved the problem, although it is
perhaps a non-standard arrangement. My solution allows the remote host
to use an IP address which is part of the local subnet, rather than
requiring a new subnet and netmask. The advantage of this approach is
that the outside world sees the remote PPP host as though it were part
of the local network. (In fact, everything on the local network
also sees it that way, except for the gateway.)


gateway - The machine which sits on the ethernet, and which also runs PPP
on a serial port.
remote host - The lone machine far away which runs PPP to connect through
the gateway to get to the network.

First, you have to create a phony ARP entry on your network. For me, I
have one machine at work which runs rarpd, and I create an entry in that
machine's ARP table with the _gateway's_ ethernet number and the _remote_
host's name. That way, when some machine on the network wants to talk to
the remote host, it sends out a query for the ethernet number, gets the
gateway's address, and sends the packet to the gateway. Then the gateway
forwards it to the remote host. Here's what the command looks like:

/usr/etc/arp -s $REMOTE $GATEWAY_ETHERNUMBER pub

An `arp -a` command should then show this entry as "permanent".

Next is the tricky part. You have to set up routing tables on both the
gateway and the remote host, and you have to issue the route commands in
the correct order, or else the system will get all confused. This is
because `route` doesn't have any way to tell the system *which* network
interface to use for a particular route---it thinks it's smart enough to
figure that out from the network numbers and netmasks. (Two separate
interfaces are *supposed* to be on two separate subnetworks.)

For experimenting, you can type in the route commands one at a time, then
use `netstat -r` to see what has happened. Here is the sequence of comands
which work for me.

On the remote host:

  /usr/etc/route delete $NET $REMOTE
  /usr/etc/route add $REMOTE $REMOTE 0
  /usr/etc/route add default $GATEWAY 1

NET is the subnet number of the local network. GATEWAY is the name of the
gateway host, and REMOTE is the name of the remote host. You should end up
with output from `netstat -r` looking like:

Routing tables
Destination Gateway Flags Refcnt Use Interface
$GATEWAY $REMOTE UH 0 1033 ppp0
localhost localhost UH 5 330838 lo0
$REMOTE $REMOTE UH 8 1274273 le0
default $GATEWAY UG 5 293686 ppp0

On the gateway host, the appropriate routing entry is created
automatically. `netstat -r` should give something like:

Routing tables
Destination Gateway Flags Refcnt Use Interface
localhost localhost UH 3 324 lo0
$REMOTE $GATEWAY UH 2 890 ppp0
default $CAMPUS_ROUTER UG 2 15493 le0
$NET $GATEWAY U 32 764795 le0

where CAMPUS_ROUTER is the same thing you've always had to get to the
outside world.

Note that GATEWAY, REMOTE, and CAMPUS_ROUTER all have IP address on the
same subnet, i.e. NET. This way, you don't have to tell all machines about
some new subnet, just for one machine at home. Also, I think it's neater
(and more polite) to treat the remote machine like it's part of the same
network as everybody else.

Hope this helps.

Kenton C. Phillips
Computer Systems Manager
MIT Center for Space Research

From: Phil Kearns <kearns@CS.WM.EDU>

I assume you're also running ppp 2.1.2 (the public domain stuff) on
both ends of the connection. On the local side (my machine at home), I
specify the defaultroute option, on the remote side (my office
workstation) I specify the proxyarp option. This works for Sun<->Sun
and Linux<->Sun connections. It makes the local machine fully
networked thru the remote. I can run any network application from my
home system.


From: JC Touvet <>

You can resolve your problem very easily using arp. On the Internet node, you
just type:

/usr/etc/arp -s HOST ETHER permanent public

 where HOST is the IP address of the target and ETHER the ethernet address of
your Internet node (to find it, just type "dmesg | grep Ether")

 To delete this route, you can use:

/usr/etc/arp -d HOST

 Of course, this will only work if the target host has the same network
address than the Internet node. Otherwise, you'll have to configure your

 For example, if I have:

Internet node ethernet 8:0:19:20:b2:a8
PPP node

 I type on

/usr/etc/arp -s 8:0:19:20:b2:a8

 Hope this helps,

From: Richard Crane <crane@cadlab.ECE.Drexel.EDU>

SUre this. I setup ppp-2.1.2 (pppd) and just got it to work. I had to
add a defaultrouter in /etc/defaultrouter (make it the first router down
stream). Also, I used proxarp to do address resolution. You need to have
the ppp server (your host) do the following...

   arp -s <REMOTE IP ADDRESS> <Ethernet Address of PPP Server> pub

Of course, I had to tell ppp-2.1.2 to use proxyarp. I did the following.

   /usr/local/etc/pppd <gateway address>:<remote addr> proxyarp

This worked great! The gateway address is the ppp server.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:11 CDT