localhost
0.0.0.0
localhost vs 0.0.0.0
What are they? And what are they for?
127.0.0.1
127.0.0.1 is the loopback Internet Protocol (IP) address also referred to as the “localhost”
127.0.0.1
127.0.0.1 is the loopback Internet Protocol (IP) address also referred to as the “localhost”
The address is used to establish an IP connection to the same machine or computer being used by the end-user
“127.0.0.1 is the loopback address”
What does that mean?
Loopback
Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself
Loopback
Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself
Used for:
Loopback
Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself
Used for:
Loopback
Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself
Used for:
Loopback
For IPv4, the loopback interface is assigned to all the IPs in the 127.0.0.1/8 address block
127.0.0.1
127.0.0.2
...
127.255.255.254
Try this!
0.0.0.0
0.0.0.0 is valid address syntax
0.0.0.0
0.0.0.0 is valid address syntax - with special meaning!
0.0.0.0
0.0.0.0 is valid address syntax - with special meaning!
Defined as the "no particular address" placeholder
“0.0.0.0 is defined by the no particular address placeholder”
What does that mean?
No particular address?
The meaning depends on the context...
Server: All IPv4 addresses on the local machine
No particular address?
The meaning depends on the context...
Server: All IPv4 addresses on the local machine
No particular address?
The meaning depends on the context...
Server: All IPv4 addresses on the local machine
Routing: The default route (i.e., "the rest of" the internet)
Binding connections
DHCP Discovery/Request
When is 0.0.0.0 used?
Binding Connections
You can establish a TCP connection binding from address 0.0.0.0 so you can listen to it from different addresses!
Binding Connections
You can establish a TCP connection binding from address 0.0.0.0 so you can listen to it from different addresses!
Example: If you're hosting an HTTP server on port 80, instead of having a TCP connection from each IP address, you simply have one binding from 0.0.0.0
Hosted on 129.0.0.2, 129.0.0.3, ...
DHCP Discovery/Request
DHCP: Dynamic Host Configuration Protocol
It is used for the distribution and assignment of IP addresses.
More information can be found in the description!
Packet Description
Source Address
Destination Address
Packet Description
Source Address
Destination Address
DHCP Discovery/Request Example (1)
DCHP OFFER
DHCPServer / DCHPServer
Broadcast / 255.255.255.255
DHCP DISCOVER
Client / 0.0.0.0
Broadcast / 255.255.255.255
Packet Description
Source Address
Destination Address
Packet Description
Source Address
Destination Address
DHCP Discovery/Request Example (2)
DCHP ACK
DHCPServer / DCHPServer
Broadcast / 255.255.255.255
DHCP REQUEST
Client / 0.0.0.0
Broadcast / 255.255.255.255
Review
Loopback (127.0.0.1)
0.0.0.0
1
2
No particular address placeholder, typically used for hosting and DHCP servers
127.0.0.1 is the special loopback address used for diagnostics and locally hosted servers
Thank for watching!
Subscribe for new videos every Friday @12:00pm EST
See you all next week :)
27