I read here that:
127.0.0.1
is the IP (IPv4) address of your local computer, synonymous withlocalhost
.
When I run the command ipconfig
what I actually see is some other IP address. So I’ve pasted my questions below:
C:\Users\Dhiwakar>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection* 9:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::6089:2937:e839:26ec%10
IPv4 Address. . . . . . . . . . . : 192.168.1.36
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Which is my IPv4 address of my local computer? Is it
127.0.0.1
(as mentioned in the article) or is it192.168.1.36
?Is the IPv4 used to uniquely identify my computer/machine in the world or my domain or only restricted the my LAN i.e within the set of computers that use the same gateway?
Answer
There's no such thing as "address of the local computer". IP addresses bind with network interfaces. If you have 5 LAN/Wifi cards (network adapters) in your computer then you can have (at least) 5 IPs for those interfaces.
Here what you see is the adapter named "Local Area Connection" with IP address 192.168.1.36, while 127.0.0.1 is the address of the loopback adapter in each PC.
There are many types of IP. Things like 10.x.x.x
or 192.168.x.x
are private addresses which are used to identify your computer inside the local network. Outsiders cannot see what's inside the local network because they have been hidden after NAT. Each local network will connect with WAN via a router and have a public IP address with the interface facing WAN of the router. If your computer is connected directly to public internet (which is extremely unlikely in an IPv4 network due to the limit in the address range and the high price of static IPs) then you'll have WAN (public) IP address too.
Comments
Post a Comment