Options

Question about DHCP

sundayvietsundayviet Registered Users Posts: 4 ■□□□□□□□□□
How DHCP client get IP address default if DHCP Server have two scopes ?

Comments

  • Options
    advanex1advanex1 Member Posts: 365 ■■■■□□□□□□
    I believe only one DHCP scope is applied per subnet, so the host would only have one scope to pull from. The only exception is a super scope (I think).
    Currently Reading: CISM: All-in-One
    New Blog: https://jpinit.com/blog
  • Options
    poolmanjimpoolmanjim Member Posts: 285 ■■■□□□□□□□
    When a DHCP client is first hooked into the network it broadcasts a message asking for a DHCP. Then a DCHP server responds. The client go back and forth to sort out the details until both agree and an address is issued.

    When a second scope is in play on the same subnet the first DHCP server to respond is chosen by the client. This can obviously cause trouble if the wrong server responds.

    To mitigate this and still have two scopes on the same subnet filters, DHCP policies, and exclusions can be used to target scopes to specific devices.
    2019 Goals: Security+
    2020 Goals: 70-744, Azure
    Completed: MCSA 2012 (01/2016), MCSE: Cloud Platform and Infrastructure (07/2017), MCSA 2017 (09/2017)
    Future Goals: CISSP, CCENT
  • Options
    sundayvietsundayviet Registered Users Posts: 4 ■□□□□□□□□□
    Thank poolmanjim and advanex1 for responding. But of course I mean the server have two scopes with different subnets.
    The simple topo may be : PC---DHCP server(scope1: subnet1; scope2: subnet2). So how client PC obtain IP address? Will Server assign IP from scope1 or scope2 to client ?
    Thank!
  • Options
    poolmanjimpoolmanjim Member Posts: 285 ■■■□□□□□□□
    The client requests occur only on the client's subnet and are stopped by routers. The same thing goes for the DHCP requests. However, as far as I can imagine, DHCP doesn't distinguish except that it operates on its subnet.

    So lets imagine that you have a DHCP sever setup on the 192.168.0.0 subnet and it is configured with Scope1 to push out IPs in the 192.168.0.0/24 range and Scope2 in the 192.168.1.0/24 range. Which IP your client receives in this case, as far as I can tell, is completely random. This configuration is not a recommended configuration and the only remediation for it would be to configure policies or filtering.
    2019 Goals: Security+
    2020 Goals: 70-744, Azure
    Completed: MCSA 2012 (01/2016), MCSE: Cloud Platform and Infrastructure (07/2017), MCSA 2017 (09/2017)
    Future Goals: CISSP, CCENT
  • Options
    sundayvietsundayviet Registered Users Posts: 4 ■□□□□□□□□□
    It is random to get IP address, I think so, too. Of course this configuration is not recommended, I know but this case for studing; and thank so much for your answers!
  • Options
    bohackbohack Member Posts: 114
    Great question... If you have multiple scopes configured on the same physical network. The DCHP Discover message that is heard on the interface corresponding to the configured IP/network is looked up in the scope. I.e. if a network card is configured on the DHCP server with 192.168.1.0/24 and the DHCP server serves 192.168.1.0/24, 192.168.2.0/24, the 192.168.1.0/24 is the scope an address will be issues for. If you have a DHCP relay, then the GIADDR in the discover packet encloses the network the discover was heard from and forwards it to the DHCP server. The same principle applies the GIADDR is used to select the proper scope. I have a few videos on this:

    https://www.youtube.com/watch?v=nNyLRN96tI0


    https://www.youtube.com/watch?v=kWfc3mUMk8o


    https://www.youtube.com/watch?v=iYDzS8ijXfY (11:26 I explain the GIADDR)
    ______________________________________________________________

    NetworkedMinds - http://www.youtube.com/networkedminds
    MCSA / MCSE Educational Channel
Sign In or Register to comment.