From owner-freebsd-questions Sat Mar 15 15:38:40 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27FB737B401 for ; Sat, 15 Mar 2003 15:38:36 -0800 (PST) Received: from pa-plum1b-166.pit.adelphia.net (pa-plum1b-13.pit.adelphia.net [24.53.161.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A9D243F85 for ; Sat, 15 Mar 2003 15:38:35 -0800 (PST) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com (working [172.16.0.95]) by pa-plum1b-166.pit.adelphia.net (8.12.7/8.12.7) with ESMTP id h2FNcXTb009813; Sat, 15 Mar 2003 18:38:34 -0500 (EST) (envelope-from wmoran@potentialtech.com) Message-ID: <3E73B953.2010403@potentialtech.com> Date: Sat, 15 Mar 2003 18:37:55 -0500 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030301 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "W. J. Williams" Cc: freebsd-questions@freebsd.org Subject: Re: five networks References: <20030315194948.99778.qmail@web13506.mail.yahoo.com> In-Reply-To: <20030315194948.99778.qmail@web13506.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG W. J. Williams wrote: > I took offense to your beginning of what I understand and don't > understand. I apologize for not having thicker skin. My only point was that your error was not in misunderstanding commands or FreeBSD, but in routing itself. It wasn't intended to offend, I apologize. > Still learning and will get there. Thanx for your help, and I will use > your notes to get there from here (I hope anyway). You will. Routing works basically like this: Look at the output of 'netstat -rn'. This is your routing table. The system tests routes from bottom to top. When it sees one that matches the criteria for the destination of the packet, it sends it by that method. You'll see different types of routes: for example, routes that the system added automatically because it heard the machine on the local network will have a MAC (ethernet card) address in the gateway column. Routes to a subnet will have an entry in the first column of the form 172.16/24 which is a network number/netmask pair. These are also added automatically when you ifconfig a particular interface, based on the IP/netmask you used. You can also manually add routes of either form with the route command. This allows you to route things that the system isn't able to determine automatically. For example, if you have both 172.16.0.* addresses and 192.168.0.* addresses on the same hub, you can tell this to the system by adding a routing entry. When all else fails (i.e. all other routes), the system will send the data to the default route with the assumption that the default router can figure out where to send it from there. In the case of a network like you describe. The default router has it's own default router configured, and simply forwards the data to it. Now it's in your ISPs hands, and you can only assume that they've got things configured properly and the data will get where it's going. In the case of a more complicated setup (such as a large ISP or otherwise complicated network) you may have many, many routes that a default router needs to remember. You may also run something like Routing Information Protocol, which talks to other routers to find out what routes they service, and adds this information to the routing tables automatically. routed is a program in FreeBSD that accomplishes this. routed also communicates the routes it knows about to other routers perieodically, so everybody stays updated. > --- Bill Moran wrote: > >>W. J. Williams wrote: >> >>>Bill Moran, >>> >>>New people to this stuff are very fortunate to have people like you >> >>lend >> >>>their expertise...especially to point out what we do and don't >>>understand...the rest of you newbies out there, this guy is aces. >>> >>>Bill, please learn not to slam, but to help. >> >>Huh? >>I spent a considerable amount of time crafting that reply. If it didn't >>help, I apoligize. >> >> >>>Will >>> >>>--- Bill Moran wrote: >>> >>> >>>>W. J. Williams wrote: >>>> >>>> >>>>>why isn`t this working: >>>>> >>>>>1. I would like to configure a separate network on five freebsd >> >>boxes. >> >>>>>192.168.0 >>>>>192.168.1 >>>>>192.168.2 >>>>>192.168.3 >>>>>192.168.4 >>>>> >>>>> >>>>>2. My DSL router has network 192.168.0, I also have one of my fbsd >>>> >>>>boxes >>>> >>>> >>>>>in this network (192.168.0.2) >>>>> >>>>>3. I can add the other machines to the 192.168.0 network, no >> >>problem, >> >>>>>using default router 192.168.0.1, broadcast 255.255.255.0, >>>>> >>>>>4. I tried to configure 192.168.2.1 on one box, using >>>>>gateway_enable="YES", router_enable="YES", >>>>>defaultrouter=192.168.2.1....doesnt work. >>>>> >>>>>what am i doing wrong in getting this box up and running? >>>> >>>>You don't understand routing. >>>>If you ifconfig a box to be 192.168.2.1/24 and then set the default >>>>router >>>>to be 192.168.2.1: the machine sends all traffic not destined for >>>>192.168.2.0/24 to itself to be routed. However, it didn't know how >>>>to route the traffic the first time, thus it isn't going to work the >>>>second time either. One good rule to remember is that a default >> >>gateway >> >>>>should always be a different machine, and one that has _more_ routing >>>>capability that the one you're configuring. >>>>If I understand your description correctly, the default gateway should >>>>be 192.168.0.1 for all these machines. >>>>I can only assume that you're configuring the system in such a manner >>>>for experimental purposes, as I can see no reason for such a >>>>configuration >>>>in practice. >>>>You leave netmasks off in your description, but I'm assuming that >> >>you're >> >>>>using /24 for everything. This means you'll have to put static routes >>>>in >>>>each machine to allow them to get to 192.168.0.1, as they'll have no >> >>way >> >>>>to automatically reach that machine. The default router will also >> >>need >> >>>>routes manually configured in order to be able to communicate back to >>>>them >>>>(unless it's running some sort of route discovery program). >>>> >>>>If you're not configuring the network like this for experimental >>>>reasons, >>>>then you're configuring it very poorly. A small network like you >>>>describe should have all the machines on the same subnet: 192.168.0.2, >>>>192.168.0.3, 192.168.0.4, etc -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message