Skip to main content
added 83 characters in body
Source Link
grawity_u1686
  • 463.9k
  • 66
  • 974
  • 1.1k

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; DHCP is there mainlyjust for user convenience, and IP(v4) has existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

(Install Wireshark or some other packet capture tool to see this.)

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although the protocol looks like it is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE for ADSL, or PPTP VPNs, or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing. And typically all such mechanisms are only used for "user-facing" connections, whereas "core" connections between routers almost always use manually configured IP addresses.

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; DHCP is there mainly for user convenience, and IP(v4) has existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

(Install Wireshark or some other packet capture tool to see this.)

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although the protocol looks like it is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE for ADSL, or PPTP VPNs, or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing. And typically all such mechanisms are only used for "user-facing" connections, whereas "core" connections between routers almost always use manually configured IP addresses.

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; DHCP is there just for user convenience, and IP(v4) has existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

(Install Wireshark or some other packet capture tool to see this.)

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although the protocol looks like it is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE for ADSL, or PPTP VPNs, or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing. And typically all such mechanisms are only used for "user-facing" connections, whereas "core" connections between routers almost always use manually configured IP addresses.

added 83 characters in body
Source Link
grawity_u1686
  • 463.9k
  • 66
  • 974
  • 1.1k

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; DHCP is there mainly for user convenience, and IP(v4) has existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

(Install Wireshark or some other packet capture tool to see this.)

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although the protocol technicallylooks like the protocolit is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 (SomeSome link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE for ADSL, or PPTP VPNs, or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing.) And typically all such mechanisms are only used for "user-facing" connections, whereas "core" connections between routers almost always use manually configured IP addresses.

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; IP existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although technically the protocol is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 (Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE or PPTP VPNs or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing.)

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; DHCP is there mainly for user convenience, and IP(v4) has existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

(Install Wireshark or some other packet capture tool to see this.)

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although the protocol looks like it is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE for ADSL, or PPTP VPNs, or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing. And typically all such mechanisms are only used for "user-facing" connections, whereas "core" connections between routers almost always use manually configured IP addresses.

added 83 characters in body
Source Link
grawity_u1686
  • 463.9k
  • 66
  • 974
  • 1.1k

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; hostsIP existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP, which only gained popularity many years later. (Some link types have their own configuration mechanisms: anything that uses PPP – like PPPoE or PPTP or SSTP or dial-up – will use PPP-integrated configuration instead of DHCP; mobile networks also do their own thing.)

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

The DHCP client software achieves this by using "raw sockets" where it directly sendsmanually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although technically the protocol is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

(On On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPIPv6 address which(the fe80:… address), so the host can be usedjust use that to send and receive its DHCPv6 packets – or ICMPv6 Router AdvertisementsSolicitations, or anything else needed for configuration.


1 (Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE or PPTP VPNs or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing.)

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; hosts can have their IP address configured manually or in any other ways without DHCP, which only gained popularity many years later. (Some link types have their own configuration mechanisms: anything that uses PPP – like PPPoE or PPTP or SSTP or dial-up – will use PPP-integrated configuration instead of DHCP; mobile networks also do their own thing.)

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

The DHCP client software achieves this by using "raw sockets" where it directly sends whole IP packets instead of letting the OS add the usual lower-layer processing. So although technically the protocol is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

(On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IP address which can be used to send DHCPv6 packets – or ICMPv6 Router Advertisements, or anything else needed for configuration.)

DHCP is a protocol at the application layer, so it must depend on the IP protocol in the network layer. But the IP protocol requires assignment of IP addresses to network interfaces, which is the job of DHCP. Do DHCP and IP depend on each other, and therefore require the existence of each other in advance? How does this cyclic dependency work?

It's not a hard dependency; IP existed for a long time before DHCP (or BOOTP, or RARP). Hosts can have their IP address configured manually or in any other ways1 without DHCP.

But DHCP on IPv4 works in a somewhat unusual way – unlike other (normal) UDP-based protocols, a DHCP client is allowed to send packets from the "zero" address 0.0.0.0 while the host doesn't yet have a valid IP address.

The DHCP client software achieves this by using "raw sockets" where it manually builds whole IP packets (adding the UDP header and the IP header) instead of letting the OS add the usual lower-layer processing. So although technically the protocol is transported inside UDP/IP, it does not actually depend on the operating system's IP stack working at all.

On IPv6 the situation is different as every IPv6-capable interface automatically has a "link-local" IPv6 address (the fe80:… address), so the host can just use that to send and receive its DHCPv6 packets – or ICMPv6 Router Solicitations, or anything else needed for configuration.


1 (Some link types have their own configuration mechanisms: for example, anything that uses PPP – like PPPoE or PPTP VPNs or oldschool dial-up – will use PPP-integrated configuration instead of DHCP. Mobile networks also do their own thing.)

Source Link
grawity_u1686
  • 463.9k
  • 66
  • 974
  • 1.1k
Loading