Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 98 14:02:48 PST
From:      "D. Alex Neilson" <neilson@www.nugate.com>
To:        freebsd-questions@FreeBSD.ORG
Cc:        Alex Neilson <neilson@nugate.com>
Subject:   route to host on directly attached network
Message-ID:  <CMM.0.90.4.909698568.neilson@www.nugate.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CMM.0.90.4.909698568.neilson>