Tuesday, January 21, 2025
HomeProgrammingWhat is arp command in Linux with examples?

What is arp command in Linux with examples?

The arp command in Linux is used to display and manipulate the system’s ARP (Address Resolution Protocol) cache, which maps IP addresses to MAC (Media Access Control) addresses. ARP is essential for network communication, as it enables devices to find each other’s physical addresses on a local network.

See also  How can I use Proxies with Pythons Requests Module?

For example, to view the current ARP cache, you can use:

bash

arp -a

This lists all the entries in the cache, including the IP addresses and corresponding MAC addresses.

To add a new static ARP entry, use:

See also  How do I efficiently iterate over each entry in a Java Map?

bash

arp -s 192.168.1.100 00:1A:2B:3C:4D:5E

This maps the IP 192.168.1.100 to the MAC address 00:1A:2B:3C:4D:5E.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x