What exactly is the difference between 172.0.0.1 and 192.168.0.1?

15,317

Solution 1

Those a simply two separate IPv4 addresses.

The 172.0.0.1 address is a public address which should not be used unless you have been assigned the address block containing it by an RIR or your ISP (which was assigned the address block containing it).

The 192.168.0.1 address is a private address which anyone may use in a private network. This address cannot be routed on the public Internet.

Solution 2

I suppose you are talking about 172.16.0.0 because it makes no sense to compare 172.0.0.0 with 192.168.0.0 because 172.0.0.0 is a public IP address.

If you are talking about 172.16.0.0 instead of 172.0.0.0, then... both are private IP address. They are defined in the RFC1918

There is a good overview at the Wikipedia page but the main difference is the size of the segment.

Solution 3

The address 172.0.0.1 is not a local address, it is a web address.

If you instead meant 127.0.0.1 this is what is refereed to as the "Loop back" IP, and is often referred to as localhost. Connections to this IP target the computer of origin, and are intercepted by the network card in your computer and fed back into the same computer.

192.168.0.1 is an IP on your local network, this may or may not be your computer. This address is assigned by your DHCP server on your local network (usualy running on the router) and is subject to change unless you have configured your DHCP server to make it static

Which to use?

  • 172.0.0.1 Use when you are trying to connect to a website/remote computer at that IP (most likely not you)

  • 192.168.0.1 Use when you are trying to connect a computer/device on your local network that you know will be at 192.168.0.1

  • 127.0.0.1 or localhost Use when you are trying to connect to a port on the same computer you are already on

Share:
15,317

Related videos on Youtube

Bierbeest
Author by

Bierbeest

Updated on May 25, 2022

Comments

  • Bierbeest
    Bierbeest almost 2 years

    What's the difference between these 2 local ip addresses? In terms of pro's , con's and usage?

    • Alexander O'Mara
      Alexander O'Mara about 8 years
      Ones the loopback address, the other could be anything, but is commonly the default gateway used by many routers. Not really anything comparable about them.
    • Ron Maupin
      Ron Maupin about 8 years
      @AlexanderO'Mara, actually, 127.0.0.1 would be the loopback, not the 172.0.0.1 address in the question.
    • Alexander O'Mara
      Alexander O'Mara about 8 years
      @RonMaupin Good call.