[j-nsp] DHCP server recommendation for subscribers management

Andrey Kostin ankost at podolsk.ru
Tue Aug 10 18:21:22 EDT 2021


Andrey Kostin via juniper-nsp писал 2021-08-10 16:44:

> So far, I started to play with KEA dhcp server and stumbled on "shared
> subnet" with multiple pools topic. I have two clients connected. The
> first pool has only one IP available to force the client who comes
> last to use the second pool. The first client successfully gets .226
> IP from the first pool, but the second client fails.

Found the problem with KEA config, I didn't read docs thoroughly and 
missed "shared-networks" statement. It works this way:

     "shared-networks": [
         {
             "name": "ftth",
             "relay": {
                 "ip-addresses": [ "Y.Y.Y.Y" ]
             },


      "subnet4": [
          {
              "subnet": "X.X.X.224/28",
              "pools": [ { "pool": "X.X.X.226 - X.X.X.226" } ],

              "option-data": [
                  {
                      // For each IPv4 subnet you most likely need to 
specify at
                      // least one router.
                      "name": "routers",
                      "data": "X.X.X.225"
                  }
              ]
          },
          {
              "subnet": "X.X.X.240/28",
              "pools": [ { "pool": "X.X.X.242 - X.X.X.245" } ],

              "option-data": [
                  {
                      // For each IPv4 subnet you most likely need to 
specify at
                      // least one router.
                      "name": "routers",
                      "data": "X.X.X.241"
                  }
              ]
         }
     ],

However it puzzled me why KEA didn't send anything in response to BNG, 
but it's a different topic.
Meanwhile I set unique IP on lo0 as primary and now it appears in 
giaddr. On demux interfaces Junos uses an IP that matches the subnet of 
leased IP. So it looks like in this case preferred IP setting doesn't 
affect address selection process in any way.

Kind regards,
Andrey


More information about the juniper-nsp mailing list