From owner-freebsd-questions Wed Nov 8 3:21:17 2000 Delivered-To: freebsd-questions@freebsd.org Received: from gekko.i-clue.de (server.ms-agentur.de [62.153.134.194]) by hub.freebsd.org (Postfix) with ESMTP id A4DB237B479 for ; Wed, 8 Nov 2000 03:21:12 -0800 (PST) Received: from i-clue.de (automatix.i-clue.de [192.168.0.112]) by gekko.i-clue.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id NAA15961; Wed, 8 Nov 2000 13:25:41 +0100 Message-ID: <3A09375D.C41516E@i-clue.de> Date: Wed, 08 Nov 2000 12:22:05 +0100 From: Christoph Sold X-Mailer: Mozilla 4.75 [de] (WinNT; U) X-Accept-Language: de MIME-Version: 1.0 To: Qiang Xu Cc: questions@FreeBSD.org Subject: Re: how to make a PC act as a router? References: <3A08B05E.E72F634A@surface.ee.uh.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Qiang Xu schrieb: > > Dear Sir/Madam: > I have a question about how to make a PC work as a router. > > I want to setup a lab to observe TCP. The lab figure is as > following. Here is a private network. > > --------- --------- --------- > # | | | | | > | > # | a |<======>| r |<======> | b | > # | | 1 | | 2 | | > # --------- --------- --------- > box1.lab router.lab box2.lab > > a,b has a NIC; r has 2 NICs, r will work as a router. > > I do something at the rc.conf. I add lab.conf at the end. > following the lab.conf file > > #!/bin/sh > #--------------------------------------------- > # This file initialize the network in the lab > #--------------------------------------------- > > case ${hostname} in > box1.lab) > network_interfaces="ep0 lo0 vr0" > ifconfig_vr0="inet 192.168.10.2 netmask 255.255.255.0" > static_routes="r0" > route_r0="net 192.168.20.0 192.168.10.1 netmask > 255.255.255.0" > ;; > router.lab) > network_interfaces="ep0 lo0 vr0 vr1" > ifconfig_vr0="inet 192.168.10.1 netmask 255.255.255.0" > ifconfig_vr1="inet 192.168.20.1 netmask 255.255.255.0" > ;; > box2.lab) > network_interfaces="ep0 lo0 vr0" > ifconfig_vr0="inet 192.168.20.2 netmask 255.255.255.0" > static_routes="r0" > route_r0="net 192.168.10.0 192.168.20.1 netmask 255.255.255.0" > ;; > esac > > I can ping itself in each PC now. but I can not ping the router from > box1 and box2, neither ping from router to box1,2. > > The networkline and NICs are OK. > > Could you give me some advice? Is the router configured as gateway? Either use /stand/sysinstall to enable routing between interfaces, or copy the line from /etc/defaults/rc.conf to /etc/rc.conf. HTH -Christoph Sold -- i-clue GmbH, Endersbacher Str. 57, D-71334 Waiblingen Fon: (0 71 51) 9 59 01-12, Fax: (0 71 51) 9 59 01-55 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message