IP and Media Access Control Addresses


Meanwhile, ip address is usually assigned from your router or internet service provider (ISP) to your device, such as 192.168.1.100 and 185.89.9.65, mac address is tied to a key connection device called network interface card (NIC).

Both of them are important for transfering data from your device to internet, public ip is used to transfer data from internet to your home, private ip and mac addresses are to transfer from home router to your device.

To find out your public ip address, simply find it in google search, what is my ip.

For private ip,


ifconfig | grep inet # usually starts with 192.168.
    

For mac address, in your laptop,


ip addr show
# link/ether 38:00:25:f5:eb:a0 brd ff:ff:ff:ff:ff:ff
    

In your smartphone, go Settings → General → About phone → Network, you can see all the relevant addresses.

References