Red Hat Bugzilla – Bug 138758
ARP setting from command line accept but not work.
Last modified: 2007-11-30 17:10:54 EST
Description of problem:
On RedHat 9.0 I use next command for link IP to MAC:
arp -v -n -a -s 192.168.103.2 00:10:4A:06:D1:7A
Verbose mode answer:
If user changed IP address Internet not worked
Return back IP and Internet start worked okey.
On second workstation where I install Fedora Core 3 Final from
But on this machine I use external IP addresses for my network and
trying to use same command but only for external IP's:
arp -v -n -a -s 18.104.22.168 00:40:4A:06:D1:7A
Verbose mode answer:
If user change IP on his PC, it is staying to get Internet.
What se problem, maybe bug?
If not, what I do incorrectly and how use this command correctly?
What different between RH 9.0 Kernel 2.4.20-31.9 and FC3 Kernel 2.6.9-
1.667 in this command?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Hi, well firstly I'm not completely sure what are you trying to
achieve? You can't set local IP adress with ARP and the correct way to
do this is using ifup for the device. This is propably not a bug.
On machine where FC3 configured as GATEWAY for users in my network
which used non local IP(192.168.*.*) but external IP's.
And I trying to control to block not authorised IP to access to
Internet. I use for it for allowed IP's
arp -v -n -a -s 22.214.171.124 00:40:4A:06:41:7A
arp -v -n -a -s 126.96.36.199 00:80:EA:08:11:EE
arp -v -n -a -s 188.8.131.52 00:40:6A:0A:A1:EA
For other IP's which not used but present in my network I use secret
MAC combination, for example:
arp -v -n -a -s 184.108.40.206 AA:BB:AA:BB:BB:BB
arp -v -n -a -s 220.127.116.11 AA:BB:AA:BB:BB:BB
arp -v -n -a -s 18.104.22.168 AA:BB:AA:BB:BB:BB
And this accepted but not work!!!
If user write to itself, IP 22.214.171.124 which in ARP table with MAC
AA:BB:AA:BB:BB:BB, but his network card have realy MAC
This user stay to use Internet.
Bug in iputils?
Well I think you're trying a really strange way to do this. I would suppose to
use iptables (check man page for mac and mac_source) which will do this job for
you 100times better. I'm not completely sure whether this is a bug or not, but
IMHO arp works correctly and it's only about the way how kernel is using arp
cache and arp table. While arp reponds with arp: SIOCSARP() the mac adress is
for sure set in the table but propably kernel rewrites it back when receives
certain packets from the other machine.