Subject: Re: Routing with NetBSD 1.3.3
To: Lukas Ruf <email@example.com>
From: Matthew Smithshaw <M@mlnet.net>
Date: 04/06/1999 10:49:32
Does C have GATEWAY set as an option in the kernel config?
# sysctl net.inet.ip.forwarding
net.inet.ip.forwarding = 1
If you get =0, then your kernel is not set up to forward packets.
You can either recompile with options GATEWAY, or in your rc.local
/usr/sbin/sysctl -w net.inet.ip.forwarding=1
Lukas Ruf wrote:
> Hi Dave,
> Sorry to disturb you, but I found your address in
> [comp.unix.bsd] NetBSD, FreeBSD, and OpenBSD FAQ (Part 6 of 10).
> The reason I am sending you this email lays in the fact that I have
> spend about 40 hours trying to get one machine running NetBSD 1.3.3 to
> route all incoming requests from a Linux station A to another Linux
> station B -- at the end I gave up.... :-(
> I will call the NetBSD station C.
> My hardware layout:
> C: 1 3c590 (ep2) card used for the 10baseT/UTP connection to a
> hub and so the station B.
> 1 3c900 (ep1) card used for the 10base2/BNC connection to
> station A.
> A: 1 NE2000 card (eth0, as Linux)
> B: 1 Etherlink card (eth0 as Linux)
> commands sent on C:
> ifconfig ep1 inet 10.0.0.1 netmask 0xffffff00 media 10base2/BNC up
> ifconfig ep2 inet 10.0.1.1 netmask 0xffffff00 media 10baseT/UTP up
> route add -host 10.0.0.1 127.0.0.1
> route add -host 10.0.1.1 127.0.0.1
> route add -net 10.0.0.0 -netmask 0xffffff00 -gateway 10.0.0.1
> route add -net 10.0.1.0 -netmask 0xffffff00 -gateway 10.0.1.1
> command sent on A:
> route -net 10.0.0.0 -netmask 255.255.255.0 eth0
> route add default gw 10.0.0.1
> command sent on B:
> route -net 10.0.1.0 -netmask 255.255.255.0 eth0
> route add default gw 10.0.1.1
> A <-> C : ping & rlogin
> B <-> C : ping & rlogin
> A <-> B : ping & rlogin, i.e. both failed.
> My Questions:
> Can you give me the solution to:
> - why can I do A <-> C and B <-> C but not A <-> B (via C) ??
> - what's the reason that C doest not forward all packets with
> destination other destination than C itself ?
> - what's the solution to this problem, do you give it to me if
> possible ?
> Kind Regards,