How to view or check MAC address or IP address in Linux VM or Server?
On the the Terminal or CLI, to view MAC address:
Type:
ip -4 neigh show
This will show all IPV4 addresses plus the MAC address linked to the IP and will also show the status whether it's Reachable or Stale.
Or just simple type: ip neigh
The legacy command is: arp -an
To check for IP via CLi, one way is to type: ip r
It will show the IP and whether there is an assigned gateway.
To view all IP addresses assigned to an interface is to type:
ip addr show
Checking MAC addresses is quite important especially if there's some network flapping issues, since MAC address is at Layer 2 on the OSI model, if it's not working properly then all other layers will be affected.
Of course, IP is also important or else it can't connect to the network, or reach the internet
That's it till next time. Keep learning.
Always Pray no matter what circumstances is happening in your life, being connected to Jesus all the time is a Blessing.
Comments
Post a Comment