Not so often we would end up troubleshooting or manipulating ARP and ARP tables in Sun Solaris. However, following are some of the useful commands which can help when required. The following commands will help you display,modify,add,delete ARP entries in Sun Solaris ARP table.
Display ARP table
sunsolaris# arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
—— ——————– ————— —– —————
pcn0 192.168.0.1 255.255.255.255 00:18:4d:f8:a4:6e
pcn0 192.168.0.2 255.255.255.255 00:13:ce:85:0e:e1
pcn0 sunsolaris 255.255.255.255 SP 00:0c:29:d3:76:89
pcn0 BASE-ADDRESS.MCAST.NET 240.0.0.0 SM 01:00:5e:00:00:00
Delete an ARP entry
sunsolaris# arp -d 192.168.0.1
192.168.0.1 (192.168.0.1) deleted
To verify the entry indeed is deleted
sunsolaris# arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
—— ——————– ————— —– —————
pcn0 192.168.0.2 255.255.255.255 00:13:ce:85:0e:e1
pcn0 solaris10 255.255.255.255 SP 00:0c:29:d3:76:89
pcn0 BASE-ADDRESS.MCAST.NET 240.0.0.0 SM 01:00:5e:00:00:00
You can see the ARP entry for 192.168.0.1 is longer found.
Add a Static entry
sunsolaris# arp -s 192.168.0.1 00:18:4d:f8:a4:6e
Syntax is
arp -s HOSTNAME MAC-Address <pub/temp/trail>
where
pub – publishes the ARP entries to other hosts on the network
temp – Temporary entry
trail – Allows Trailer Encapsulations to be sent to host
You can also read static entries from a file. This can come handy if you decide that all ARP entries are static and no ARP requests are sent and received from the system. You can add the static entries onto a file and add the arp command onto the network init scripts in /etc/rc2.d/
To read from file
sunsolaris# arp -f /etc/host_mac
where /etc/host_mac is my file name from where the ARP entries are read.
To check the current ARP caching time
sunsolaris# ndd -get /dev/arp arp_cleanup_interval
500000
where 500000 in milliseconds indicates 5mins
To modify ARP Cache timing, click here
very good useful details.
Thank you so much
useful info.
Thank you
“where 500000 in milliseconds indicates 5mins”
That is wrong. 500.000 ms = 500 seconds diferent from 5 minutes
😉
The info in this post is usefull.
thanks
Is there any way to clear the entire ARP table?
which command is used to clear the ARP table?
Hi,
I have accidentally deleted a ARP entry in my sun solaris machine. The session got terminated immediately thereafter. And I could no longer login to the machine.
The comand I used was arp -d SERVER01 , where SERVER01 was the hostname of the machine i was logged in and executing the command.
I can no longer login into the system. Could you please suggest me a way to solve this ?
Thanks and Regards, A
thanks so much, very clear