1 of 27

localhost

2 of 27

0.0.0.0

3 of 27

localhost vs 0.0.0.0

What are they? And what are they for?

4 of 27

127.0.0.1

127.0.0.1 is the loopback Internet Protocol (IP) address also referred to as the “localhost”

5 of 27

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

6 of 27

“127.0.0.1 is the loopback address”

What does that mean?

7 of 27

Loopback

Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself

8 of 27

Loopback

Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself

Used for:

  • Diagnostics

9 of 27

Loopback

Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself

Used for:

  • Diagnostics
  • Troubleshooting

10 of 27

Loopback

Loopback devices are special, virtual network interfaces that the computer uses to communicate with itself

Used for:

  • Diagnostics
  • Troubleshooting
  • Connect to servers running on local machine

11 of 27

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

12 of 27

Try this!

13 of 27

0.0.0.0

0.0.0.0 is valid address syntax

14 of 27

0.0.0.0

0.0.0.0 is valid address syntax - with special meaning!

15 of 27

0.0.0.0

0.0.0.0 is valid address syntax - with special meaning!

Defined as the "no particular address" placeholder

16 of 27

“0.0.0.0 is defined by the no particular address placeholder”

What does that mean?

17 of 27

No particular address?

The meaning depends on the context...

Server: All IPv4 addresses on the local machine

18 of 27

No particular address?

The meaning depends on the context...

Server: All IPv4 addresses on the local machine

  • If a host has two IP addresses, 192.168.0.1 and 192.168.0.2, a server listening on 0.0.0.0 will be reachable at both

19 of 27

No particular address?

The meaning depends on the context...

Server: All IPv4 addresses on the local machine

  • If a host has two IP addresses, 192.168.0.1 and 192.168.0.2, a server listening on 0.0.0.0 will be reachable at both

Routing: The default route (i.e., "the rest of" the internet)

20 of 27

Binding connections

DHCP Discovery/Request

When is 0.0.0.0 used?

21 of 27

Binding Connections

You can establish a TCP connection binding from address 0.0.0.0 so you can listen to it from different addresses!

22 of 27

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, ...

23 of 27

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!

24 of 27

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

25 of 27

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

26 of 27

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

27 of 27

Thank for watching!

Subscribe for new videos every Friday @12:00pm EST

See you all next week :)

27