Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Oct 2002 15:12:32 -0700
From:      Tim Kientzle <kientzle@acm.org>
To:        stable@FreeBSD.ORG, Thomas Quinot <thomas@cuivre.fr.eu.org>
Subject:   Re: Setup routing entry for host with a non-local IP address
Message-ID:  <3DA4A9D0.6090603@acm.org>
References:  <bulk.14598.20021009084530@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I can think of two solutions:

1) dual-home hostA
    On hostA: ifconfig xl0 alias <address on hostB's network>
              netmask 255.255.255.0

    In this way, hostA will have an address on
    both networks and can communicate on either one.
    HostB can then use an address on its local
    network without problem.

2) Change the netmask on hostB to 255.255.0.0
    Now hostB thinks hostA is on the same network.

Tim Kientzle


> Date: Wed, 9 Oct 2002 17:17:33 +0200
> From: Thomas Quinot <thomas@cuivre.fr.eu.org>
> Subject: Setup routing entry for host with a non-local IP address
> 
> 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?3DA4A9D0.6090603>