Hot answers tagged

77

DHCP cannot use TCP as the transport protocol because TCP requires both end-points to have unique IP addresses. At the time a host is required to use DHCP, it does not have an IP address it can source the packets from, nor does it have the IP address of the DHCP server. So it uses 0.0.0.0 as the source IP address and 255.255.255.255 (broadcast) as the ...


32

https://www.rfc-editor.org/rfc/rfc2131#page-13 The servers receive the DHCPREQUEST broadcast from the client. Those servers not selected by the DHCPREQUEST message use the message as notification that the client has declined that server's offer. The protocol assumes there may be multiple DHCP servers. By broadcasting the request message, all servers that ...


24

Since the source has no IP address (0.0.0.0) and the destination is everyone (255.255.255.255), it's hard to see how you would identify a particular session. But even if you could, what would be the benefit? The data in a DHCP message is quite small (~300 bytes), so it can easily fit into a single segment. It's not worth the overhead to establish a TCP ...


20

There are multiple reasons why TCP wouldn't work for DHCP(v4.) First of all, TCP is connection-oriented. A TCP connection is defined between two particular hosts. However, when a DHCP client first starts up, it doesn't know which host(s) it wants to talk to. Its only option is to broadcast a DHCP DISCOVER message to all hosts on the local network. ...


17

IPv4: It will "flap". On the sending host (another host or the gateway/router) there will be an ARP entry for the IP pointing to the MAC address of one of the hosts. Packets will go to one of the hosts, wherever the ARP entry currently points. This will effectively disrupt connectivity for both hosts. IPv6: The neighbor discovery protocol will do a ...


15

Some work has been done to determine subtle differences in DHCP packets from different OSes, resulting in DHCP fingerprints. Examples include the options present in DHCP request and their order, and the content of certain options like option 55 (parameter list). Have a look at the papers and signatures at fingerbank.org. This suggests (have not tested it ...


15

You can configure an SVI as a dhcp client by using the following command within the SVI. ip address dhcp The same command is used on physical interfaces as well.


15

How Routers Handle Limited and Directed Broadcasts The first thing to understand to answer your questions is that limited broadcast frames are not routed. By default when a router receives a frame with a destination address that is broadcast at either layer 2 or layer 3, the router simply drops the frame. That's why routers are said to be the boundary of ...


15

The basic process is quite simple. I'll only cover that and omit scenarios where several DHCP servers exist, error conditions crop up or discovery has to cross network boundaries. A new client on a network sends a DHCPDISCOVER via udp from address 0.0.0.0 to 255.255.255.255:67 (broadcast, port 67). If there is at least one DHCP servers listining in the ...


14

Stateful autoconfiguration of IPv6 is the equivalent to the use of DHCP in IPv4. It requires a DHCPv6 service to provide the IPv6 address to the client device and that both client device and server maintain the "state" of that address (i.e. lease time, etc). Stateless autoconfiguration of IPv6 allows the client device to self-configure its IPv6 ...


13

Be aware of the broadcast flag, see RFC2131 (page 24): A client that cannot receive unicast IP datagrams until its protocol software has been configured with an IP address SHOULD set the BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or DHCPREQUEST messages that client sends. The BROADCAST bit will provide a hint to ...


12

An ICMP Echo request from the DHCP server to the IP address its about to allocate is used to determine if the IP address about to be assigned is already in use on the network. If a response is received from that IP the DHCP server will assign a different address. The ARP request on the newly received address from the client would do the same, check if ...


12

is it possible to assign a preconfigured IP address based on a port a device is connected to? What devices do I need for this? You can use a Cisco switch and an IOS that supports DHCP Server Port-Based Address Allocation on your switch; you also must issue DHCP from your switch. Assume that you have got Fa0/1 and Fa0/2 in Vlan120. ip dhcp use subscriber-...


12

The answer is that it can be either broadcast or unicast - and in some cases both unicast and broadcast before it reaches the client when an ip helper-address is used. A client doesn't actually have an IP address until the DISCOVER-OFFER-REQUEST-ACK exchange is completed. It is possible (although very unlikely) to have a situation arise where the server ...


11

IPv6 has more options for configuring addresses than IPv4. The process works as follows: A new client joins the network and sends a Router Solicitation (RS) Each router (can be multiple) sends a Router Advertisement (RA) This happens both on request (when receiving an RS) as well as periodically The RA contains a lot of information on how the network is ...


11

You can potentially have multiple DHCP servers - the request is sent as broadcast to notify the other DHCP servers that have potentially sent offers that their offer isn't taken.


10

The router will forward all DHCP requests to all servers configured with ip helper. The first server to respond with a usable address wins. I'm unaware of a way to round-robin from the router.


10

DHCP (Dynamic Host Configuration Protocol) utilizes four key steps as illustrated below: DHCP Discovery (DHCPDISCOVER) - Sent by the Client seeking a DHCP Server. DHCP Offer (DHCPOFFER) - Sent by the DHCP Server to offer an address (and other DHCP options) to the Client. DHCP Request (DHCPREQUEST) - Sent by the Client to accept the lease for the offered ...


9

If you configure an IP address on an interface the router will use the corresponding DHCP pool to answer DHCP requests. In your case you would do something like this: interface Fa0/0 ip address 192.168.0.1 255.255.255.248 ! interface Fa0/1 ip address 172.16.0.1 255.255.255.248 ! ip dhcp pool 0 network 192.168.0.0 255.255.255.248 ... ! ip dhcp pool 1 ...


9

What would be the correct way to force a client on an access port to use a dynamically assigned IP address ? You can't "impose" an IP configuration mode to an host from the switch (or any other device). You can prevent the communication between the host if he doesn't have an IP from the DHCP server. In other words, using the Cisco access layer switch, I ...


9

This is because the DHCP server must reside or have a relay/proxy on the same L2 network as the client. The DHCP OFFER is sent to the L2 address of the client (i.e. it's MAC address). If the request was relayed/proxied, then the DHCP OFFER goes to the relay/proxy which will then forward it to the correct L2 network. Broadcast traffic can be problematic ...


9

You can specify an interface to receive an address from DHCP like this. configure terminal interface (int-name-num) ip address dhcp This guide gives way more detail into DHCP features - Cisco DHCP Client Configuration You should note that there are additional commands to the ones I listed, but they are optional.


9

In RFC 7084, it also states: W-1: When the router is attached to the WAN interface link, it MUST act as an IPv6 host for the purposes of stateless [RFC4862] or stateful [RFC3315] interface address assignment. So in short, yes - a router should be able to autoconfigure an IPv6 address for its WAN interface. In reality though, most ISPs implement DHCPv6 and ...


8

If there's a duplicate IP address, which one "wins"? First, last, flaps, neither? I have been thinking about this question for the last six hours... I think the most appropriate answer is "Nobody wins". In other words, at least two computers can't be used reliably. Furthermore, you are spending time fixing a problem, and that time could have been used on ...


8

It appears the answer is that it is unnecessary configuration. If DHCP snooping is not running on that VLAN, then this configuration has no effect. I still couldn't find documentation that clearly states this, so I decided to test this myself. Started off with DHCP snooping enabled for all VLANs and a rate limit of one (1) DHCP packet per second (assuming ...


7

All broadcast traffic (DHCPDISCOVERs and DHCPREQUESTs) will be forwarded to all ip-helper addresses. The order in which the ip-helper statements are configured makes no difference. The device will take an address from the first server it receives a DHCPOFFER from. The only way to get around a scope being full is to configure a secondary subnet on the ...


7

If the client disconnect correctly through a DHCP Release (Graceful shutdown), then the lease ends upon receipt at the DHCP server, else the lease will expire upon the end of its actual "lease time". This last case is the most frequent one (due to OS crashing, IP stack misbehaving and terminal leaving the scope of a wireless network).


7

Because until the server sends the DHCPACK, the client still doesn’t have an IP address. It is possible for a DHCP server to respond to a request with a DHCPNACK.


7

When the host starts up it has no knowledge of the network addresses or masks that it should use. The only way for it to communicate is via an IP broadcast (255.255.255.255) to the local network. The DHCP client initiates a broadcast request on UDP port 67. The client cannot use TCP because it does not have an IP address of its own, nor does it know the DHCP ...


6

The ASA does not have a means of excluding addresses (or adding reservations.) The only option is to use addresses outside the DHCP scope (i.e. adjust the range to not include your statics.) This suggests a static arp entry may steer dhcp assignments, but a) it's not a documented/supported feature, and b) others report it not working.


Only top voted, non community-wiki answers of a minimum length are eligible