Change dhcp-client-identifier

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Change dhcp-client-identifier

thomas.zenz@oenb.at
Sorry, I did not get the answer via mail, so I resend the Mail like this:

Hi Patrick,

I agree with you, that DHCP is not the cause of the issue. But, as
allways, we are the ones who can fix it ;) Can we?

We do have more VPN clients. That's why we had to look into this problem.

Regards
Thomas

###################################################

It sounds like something changed recently - new VPN appliance? More VPN
clients?

It might be useful to include that in the conversation because it
doesn't sound like ISC DHCP is the cause of the issue, just where it's
become visible.

Patrick

###################################################

Dear all,

We are running isc dhcp for years now.
In the last weeks the count of vpn clients is growing. We only planned a
/24 network. That would be ok if there wasn't the cisco logic of
creating the dhcp-client-identifier.  Cisco takes his own Mac-address,
adds the PCName and here comes the problem, a random number...
So my Client uses 17 Leases!
I reduced the lease-time to 1h but still, if a usere reconnects 3 times
in one hour, it uses 3 addreses.

  uid "\000cisco-881d.fc6f.affe-NB326973851-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973852-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973857-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973858-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973861-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973863-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973848-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973850-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973853-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973854-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973873-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973859-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973865-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973866-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973868-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973869-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973870-inside\000";

I tried to change the uid like this:
on commit {
   set myClientID = pick (option dhcp-client-identifier,0);
   log (info, concat ("ClientID: ",myClientID));
but it looks like the option is no string... (from the log)
dhcpd: ClientID: HPs2,
dhcpd: ClientID: HPs2,
dhcpd: ClientID: fÚAi
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: lbmw&
dhcpd: ClientID: lbmw&
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPs3T
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: HPs\
dhcpd: ClientID: HPs\

I tried to do it like this:
        if (binary-to-ascii(10,8,".",packet(24,3)) = "192.168.1" ) {
             set vpnClientID = concat(substring(myClientID,26,6),"-inside");
             set dhcp-client-identifier = vpnClientID;
             log (info, concat ("vpnClientID: ",vpnClientID));
        }
This is also not working. I use a similar option to choose the PXE Bootfile.

Please help
Kind Regards
Thomas



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Change dhcp-client-identifier

perl-list
If you have foreknowledge of the MAC address, you could assign static IP based on the mac address like so:

host SomeHost { hardware ethernet 00:01:02:03:04:05; fixed-address 10.0.10.2; }

which would then make it not matter what their dhcp-client-identifier is...


From: "Thomas Zenz" <[hidden email]>
To: [hidden email]
Sent: Wednesday, November 23, 2016 7:08:55 AM
Subject: Change dhcp-client-identifier
Sorry, I did not get the answer via mail, so I resend the Mail like this:

Hi Patrick,

I agree with you, that DHCP is not the cause of the issue. But, as
allways, we are the ones who can fix it ;) Can we?

We do have more VPN clients. That's why we had to look into this problem.

Regards
Thomas

###################################################

It sounds like something changed recently - new VPN appliance? More VPN
clients?

It might be useful to include that in the conversation because it
doesn't sound like ISC DHCP is the cause of the issue, just where it's
become visible.

Patrick

###################################################

Dear all,

We are running isc dhcp for years now.
In the last weeks the count of vpn clients is growing. We only planned a
/24 network. That would be ok if there wasn't the cisco logic of
creating the dhcp-client-identifier.  Cisco takes his own Mac-address,
adds the PCName and here comes the problem, a random number...
So my Client uses 17 Leases!
I reduced the lease-time to 1h but still, if a usere reconnects 3 times
in one hour, it uses 3 addreses.

  uid "\000cisco-881d.fc6f.affe-NB326973851-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973852-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973857-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973858-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973861-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973863-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973848-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973850-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973853-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973854-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973873-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973859-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973865-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973866-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973868-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973869-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973870-inside\000";

I tried to change the uid like this:
on commit {
   set myClientID = pick (option dhcp-client-identifier,0);
   log (info, concat ("ClientID: ",myClientID));
but it looks like the option is no string... (from the log)
dhcpd: ClientID: HPs2,
dhcpd: ClientID: HPs2,
dhcpd: ClientID: fÚAi
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: lbmw&
dhcpd: ClientID: lbmw&
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPs3T
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: HPs\
dhcpd: ClientID: HPs\

I tried to do it like this:
        if (binary-to-ascii(10,8,".",packet(24,3)) = "192.168.1" ) {
             set vpnClientID = concat(substring(myClientID,26,6),"-inside");
             set dhcp-client-identifier = vpnClientID;
             log (info, concat ("vpnClientID: ",vpnClientID));
        }
This is also not working. I use a similar option to choose the PXE Bootfile.

Please help
Kind Regards
Thomas



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: Change dhcp-client-identifier

Patrick Trapp
It sounds like the VPN appliance is going to interfere with simply identifying the client by MAC, is that right?

What is your DHCP lease time? You mention "if you connect three times in an hour, you get three leases" - does that mean your leases are good for an hour? (I don't think that's unreasonable for VPN, but it might be shorter than you want once this other issue is worked out.)

When you say you have more VPN clients, how many more? What percentage do you anticipate being connected at the same time? If you are increasing your number of clients and/or connected clients significantly, have you considered just increasing your VPN address pool. You would not have to abandon the existing pool - you could create a shared network entry with a new subnet, creating a larger pool without having to restructure your existing IP scheme.

Otherwise, I can't offer any guidance. I have not needed to resort to manipulation of client-id to assign addresses and do not know what your options are there.

I really think I would be looking hard at the Cisco appliance to make sure you don't have an option to modify its behavior.

All the best,
Patrick


From: dhcp-users [[hidden email]] on behalf of perl-list [[hidden email]]
Sent: Wednesday, November 23, 2016 7:42 AM
To: Users of ISC DHCP
Subject: Re: Change dhcp-client-identifier

If you have foreknowledge of the MAC address, you could assign static IP based on the mac address like so:

host SomeHost { hardware ethernet 00:01:02:03:04:05; fixed-address 10.0.10.2; }

which would then make it not matter what their dhcp-client-identifier is...


From: "Thomas Zenz" <[hidden email]>
To: [hidden email]
Sent: Wednesday, November 23, 2016 7:08:55 AM
Subject: Change dhcp-client-identifier
Sorry, I did not get the answer via mail, so I resend the Mail like this:

Hi Patrick,

I agree with you, that DHCP is not the cause of the issue. But, as
allways, we are the ones who can fix it ;) Can we?

We do have more VPN clients. That's why we had to look into this problem.

Regards
Thomas

###################################################

It sounds like something changed recently - new VPN appliance? More VPN
clients?

It might be useful to include that in the conversation because it
doesn't sound like ISC DHCP is the cause of the issue, just where it's
become visible.

Patrick

###################################################

Dear all,

We are running isc dhcp for years now.
In the last weeks the count of vpn clients is growing. We only planned a
/24 network. That would be ok if there wasn't the cisco logic of
creating the dhcp-client-identifier.  Cisco takes his own Mac-address,
adds the PCName and here comes the problem, a random number...
So my Client uses 17 Leases!
I reduced the lease-time to 1h but still, if a usere reconnects 3 times
in one hour, it uses 3 addreses.

  uid "\000cisco-881d.fc6f.affe-NB326973851-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973852-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973857-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973858-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973861-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973863-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973848-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973850-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973853-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973854-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973873-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973859-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973865-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973866-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973868-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973869-inside\000";
  uid "\000cisco-881d.fc6f.affe-NB326973870-inside\000";

I tried to change the uid like this:
on commit {
   set myClientID = pick (option dhcp-client-identifier,0);
   log (info, concat ("ClientID: ",myClientID));
but it looks like the option is no string... (from the log)
dhcpd: ClientID: HPs2,
dhcpd: ClientID: HPs2,
dhcpd: ClientID: fÚAi
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: lbmw&
dhcpd: ClientID: lbmw&
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPsY
dhcpd: ClientID: HPs3T
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: HPsW¬
dhcpd: ClientID: HPs\
dhcpd: ClientID: HPs\

I tried to do it like this:
        if (binary-to-ascii(10,8,".",packet(24,3)) = "192.168.1" ) {
             set vpnClientID = concat(substring(myClientID,26,6),"-inside");
             set dhcp-client-identifier = vpnClientID;
             log (info, concat ("vpnClientID: ",vpnClientID));
        }
This is also not working. I use a similar option to choose the PXE Bootfile.

Please help
Kind Regards
Thomas



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users