From owner-freebsd-net Tue Aug 3 17:37:31 1999 Delivered-To: freebsd-net@freebsd.org Received: from greenwood3.nerv.nu (cx639627-c.irvn1.occa.home.com [24.0.209.134]) by hub.freebsd.org (Postfix) with ESMTP id DE06A14C0A; Tue, 3 Aug 1999 17:37:18 -0700 (PDT) (envelope-from nugundam@greenwood3.nerv.nu) Received: from localhost (nugundam@localhost) by greenwood3.nerv.nu (8.9.3/8.9.3) with ESMTP id RAA13937; Tue, 3 Aug 1999 17:36:13 -0700 (PDT) (envelope-from nugundam@greenwood3.nerv.nu) Date: Tue, 3 Aug 1999 17:36:13 -0700 (PDT) From: Joseph Lee To: freebsd-questions@freebsd.org, freebsd-net@freebsd.org Subject: routing question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I'm having difficulting with routing which searching the mailing lists and reading the man page have not helped. My fbsd machine (A) is on the same physical segment behind a hub with 2 other machines (B,C). Machines A/B/C each have a real IP, but the IPs are not on the same subnet (due to stupid cable modem IP distribution). I've gotten B/C to see each other directly with the route command in DOS, but I haven't been able to get an equivalent route add command working for FreeBSD. I would like to know where I'm getting it wrong. I've tried: (1) route add -host -interface de0 (1) gives me: Destination Gateway Flags Refs Use Netif Expire gw 0:40:5:43:34:24 UHLW 0 7937 lo0 0:40:5:43:34:24 UHLS 0 0 de0 Shouldn't the ethernet address for the gateway to B be B's, not gw's? (2) route add -host -interface (2) gives me: Destination Gateway Flags Refs Use Netif Expire gw 0:40:5:43:34:24 UHLW 0 7937 lo0 gw UHS 0 0 de0 and a /kernel: arp_rtrequest: bad gateway value (3) route add -host (3) gives: Destination Gateway Flags Refs Use Netif Expire gw 0:40:5:43:34:24 UHLW 0 7937 lo0 gw UGHS 0 0 de0 traceroute to (), 30 hops max, 40 byte packets 1 gw () 1.762 ms 0.812 ms 0.769 ms 2 gw () 1.379 ms 1.340 ms 1.315 ms (4) route add -host -netmask 255.255.255.255 (4) gives: Destination Gateway Flags Refs Use Netif Expire gw 0:40:5:43:34:24 UHLW 0 7937 lo0 gw UGSc 0 0 de0 This gives the same traceroute as (3). The only way I've been able to see B from A (or C from A) is to set the netmask on A's de0 to 255.254.0.0 and broadcast to so that I get a routing table of: Destination Gateway Flags Refs Use Netif Expire 24/15 link#1 UC 0 0 de0 gw 0:40:5:43:34:24 UHLW 0 7937 lo0 0:0:c0:8c:8b:93 UHLW 0 2 de0 1183 This allows A to see B/C fine, but messes things up if A needs to route to other machines on the 24/15 subnet which aren't directly connected. What is the correct route command? Thanks for any help, -- Joseph nugundam =best=com==/==\=IIGS=/==\=Playstation=/==\=Civic HX CVT=/==\ # Anime Expo 1999 >> www.anime-expo.org/ > # FreeBSD: The Power to Serve >> www.freebsd.org > # EX: The Online World of Anime & Manga >> www.ex.org/ / To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message