From owner-freebsd-questions Thu Oct 29 14:39:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA03928 for freebsd-questions-outgoing; Thu, 29 Oct 1998 14:39:37 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pau-amma.whistle.com (s205m64.whistle.com [207.76.205.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA03899 for ; Thu, 29 Oct 1998 14:39:22 -0800 (PST) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.8.8/8.8.7) id OAA19340; Thu, 29 Oct 1998 14:38:05 -0800 (PST) (envelope-from dhw) Date: Thu, 29 Oct 1998 14:38:05 -0800 (PST) From: David Wolfskill Message-Id: <199810292238.OAA19340@pau-amma.whistle.com> To: freebsd-questions@FreeBSD.ORG, neilson@www.nugate.com Subject: Re: route to host on directly attached network Cc: neilson@nugate.com In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Date: Thu, 29 Oct 98 14:02:48 PST >From: "D. Alex Neilson" >Route problem: Tell host 192.168.1.25 that host 192.168.2.25 > is directly reachable via interface vx1 [1] >If 192.168.2.25 has ethernet address 04:20:38:af:eb:4c, it'd be >kewl if this would work > route add -host 192.168.2.25 04:20:38:af:eb:4c -interface vx1 I'm having a sense of deja vu all over again. I thought I saw (and responded to) a similar query from you earlier today, using the examples of an interface wit the IP 10.0.10.10 trying to reach 10.0.11.11, or some such. >but unfortunately it doesn't. Can I avoid ifconfig-ing a 192.168.2.X >address into the vx1 interface (an alias) to make it work? >I've tried every combination that could be implied >by route(8) (see appendix below), checked _The_Complete_FreeBSD_, >_TCP/IP_Illustrated_, all to no avail. This is a case were a >few examples would go a long way. I can make a small subnet via > route add -net 192.168.2.24 -netmask 0xfffffff8 -interface vx1 >which works fine, but I just want the one host. It's the same issue as last time: if 192.168.2.X is directly reachable on the same network as 192.168.1.X, then you need to specify the subnet mask appropraitely for your reality. In this case, you'd be supernetting, as opposed to subnetting, but it's the same basic issue: use the subnet mask to tell the soiftware what you network looks like. In this case, a subnet mask of 255.255.254.0 (or wider) is appropriate. (Some folks will state that the above mask is invalid. I'm not going to go into that in this note; there are RFCs that discuss the matter. If the above mask bothers you or your software, use 255.255.252.0 or wider.) david -- David Wolfskill UNIX System Administrator dhw@whistle.com voice: (650) 577-7158 pager: (650) 371-4621 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message