Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Oct 1996 23:03:12 +0300
From:      petri.riihikallio@hut.fi (Petri Riihikallio)
To:        questions@freebsd.org
Subject:   Re: IP forwarding not working
Message-ID:  <v01530503ae7727288188@[194.100.45.30]>

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_ppp0="inet 194.100.45.30"
ifconfig_ed0="inet 194.100.45.29 netmask 255.255.255.224"
ifconfig_lo0="inet localhost"

FreeBSD adds netmask 255.255.255.0 to ppp0 at boot by itself.

>default_router="???.???.???.???"
>               ^^^^^^^^^^^^^^^^ 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
anything.

>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
>problem.

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.

Cheers
Petri

--
Petri.Riihikallio@hut.fi





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01530503ae7727288188>