Date: Wed, 08 Nov 2000 01:46:06 +0000 From: Qiang Xu <qxu@surface.ee.uh.edu> To: freebsd-questions@FreeBSD.ORG Subject: how to make a PC act as a router? Message-ID: <3A08B05E.E72F634A@surface.ee.uh.edu>
next in thread | raw e-mail | index | archive | help
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?
Xu, Qiang
_______________________________________________
Why pay for something you could get for free?
NetZero provides FREE Internet Access and Email
http://www.netzero.net/download/index.html
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A08B05E.E72F634A>
