From owner-freebsd-hackers Tue Nov 19 20:30:18 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 627B537B401 for ; Tue, 19 Nov 2002 20:30:17 -0800 (PST) Received: from softweyr.com (softweyr.com [209.63.227.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0FAE43E88 for ; Tue, 19 Nov 2002 20:30:16 -0800 (PST) (envelope-from wes@softweyr.com) Received: from homer.softweyr.com ([204.68.178.39] helo=softweyr.com) by softweyr.com with esmtp (Exim 3.35 #1) id 18EMUg-0000kj-00; Tue, 19 Nov 2002 21:29:42 -0700 Message-ID: <3DDB0FBF.889B6AEF@softweyr.com> Date: Tue, 19 Nov 2002 20:29:51 -0800 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Karl Timmermann Cc: freebsd-hackers@freebsd.org Subject: Re: Arp and Route Commands References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Karl Timmermann wrote: > > Hello, > > 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? Read the man pages carefully. The BSD TCP/IP stack has a single arp cache and a single route table, so the network interfaces do not need to be specified. In particular, with arp you specify only the hostname and ethernet address. The route command you specify the IP address or hostname of the router rather than the egress interface. Your commands would become: arp -s 10.10.10.0 00:00:ca:13:4b:54 route add -net 10.10.10.0 -netmask 255.255.255.0 {IP address of router} route add default {IP address of router} Please note that in general you don't want to set these by hand, but rather use the rc.conf file. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message