Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2002 23:54:28 -0700
From:      John Nielsen <john@jnielsen.net>
To:        Karl Timmermann <timmerk@tcimet.net>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Arp and Route Commands
Message-ID:  <200211172354.28283.john@jnielsen.net>
In-Reply-To: <A17CAE24-FA6E-11D6-B39A-0030656EB864@tcimet.net>
References:  <A17CAE24-FA6E-11D6-B39A-0030656EB864@tcimet.net>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211172354.28283.john>