Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2002 17:17:33 +0200
From:      Thomas Quinot <thomas@cuivre.fr.eu.org>
To:        freebsd-stable@freebsd.org
Subject:   Setup routing entry for host with a non-local IP address
Message-ID:  <20021009151733.GA15162@melusine.cuivre.fr.eu.org>

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

I tried:
1. route add 10.10.0.1 10.10.1.2 -interface

  -> arplookup 10.10.0.1 failed: could not allocate llinfo
     arpresolve: can't allocate llinfo for 10.10.0.1rt

2. route add 10.10.0.1 -link xl0 -interface

Interesting netstat -rn output:
10.10.0.1        78.6c.30.0.0.0.0.0.e.fa.ce UHLS        0        0 xl0

but does not work (gets wrong ARP entry:
? (10.10.0.1) at 78:6c:30:00:00:00 on xl0 permanent [ethernet])

3. route add 10.10.0.1 -link hostB-MAC-address -interface

Fails with 'add host 10.10.0.1: gateway 1:2:3:4:5:6: Network is unreachable'

Am I trying to do something impossible, or am I just clueless enough
that I did not find the proper way of cajoling the kernel into
cooperation?

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?20021009151733.GA15162>