From owner-freebsd-stable Wed Oct 9 15:17:47 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BECF737B401 for ; Wed, 9 Oct 2002 15:17:44 -0700 (PDT) Received: from CRWdog.demon.co.uk (adsl-66-123-232-98.dsl.sndg02.pacbell.net [66.123.232.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20DC843E6E for ; Wed, 9 Oct 2002 15:17:44 -0700 (PDT) (envelope-from spadger@best.com) Received: from localhost (localhost [127.0.0.1]) by CRWdog.demon.co.uk (Postfix) with ESMTP id 0A7AA2A7; Wed, 9 Oct 2002 15:17:37 -0700 (PDT) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: thomas@cuivre.fr.eu.org Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Setup routing entry for host with a non-local IP address In-Reply-To: Message from Thomas Quinot of "Wed, 09 Oct 2002 17:17:33 +0200." <20021009151733.GA15162@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_573756256P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Wed, 09 Oct 2002 15:17:37 -0700 From: Andy Sparrow Message-Id: <20021009221737.0A7AA2A7@CRWdog.demon.co.uk> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --==_Exmh_573756256P Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable > 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. > 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? Layer 3 routing only cares about networks, not hosts. You need to use a router, as these hosts are in different networks (the = fact that they're sharing the same physical network segment = notwithstanding). You can use a multi-homed host (e.g. one with a network interface in = both networks) that will forward packets. You could add a NIC to one of the hosts and number it so that it is in = the "other" network. You could use a "real" router. = You could add an alias[0] to either one of the hosts on the shared = network segment so that they "understand" that they have two interfaces = on the same network and can thus talk to each other. You could also subnet the Class A network you're using with a /16 = netmask, so that the 10.10 portion would be the network identifier, and = the 1.2 & 0.1 portion of the IP address(es) would be the host identifier = - thus, both hosts would be on the same network, and can communicate = directly. This will have other implications for your network, however[1] HTH. Rgards, AS [0] From this list, I believe that the alias needs a /32 netmask (e.g. = 255.255.255.255) on recent -STABLEs to work correctly. [1] Broadcast address will change, for one. You should probably adjust = the netmask on every node on that new network. --==_Exmh_573756256P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) Comment: Exmh version 2.5 07/13/2001 iD8DBQE9pKsAPHh895bDXeQRAjfsAJ4ydsarDhdhnF+/IYD/UTDFxd3VagCgpRqO 4Mdsgn7Tyt/9+j/YWG83RjY= =DwBR -----END PGP SIGNATURE----- --==_Exmh_573756256P-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message