Tags

  • AWS (7)
  • Apigee (3)
  • ArchLinux (5)
  • Array (6)
  • Backtracking (6)
  • BinarySearch (6)
  • C++ (19)
  • CI&CD (3)
  • Calculus (2)
  • DesignPattern (43)
  • DisasterRecovery (1)
  • Docker (8)
  • DynamicProgramming (20)
  • FileSystem (11)
  • Frontend (2)
  • FunctionalProgramming (1)
  • GCP (1)
  • Gentoo (6)
  • Git (15)
  • Golang (1)
  • Graph (10)
  • GraphQL (1)
  • Hardware (1)
  • Hash (1)
  • Kafka (1)
  • LinkedList (13)
  • Linux (27)
  • Lodash (2)
  • MacOS (3)
  • Makefile (1)
  • Map (5)
  • MathHistory (1)
  • MySQL (21)
  • Neovim (10)
  • Network (66)
  • Nginx (6)
  • Node.js (33)
  • OpenGL (6)
  • PriorityQueue (1)
  • ProgrammingLanguage (9)
  • Python (10)
  • RealAnalysis (20)
  • Recursion (3)
  • Redis (1)
  • RegularExpression (1)
  • Ruby (19)
  • SQLite (1)
  • Sentry (3)
  • Set (4)
  • Shell (3)
  • SoftwareEngineering (12)
  • Sorting (2)
  • Stack (4)
  • String (2)
  • SystemDesign (13)
  • Terraform (2)
  • Tree (24)
  • Trie (2)
  • TwoPointers (16)
  • TypeScript (3)
  • Ubuntu (4)
  • Home

    127.0.0.1 vs 0.0.0.0

    Published Sep 14, 2020 [  Network  ]

    What’s the difference between 127.0.0.1 and 0.0.0.0

    127.0.0.1

    • is the loopback address (also known as localhost)
    • is normally the IP address assigned to the “loopback” or local-only interface. This is a “fake” network adapter that can only communicate within the same host. It is often used when you want a network-capable application to only serve clients on the same host. A process that is listening on 127.0.0.1 for connections will only receive local connections on that socket.

    localhost

    • is normally the hostname for 127.0.0.1 IP address. It is usually set in /etc/hosts. You can use it just like any other hostname.

    0.0.0.0

    • is a non-routable meta-address used to designate an invalid, unknown or non applicable target (a no particular address placeholder)
    • In the context of a route entry, it usually means the default route.
    • In the context of servers, 0.0.0.0 means “all IPv4 address on the local machine”. If a host has two ip addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens 0.0.0.0, it will be reachable at both of those IPs.

    Reference