From owner-freebsd-questions Thu Sep 18 08:27:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA12743 for questions-outgoing; Thu, 18 Sep 1997 08:27:31 -0700 (PDT) Received: from goose (goose.capitalland.com [208.128.13.109]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA12738 for ; Thu, 18 Sep 1997 08:27:28 -0700 (PDT) Received: from cutthroat ([206.30.140.66]) by goose (8.8.5/8.8.5) with SMTP id KAA05491 for ; Thu, 18 Sep 1997 10:27:22 -0500 (CDT) Received: by cutthroat with Microsoft Mail id <01BCC41C.F85A7F20@cutthroat>; Thu, 18 Sep 1997 10:23:56 -0500 Message-ID: <01BCC41C.F85A7F20@cutthroat> From: Alex Weeks To: "'freebsd-questions@freebsd.org'" Subject: I don't understand static routes afterall Date: Thu, 18 Sep 1997 10:23:54 -0500 Encoding: 43 TEXT Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Well, just about the time I thought I new what I was doing I encountered the following. If anyone feels like explaining what's going on I would be interested. I have three subnets. I have a FreeBSD machine routing between subnet a and subnet b and another FreeBSD machine routing between subnet b and subnet c. The is necessary because the physical setup prevents one machine from connecting to all three subnets. Let's call the machine that sits between a and b machine A and the machine that sits between b an c machine B. In order to get subnet a to talk with subnet c I needed to include a static route in A. The static route should say something like "route all traffic for subnet c through on subnet b" where physically resides in machine B. Let me put numbers to it. Subnet a is 192.1.1.0 Subnet b is 192.1.2.0 Subnet c is 192.1.3.0 I should have been able to accomplish the above with "route add -net 192.1.3.0 -interface 192.1.2.1" assuming 192.1.2.1 is the 192.1.2.0 interface in machine B. But this didn't work. What's wierd however is that it did work to enter each hostname in invididually! I litterally typed route add 192.1.3.1 192.1.2.1 route add 192.1.3.2 192.1.2.1 route add 192.1.3.3 192 1.2.1 etc....... for the entire subnet. Now it's working fine. Have I made a glaring error? Do I completely misunderstand subnets and routing? In real life these are 27 bit class c subnets but that shouldn't matter for the example. I did include a "-netmask" statement in real life but it wouldn't make sense for this example. I am anxiously awaiting a reasonable answer. Alex Weeks aweeks@capitalland.com