Apple Dev DJ

Q: ARP Setup Inquiry

I am trying to set up a static arp entry (easy just arp -s ip mac) however when I ad this static arp entry it does not replace the old entry. So I have 2 mac addresses for the same ip.

 

arp -a returns the following (I xx out the unimportant arp entries)

--> ? (192.168.1.1) at 90:72:40:b:dc:a1 on en0 permanent [ethernet]

--> ? (192.168.1.1) at 8c:e2:da:f0:33:15 on en0 ifscope [ethernet] (I want to completely remove this entry)

? (192.168.1.62) at xx:xx:xx:xx:xx:xx on en0 ifscope [ethernet]

? (192.168.1.68) at xx:xx:xx:xx:xx:xx on en0 ifscope [ethernet]

? (224.0.0.251) at xx:xx:xx:xx:xx:xx on en0 ifscope permanent [ethernet]

 

On windows I am able to use the netsh command to accomplish this. Any suggestions?

MacBook Air, OS X El Capitan (10.11.5)

Posted on Jul 9, 2016 11:48 PM

Close

Q: ARP Setup Inquiry

  • All replies
  • Helpful answers

  • by Linc Davis,

    Linc Davis Linc Davis Jul 10, 2016 6:20 AM in response to Apple Dev DJ
    Level 10 (207,926 points)
    Applications
    Jul 10, 2016 6:20 AM in response to Apple Dev DJ

    Try "arp -S ..." (capital S.)

  • by Apple Dev DJ,

    Apple Dev DJ Apple Dev DJ Jul 10, 2016 3:21 PM in response to Linc Davis
    Level 1 (8 points)
    Desktops
    Jul 10, 2016 3:21 PM in response to Linc Davis

    When using the capital S it returns

     

    sudo arp -S 192.168.1.1 90:72:40:0B:DC:A1

    192.168.1.1 (192.168.1.1) deleted

    set: can only proxy for 192.168.1.1

     

    After viewing the arp cache again it does not update to the new mac address

     

    arp -a

    ? (192.168.1.1) at 8c:e2:da:f0:33:15 on en0 ifscope [ethernet]

    ? (224.0.0.251) at 1:0:5e:0:0:fb on en0 ifscope permanent [ethernet]

     

    Any other suggestions?

  • by Linc Davis,

    Linc Davis Linc Davis Jul 10, 2016 7:03 PM in response to Apple Dev DJ
    Level 10 (207,926 points)
    Applications
    Jul 10, 2016 7:03 PM in response to Apple Dev DJ

    What are you trying to accomplish? Why do you need to edit the ARP table manually?

  • by Apple Dev DJ,

    Apple Dev DJ Apple Dev DJ Jul 10, 2016 10:43 PM in response to Linc Davis
    Level 1 (8 points)
    Desktops
    Jul 10, 2016 10:43 PM in response to Linc Davis

    My school network uses a filtering device that captures traf via arp. I am just having trouble figuring out why  arp -s would add allow two Mac addresses be assaigned to the same ip. I am able to sucsessfully modify the arp tables in both windows and Linux.

  • by Linc Davis,

    Linc Davis Linc Davis Jul 11, 2016 6:46 AM in response to Apple Dev DJ
    Level 10 (207,926 points)
    Applications
    Jul 11, 2016 6:46 AM in response to Apple Dev DJ

    According to the arp(8) man page, you should be passing the hostname as argument, not the IP address:

    arp -s hostname ether_addr [temp] [reject] [blackhole] [pub [only]]

            [ifscope interface]

    arp -S hostname ether_addr [temp] [reject] [blackhole] [pub [only]]

            [ifscope interface]