Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Oct 1996 23:03:12 +0300
From: (Petri Riihikallio)
Subject:   Re: IP forwarding not working
Message-ID:  <v01530503ae7727288188@[]>

Next in thread | Raw E-Mail | Index | Archive | Help
# The original question was how to turn FreeBSD 2.1.5 to a router between
# Ethernet and PPP. /Petri

>put following lines into /etc/sysconfig
>network_interfaces="ed0 ppp0 lo0"
>ifconfig_ed0="inet <your.interface.ip.address> netmask <the subnet's netmask>"
>ifconfig_ppp0="inet <your.interface.ip.address> netmask <...>"
>ifconfig_lo0="inet localhost"

I have:
network_interfaces="ed0 ppp0 lo0"
ifconfig_ed0="inet netmask"
ifconfig_lo0="inet localhost"

FreeBSD adds netmask to ppp0 at boot by itself.

>               ^^^^^^^^^^^^^^^^ give your routers IP

I start pppd with the defaultroute option, which adds the ppp link as the
default route when the link comes up and removes it if the link goes down.
This works because netstat -r looks correct and the FreeBSD box can talk
to both interfaces. It just won't forward any trafic.

>routed must be run with option -q to route traffic properly

Are you sure about this? I have understood that routed just keeps the routing
tables up to date in a dynamic environment with multiple possible routes.

I believe the answer should be the GATEWAY=YES in sysconfig, which causes
sysclt -w net.inet.ip.forwarding=1 command at startup. It just doesn't work
for me.

I started without routed, since there isn't much choice of route anyway. Either
the packet is destined to the local ethernet at ed0 or elsewhere via ppp0.
After receiving your message I tried with routed -q but it didn't change

>I am not sure about the word inet in the line with ifconfig_ppp0 -

I believe it is necessary and I have it.

>I'm not a guru on it - I just administer a router.

You sure look like guru since you have a working router!

>Search the list archieve - there are lots of e-mails concerning this

Yes, lots of questions but no answers. I believe the answers have been sent
via private e-mail and thus were not archived.

If you have any more ideas I am glad to hear about them.



Want to link to this message? Use this URL: <>