From owner-freebsd-questions Thu Oct 29 14:17:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA01280 for freebsd-questions-outgoing; Thu, 29 Oct 1998 14:17:58 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from www.nugate.com (www.nugate.com [206.111.60.74]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA01275 for ; Thu, 29 Oct 1998 14:17:57 -0800 (PST) (envelope-from neilson@www.nugate.com) Received: (from neilson@localhost) by www.nugate.com (8.8.8/8.8.8) id OAA04270; Thu, 29 Oct 1998 14:02:49 -0800 (PST) Date: Thu, 29 Oct 98 14:02:48 PST From: "D. Alex Neilson" To: freebsd-questions@FreeBSD.ORG Cc: Alex Neilson Subject: route to host on directly attached network Message-ID: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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. Thanks, Alex ------------------------------------------------------------------------------ Appendix Here's the blurb in route(8) If the destination is directly reachable via an interface requiring no intermediary system to act as a gateway, the -interface modifier should be specified; the gateway given is the address of this host on the common network, indicating the interface to be used for transmission. Alter- nately, if the interface is point to point the name of the interface it- self may be given, in which case the route remains valid even if the lo- cal or remote addresses change. I've tried route add -host 192.168.2.25 -interface vx1 (1) route add -host 192.168.2.25 192.168.2.25 -interface vx1 route add -host 192.168.2.25 192.168.1.25 -interface vx1 and others. (1) comes closest: when pinging 2.25, it sends an ethernet packet with vx's ethernet hardware adress as the source and destination address of the packet. ------------------------------------------------------------------------------- Notes [1] Thanks for the previous response--I'm afraid that in trying to make my question simple, I forgot that the 10-net is a class A, not a class C, which I need to use. =============================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message