From owner-freebsd-questions Mon Feb 21 21:15:36 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id D1A9637B5DF for ; Mon, 21 Feb 2000 21:15:20 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id AAA07072; Tue, 22 Feb 2000 00:20:30 -0500 (EST) (envelope-from cjc) Date: Tue, 22 Feb 2000 00:20:29 -0500 From: "Crist J. Clark" To: Barry Edwin Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Networking help... Message-ID: <20000222002029.C3426@cc942873-a.ewndsr1.nj.home.com> Reply-To: cjclark@home.com References: <200002220407.UAA23873@www.geocrawler.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200002220407.UAA23873@www.geocrawler.com>; from archiver@db.geocrawler.com on Mon, Feb 21, 2000 at 08:07:06PM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Feb 21, 2000 at 08:07:06PM -0800, Barry Edwin wrote: > This message was sent from Geocrawler.com by "Barry Edwin" > Be sure to reply to that address. > > Hi all. I'm a little unsure about the nitty- > grittys of networking and need some advice. > I need a small network to look like this: Wh... > (don't ask why) Oh. > /----------- /--------------- > | comp 1 | 10.0.0 | comp 2 | > | (win98) |<--------->| (FreeBSD) |<----- > | 10.10.0.2 | xl0 | xl0: 10.0.0.1 | xl1 | > -----------/ | xl1: 10.0.1.1 | | > ---------------/ | > | > /------------- | > | computer 2 | /----- 10.0.1 | > | (win98) |<---------- | hub |<----------- > | 10.0.1.2 | -----/ > -------------/ ^ > | > /------------- | > | computer 3 | | > | (win98) |<--------------- > | 10.0.1.3 | > -------------/ > > 1. I'm assuming that the above IP address > configuration above looks good. It should work. > 2. I tried to make all three clients in the same > subnetwork. However, when I did: > > 'ifconfig xl0 inet 10.0.0.1' > 'ifconfig xl1 inet 10.0.0.2' You would have to have them on different networks by masking appropriately... which would be hard for those two choices. > To the FreeBSD box, the routing table would > not show Link#2: > > Destination Gateway ... > 127.0.0.1 127.0.0.1 ... > 10.0 Link#1 ... > > Only when I configured xl0 and xl1 on two > different subnets, like my diagram, did I see > Link#2. > > Destination Gateway ... > 127.0.0.1 127.0.0.1 > 10.0 Link#1 > 10.0.1 Link#2 Well... I hope you entered a netmask of 255.255.255.0. Doesn't ifconfig(8) default to a 255.0.0.0 mask for an history class A net like 10.0.0.0? > Why is this? Is it possible to have both nics > in a duel homed box be a part of the same > subnet? If not, why? If so, how? Well, they are not on the same subnet are they? You might want to consider setting up the FreeBSD box as a bridge(4) if you want to Win98 box to be on the same LAN as the others. > 3. Is it better to use static routes in such a > small network or use routed? The only route you need to set for this is the location of the default router. Everything else takes care of itself. > 4. I want Computer 2 to be able to ping 10.0.1.1, > to be able to ping 10.0.0.1, > and to be able to ping 10.0.0.2. Don't we all? > What configuration settings do I need in > FreeBSD? > > Here's what I have in rc.conf: > > gateway_enable="YES" (I assume this allows > traffic from xl0 to xl1) > ifconfig_lo0="inet 127.0.0.1 netmask > 255.255.255.0" Make the mask 255.0.0.0 for that. > ifconfig_xl0="inet 192.168.0.1 netmask > 255.255.255.0" > ifconfig_xl1="inet 192.168.1.1 netmask > 255.255.255.0" Thos are fine ignoring the line-wrap damage from your mailer. > Now adding the static routes, I did the > following: > > 'route add 10.0.0.1 -interface xl0' > 'route add 10.0.0.2 10.0.0.1' > 'route add 10.0.1.1 -interface xl1' > 'route add 10.0.1.2 10.0.1.1' > 'route add 10.0.1.3 10.0.1.2' Eep! Don't do that. You do not need to add any static routes. Just a 'defaultrouter' entry if ou have such a beast. > Here is what the routing table according to > 'netstat -r' said: > > Destination Gateway ... Netif Expire > 127.0.0.1 127.0.0.1 ... lo0 > 10.0 Link#1 ... xl0 > 10.0.0.1 0:50:4:d8:38:b3 ... lo0 > 10.0.0.2 10.0.0.1 ... xl0 > 10.0.1 Link#2 ... xl1 > 10.0.1.1 0:50:4:d8:37:a1 ... lo0 > 10.0.1.2 10.0.1.1 ... xl1 > 10.0.1.3 10.0.1.1 ... xl1 > > When computer 2 is used to ping 10.0.1.1 (xl1) > I get this message: > > '/kernel arplookup 10.0.1.2 failed: host is > not on local network' > > on the FreeBSD box. > > When computer 2 is used to ping 10.0.0.1 (xl0) > Win98 ping says that the host is unreachable. > > Obviously I've made a mistake or left > something out. > Why do I get the arp lookup failure on xl1? > Why is the other subnet 10.0.0 unreachable > by 10.0.1? 'Cause your routing is totally messed up. You left your PC with no way to get packets out. You route packets for 10.0.0.2 to 10.0.0.1, and 10.0.0.1 is our host... How do the packets get out? -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message