In this video,
we're going to cover the ARP command.
ARP stands for the address resolution protocol.
Now, your ARP command is going to be used to display
and modify entries
in the address resolution protocol cache,
or ARP cache on a given system.
Your ARP cache contains one or more tables
that are going to be used to store IP addresses
and they're associated physical addresses,
which are known as MAC addresses.
Now, essentially by using the ARP command,
we can see and interact with layer two physical addresses
or MAC addresses and their associated bindings
of layer three IP addresses.
Now, the ARP command can be used on Windows,
Linux, Unix, or OSX systems,
and the commands are identical
regardless of what operating system you're using.
Now, if you enter ARP and press enter,
the command's going to display help information
so you can learn how to use this command.
If you want to view the ARP cache,
you're going to type in ARP-A,
and in this example you can see that my Windows machine
has found the default gateway located at 192.168.105.1,
and the broadcast for this network,
which is 192.168.105.255.
Then you're going to see three multicast addresses
that were found here, each one starting with 224
as the first octet.
You can also see the network broadcast physical address,
and it's set to FF-FF-FF-FF-FF-FF
which is always going to be the layer two broadcast address
on all networks.
Next, you see the IP of 239.255.255.250.
This IP is going to be used by Windows Explorer
to find connected devices on the local area network
using the WS discovery protocol.
This is known as the web service Dynamic Discovery Protocol.
Now, pretty much every Windows machine
is going to have this IP listed inside its ARP cache.
Finally, we see the IP address of 255.255.255.255,
and this is a reserved IP
that's used to send broadcast messages
to the entire network.
Now, if you need to delete an IP address
to a physical address mapping from your ARP cable,
you can do this by simply entering ARP-D
and the IP address you want to delete.
In this example, I'm going to delete the multicast IP
that's used by the WS discovery protocol.
Now, if I want to statically assign a mapping
between an IP address and a Mac address,
I can do that as well.
I'm just going to use the ARP-S command for static.
Now, for example,
I can statically map the WS discovery protocol address again
by entering in ARP-S 239.255.255.250,
and then it's MAC address, 01-00-5E-7F-FF-FA.
Notice that the MAC address here is entered by using hyphens
and not colons like we do in a lot of other commands.
Now, in general, you shouldn't have
to create static mappings for the ARP cache,
but static ARP entries are useful in some cases
where you want to make sure you pre-configure an entry
for a device that's not yet connected
to a layer three switch,
or if you want to prevent a particular entry from timing out.
By default, ARP entry will stay in the cache
until it gets deleted after 21,600 seconds,
which is about six hours.
Now, if you need to clear the entire ARP cache,
you can do that as well by doing ARP-D and hitting enter.
By not specifying what to delete,
it's going to delete all the ARP entries
that are currently stored in that cache,
including all your dynamically generated ones
and any static ones you may have already created.