Date: Thu, 16 Mar 2000 11:45:03 +1300 From: "David Preece" <dmpreece@paradise.net.nz> To: <freebsd-questions@FreeBSD.ORG> Subject: (relatively newbie) routing question. Message-ID: <NDBBLOFHAKIDKINHKCNCIEIOCBAA.dmpreece@paradise.net.nz>
next in thread | raw e-mail | index | archive | help
Hi, What worked: I had my boxen set up like this, and it worked fine: Internet | 203.79.92.1 (router provided by ISP) | 203.79.92.25 (IP of my cable modem, on a class C) | [BSD] ep0=203.79.92.25 (0xffffff00) [BSD] | [BSD] natd [BSD] | [BSD] ed1=192.168.0.1 (0xffffff00) | [NT] 192.168.0.2 (0xffffff00) (ipfw show) 00100 337 145736 divert 8668 ip from any to any via ep0 00200 1941 679991 allow ip from any to any (and yes, there was a power cut five minutes ago). Where [BSD] and [NT] show what is sitting in which box and the hex is subnet masks. And it goes, a treat. So much so that I feel the urge to try some immoral experiments on natd (having a go at load balancing), and set up a separate class C - 192.168.1 with another FreeBSD box on it. ...as above... | [BSD] ep0=203.79.92.25 (0xffffff00) [BSD] | [BSD] natd [BSD] | [BSD] ed1=192.168.0.1 (0xffffff00) ed0=192.168.1.1 (0xffffff00) | | [NT] 192.168.0.2 (0xffffff00) [BSD2] ep0=192.168.1.2 (0xffffff00) Hopefully with the idea that I can put two natd instances up, a 'release' instance onto ep0 to keep the net access up, and the experimental one onto ep1 and run trials from BSD2. Now, while I can telnet onto the 'main' BSD box from NT fine, I cannot ping 192.168.1.2 from NT. Needless to say, pinging (or telnetting) 192.168.1.2 from the main BSD box is no problem. So, it looks like a routing table problem - let's have a look. su-2.03# netstat -r Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 203-79-92-1.cable2 UGSc 2 266 ep0 localhost localhost UH 0 1 lo0 192.168 link#1 UC 0 0 ed1 192.168.0.2 0:50:ba:b2:71:26 UHLW 1 758 ed1 1020 192.168.1 link#2 UC 0 0 ed0 192.168.1.2 0:0:b4:b2:9:d7 UHLW 1 2 ed0 1132 203.79.92 link#3 UC 0 0 ep0 203-79-92-1.cable2 0:50:f:3:78:70 UHLW 2 0 ep0 1200 Now I'm no great expert with routing tables, but this seems to be telling me that the default router is set as the one from the ISP - great. Loopback is going. That a class B starting with 192.168 has ed1 as its' NIC - and hence packets addressed for 192.168.1.2 could be expected to go that way (despite the fact that we also have the class C 192.168.1 on ed0, and that we actually have the hardware address of 192.168.1.2 in the routing table now). This looks to me to be the problem, and the evidence suggests that the problem could be used by making 192.168.1 and 192.168.2 my local subnets. Thing is, I don't understand why. Especially since all three NIC are set to be class C from rc.conf: ifconfig_ep0="inet 203.79.92.25 netmask 255.255.255.0" ifconfig_ed0="inet 192.168.1.1 netmask 255.255.255.0" ifconfig_ed1="inet 192.168.0.1 netmask 255.255.255.0" Is there something fundamental I don't understand about using 0 as the last 8 bits of a network address? (Like RFCxxxx says you can't). Or am I missing the point somewhere else along the line? I appreciate this is a kinda big mail, but I was trying to illustrate the situation as clearly as possible. Thanks for taking a look. Dave :) BTW, I had a real bunfight making a headless box a couple of weeks back, and put a summary of my experiences up at http://www.dmpreece.net/headless.html . FYI, or something. 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?NDBBLOFHAKIDKINHKCNCIEIOCBAA.dmpreece>