0

enter image description here

If I have a DHCP server as on the Network Diagram graphic above on the broadcast domain of the fa0/1 and I create three scopes for example:

name: "scope_fa01" 
range: from 192.168.1.1 to 192.168.1.100
gateway: 192.168.1.254

name: "scope_fa02" 
range: from 192.168.2.1 to 192.168.2.100
gateway: 192.168.2.254

name: "scope_fa03" 
range: from 192.168.3.1 to 192.168.3.100
gateway: 192.168.3.254

how does the DHCP server knows which router interface(fa0/1, fa0/2, fa0/3) is which gateway and belongs to what scope? Do I have to statically assign the ip address for each router first?

  • What platform and DHCP server software are you asking about? What would be the exact configuration entered on the device? – grawity Jan 24 at 5:51
  • the one that comes with windows server. I'm just studying for the Network+ but this is not explained clearly in the text – Alekz GS4 Jan 24 at 5:57
0

It has been a while since I looked into these things, but looking at your diagram, your DHCP server only sends either to its own domain through the switch, or to the one router interface, fa0/1 and doesn't need to know beyond that. Just like if any computer wants to send to any other computer on a network, it can and doesn't need to know about any router interfaces beyond the one it itself connects to.

0

The PC behind fa0/1 would send a DHCPDISCOVER broadcast on the subnet it belongs to, to discover the DHCP server. In order for the fa0/2 and fa0/3 to reach the DHCP server, a DHCP relay agent would have to be configured.

In small networks, where only one IP subnet is being managed, DHCP clients communicate directly with DHCP servers. However, DHCP servers can also provide IP addresses for multiple subnets. In this case, a DHCP client that has not yet acquired an IP address cannot communicate directly with the DHCP server using IP routing, because it does not have a routable IP address, does not know the link layer address of a router and does not know the IP address of the DHCP server.

In order to allow DHCP clients on subnets not directly served by DHCP servers to communicate with DHCP servers, DHCP relay agents can be installed on these subnets. The DHCP client broadcasts on the local link; the relay agent receives the broadcast and transmits it to one or more DHCP servers using unicast. The relay agent stores its own IP address in field GIADDR field of the DHCP packet. The DHCP server uses the GIADDR-value to determine the subnet on which the relay agent received the broadcast, and allocates an IP address on that subnet. When the DHCP server replies to the client, it sends the reply to the GIADDR-address, again using unicast. The relay agent then retransmits the response on the local network.

In this situation, the communication between the relay agent and the DHCP server typically uses both a source and destination UDP port of 67. Source

  • from what it is said here "The relay agent stores its own IP address in field GIADDR field of the DHCP packet " I conclude that I must assign first the interface IP statically first, am I right? – Alekz GS4 Jan 24 at 6:16
  • @AlekzGS4 I believe so. What is the question you're studying asking specifically? It seems beyond the scope of Network+. I didn't have anything related to DHCP relay agents on my CCNA exam, and DHCP relay agents weren't event discussed in the CCNA curriculum. – DrZoo Jan 24 at 20:50
  • Although according to the book "Network+ Guide to Networks, Eighth Edition by Jill West" DHCP relay is within the scope, as well as configuring a DHCP server in windows server, but that specific question is not in the text, and they don't explain that I must first assign an static IP to the interface first and it stuck in my mind. – Alekz GS4 Jan 28 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.