Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2002 22:30:32 +0200
From:      Thomas Quinot <thomas@cuivre.fr.eu.org>
To:        Andy Sparrow <spadger@best.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Setup routing entry for host with a non-local IP address
Message-ID:  <20021010203032.GA73545@melusine.cuivre.fr.eu.org>
In-Reply-To: <20021009221737.0A7AA2A7@CRWdog.demon.co.uk>
References:  <20021009151733.GA15162@melusine.cuivre.fr.eu.org> <20021009221737.0A7AA2A7@CRWdog.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Le 2002-10-10, Andy Sparrow écrivait :

> > Suppose that on a 4.6.2 machine (hostA), I have an interface xl0
> > with address 10.10.1.2, netmask 255.255.255.0.
> > 
> > On that ethernet, I have a host (hostB) that is set up as 10.10.0.1,
> > netmask 255.255.255.0. I need to send a packet from hostA to hostB,
> > and to that effect I would like to set up a static route on hostA
> > indicating that 10.10.0.1 lives on its xl0 interface.
> 
> This can't work, not as described.

I know this is impossible. This does not mean that I should not do it.

With a bit of experimentation, I finally found out that I did not even
have to patch route(8). The solution was:
  route add -host hostB -link xl0:<hostB-MAC-address> -interface

I was even able to have the kernel do ARP for me:
  route add -host hostB -link xl0: -interface -expire 1

> Layer 3 routing only cares about networks, not hosts.

A host is just a kind of very small network.

Thanks to all who responded,
Thomas.

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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