Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. DHCPV6 - IP assignment not working (Usman Ahmad)
   2. Re: Assign IP based on if giaddr is even or odd (Stephen Donovan)


----------------------------------------------------------------------

Message: 1
Date: Thu, 7 Jan 2021 21:49:30 +0400
From: Usman Ahmad <usman....@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: DHCPV6 - IP assignment not working
Message-ID:
        <cale1tgrjahoqkto2-b6u-ex+udsehu1cbazovejyq_uedmm...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear Experts,

I have configured DHCPv6 but IP assignment not working. i can see only WAN
IPv6 address however LAN delegated prefix isn't being assigned.

DHCP configuration:

shared-network site-a100 {
        subnet6 20a0:b241:2:2::/64 {
                pool6 {
                     range6 20a0:b241:0002:0002:0000:0000:0000:1000
20a0:b241:0002:0002:ffff:ffff:ffff:ffff;
                     range6 20a0:b241:2:2::/64 temporary;
                     option dhcp6.name-servers
 20a0:b241:2:5::4,20a0:b241:2:5::5;

                     prefix6 20a0:b241:2:300:: 20a0:b241:2:400:: /64;
                     min-lease-time 600;
                     preferred-lifetime 600;
                     default-lease-time 600;
                     max-lease-time 600;
                     allow unknown-clients;
               }
        }
}


DHCP logs:

Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Relay-forward message from
20a0:b241:0:2::3 port 547, link address 20a0:b241:2:2::2, peer address
fe80::2ab4:48ff:feec:3f1e
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Picking pool prefix
20a0:b241:2:400::/64
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Advertise PD: address
20a0:b241:2:400::/64 to client with duid 00:03:00:01:28:b4:48:ec:3f:1e iaid
= 0 valid for 600 seconds
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Sending Relay-reply to
20a0:b241:0:2::3 port 547
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Relay-forward message from
20a0:b241:0:2::2 port 547, link address 20a0:b241:2:2::3, peer address
fe80::2ab4:48ff:feec:3f1e
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Picking pool prefix
20a0:b241:2:400::/64
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Advertise PD: address
20a0:b241:2:400::/64 to client with duid 00:03:00:01:28:b4:48:ec:3f:1e iaid
= 0 valid for 600 seconds
Jan  7 15:42:51 dhcp64-01 dhcpd[15188]: Sending Relay-reply to
20a0:b241:0:2::2 port 547
Jan  7 15:42:52 dhcp64-01 dhcpd[15188]: Relay-forward message from
20a0:b241:0:2::3 port 547, link address 20a0:b241:2:2::2, peer address
fe80::2ab4:48ff:feec:3f1e
Jan  7 15:42:52 dhcp64-01 dhcpd[15188]: Picking pool prefix
20a0:b241:2:400::/64
Jan  7 15:42:52 dhcp64-01 dhcpd[15188]: Advertise PD: address
20a0:b241:2:400::/64 to client with duid 00:03:00:01:28:b4:48:ec:3f:1e iaid
= 0 valid for 600 seconds
Jan  7 15:42:52 dhcp64-01 dhcpd[15188]: Sending Relay-reply to
20a0:b241:0:2::3 port 547

regards,
Usman

-- 
*--*
*Regards,*
Usman Ahmad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20210107/d99a9d0b/attachment-0001.htm>

------------------------------

Message: 2
Date: Thu, 7 Jan 2021 17:54:43 +0000
From: Stephen Donovan <stephen.dono...@gmail.com>
To: "dhcp-users@lists.isc.org" <dhcp-users@lists.isc.org>
Subject: Re: Assign IP based on if giaddr is even or odd
Message-ID:
        
<ch2pr14mb35629d5eaef76ee7a813bf33fe...@ch2pr14mb3562.namprd14.prod.outlook.com>
        
Content-Type: text/plain; charset="us-ascii"

Thanks for the responses that I received, I managed to get it working.

Here is the match statement that I needed to use finally.

match if (suffix(binary-to-ascii(2,8, ".", packet(27,1)),1) = "0");


From: Stephen Donovan <stephen.dono...@gmail.com>
Date: Wednesday, January 6, 2021 at 12:53 PM
To: "dhcp-users@lists.isc.org" <dhcp-users@lists.isc.org>
Subject: Assign IP based on if giaddr is even or odd

Hello Gurus

I am trying to deploy a series of routers that can use DHCP to provide an IP 
address to the neighbouring router and once the router is reachable management 
software will push configuration to it.

All links between the routers are /31 subnets and it is possible that each 
router could be configured in each direction, for example if router A is up, 
then it will offer an address to router B, however if router B is up before A 
then B will offer an address to A.

I tried the sample subnet shown below and everything works, if I use the full 
giaddr in the match statement, however if I try to simplify it to match the 
class if the giaddr is even or odd doesn't work. My attempt on using a regex to 
match even/odd is commented out.

Does anyone have any suggestions on how I could use a different match to hand 
out different addresses based on if the giaddr is even or odd? Did I make a 
fundamental mistake in my match statement. I'm willing to use the full match, 
but would like to simplify if possible.

Thanks in advance
Steve

#test subnet
subnet 11.12.13.44 netmask 255.255.255.254 {
log(debug, concat ("giaddr: ", binary-to-ascii(10,8, ".", packet(27,1)))) ;
class "cw" {
#match if (binary-to-ascii(10,8, ".", packet(27,1)) ~~
#"^\d*[02468]$");
match if (binary-to-ascii(10,8, ".", packet(24,4)) =
"11.12.13.44");
}

pool
{
allow members of "cw";
range 11.12.13.45 11.12.13.45;
option routers 11.12.13.44;
option subnet-mask 255.255.255.254;
}

pool
{
deny members of "cw";
range 11.12.13.44 11.12.13.44;
option routers 11.12.13.45;
option subnet-mask 255.255.255.254;
}

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20210107/d5f8d760/attachment-0001.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 147, Issue 7
******************************************

Reply via email to