From owner-freebsd-hackers Sun Nov 17 22:52:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 855B037B406 for ; Sun, 17 Nov 2002 22:52:08 -0800 (PST) Received: from smurf.jnielsen.net (12-254-140-119.client.attbi.com [12.254.140.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id F17644433A for ; Sun, 17 Nov 2002 22:50:00 -0800 (PST) (envelope-from john@jnielsen.net) Received: from buff.local (buff.local [192.168.0.10]) by smurf.jnielsen.net (8.12.6/8.12.6) with ESMTP id gAI6sDBo013784; Sun, 17 Nov 2002 23:54:18 -0700 (MST) (envelope-from john@jnielsen.net) Content-Type: text/plain; charset="iso-8859-1" From: John Nielsen To: Karl Timmermann , freebsd-hackers@FreeBSD.ORG Subject: Re: Arp and Route Commands Date: Sun, 17 Nov 2002 23:54:28 -0700 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211172354.28283.john@jnielsen.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 17 November 2002 13:53, Karl Timmermann wrote: > I'm new to the list and was hoping maybe someone could help me. These > commands work in Linux (and in this order), but not in FreeBSD/Mac OS X > as the arp and route commands are different: > > arp -s 10.10.10.0 00:00:ca:13:4b:54 -i eth1 > arp -s 10.10.10.0 00:00:ca:13:4b:54 -i eth1 > route add -net 10.10.10.0 netmask 255.255.255.0 dev eth1 > route add default gw 10.10.10.0 dev eth1 > > anyone know how i would change these commands to work with the FreeBSD > versions of arp and route? man arp man route ask on -questions and because I'm feeling helpful: arp -s 10.10.10.1 00:00:ca:13:4b:54 arp -s 10.10.10.2 00:00:ca:13:4b:54 route add -net 10.10.10.0 -netmask 255.255.255.0 -interface fxp0 route add default 10.10.10.1 -interface fxp0 FreeBSD's arp doesn't allow you to specify an interface. Adding the same= =20 host to the arp table twice is pointless and would probably produce an=20 error, so I changed the addresses. Replace "fxp0" with the name of the=20 interface in question. With a netmask of 255.255.255.0, 10.10.10.0 is a=20 network address and can't (or at least shouldn't) be used as a router or=20 client address (changed in the example above). I'm forced to wonder why=20 you would want to run this sequence of commands and if there isn't a bett= er=20 way to achieve the desired result. Please reply off-list if you feel so=20 inclined. JN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message