Community discussions

MikroTik App
 
morf
Member Candidate
Member Candidate
Topic Author
Posts: 182
Joined: Tue Jun 21, 2011 5:31 pm
Location: Saint-Petersburg

Deny DHCP to issue the same ip

Mon Oct 22, 2012 6:01 pm

Hello!
My customers have a dynamic public IP address through DHCP. The problem is that the caller is always given the same address. How to make sure that subscribers to issue a new IP, rather than the current extended.
The problem is that the subscriber requesting renewal and I do not want it to be extended the, I want to give each time new.
Sorry for my English :)
 
mixig
Member
Member
Posts: 315
Joined: Thu Oct 27, 2011 2:19 pm

Re: Deny DHCP to issue the same ip

Mon Oct 22, 2012 7:05 pm

Can you create no-ip or dyndns account and put the script which will update your account with currnet public ip, for that you also need to create schedule. so after that you can you your domain name e.g. xxyyy.no-ip.org and that will be pointing to your public ip, to your mikrotik...
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Deny DHCP to issue the same ip

Mon Oct 22, 2012 8:33 pm

I don't think that is possible to do with a MikroTik. The client will ask for a renewed lease for it's current address at around %50 of the lease timeout, if the address it requests is free, the DHCP server will renew it. The best you might be able to do is delete the DHCP leases table every so often so the DHCP server doesn't remember what it handed out, but even then, if the client asks for a specific IP upon a DHCP renewal and it is free, the DHCP server will give it to them.

What are you trying to gain by making a client get a new lease every time they ask for one? I don't see it gaining you anything more than a potential problem that doesn't need to be there.
 
morf
Member Candidate
Member Candidate
Topic Author
Posts: 182
Joined: Tue Jun 21, 2011 5:31 pm
Location: Saint-Petersburg

Re: Deny DHCP to issue the same ip

Mon Oct 22, 2012 9:08 pm

I don't think that is possible to do with a MikroTik. The client will ask for a renewed lease for it's current address at around %50 of the lease timeout, if the address it requests is free, the DHCP server will renew it. The best you might be able to do is delete the DHCP leases table every so often so the DHCP server doesn't remember what it handed out, but even then, if the client asks for a specific IP upon a DHCP renewal and it is free, the DHCP server will give it to them.

What are you trying to gain by making a client get a new lease every time they ask for one? I don't see it gaining you anything more than a potential problem that doesn't need to be there.
I ISP, I want to introduce a monthly fee for the service permanent public IP address. I can not do that, because subscribers are always the same in dynamic DHCP, and he is always constant because the subscriber prolongs lease.
Last edited by morf on Mon Oct 22, 2012 9:11 pm, edited 1 time in total.
 
morf
Member Candidate
Member Candidate
Topic Author
Posts: 182
Joined: Tue Jun 21, 2011 5:31 pm
Location: Saint-Petersburg

Re: Deny DHCP to issue the same ip

Mon Oct 22, 2012 9:10 pm

Can you create no-ip or dyndns account and put the script which will update your account with currnet public ip, for that you also need to create schedule. so after that you can you your domain name e.g. xxyyy.no-ip.org and that will be pointing to your public ip, to your mikrotik...
You do not true understand, probably because I do not know much English. Read my post above.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Deny DHCP to issue the same ip

Tue Oct 23, 2012 2:33 pm

ok, RFC stuff first - internet standard states that DHCP-server has to do best effort it can to assign same ip address to same subscriber very time it connects and that is ensured by setting reasonably high lease time, so that customer can disconnect for some time but after that get the same ip address. DHCP-server in RouterOS is complying with request to ensure that same address is given to same user.

Now, if you set very short lease time (1 hour for example) when someone releases address, or lease time ends, address is brought back to the pool of available addresses, If there is active request, address can be given out to another client.
 
morf
Member Candidate
Member Candidate
Topic Author
Posts: 182
Joined: Tue Jun 21, 2011 5:31 pm
Location: Saint-Petersburg

Re: Deny DHCP to issue the same ip

Tue Oct 23, 2012 5:53 pm

ok, RFC stuff first - internet standard states that DHCP-server has to do best effort it can to assign same ip address to same subscriber very time it connects and that is ensured by setting reasonably high lease time, so that customer can disconnect for some time but after that get the same ip address. DHCP-server in RouterOS is complying with request to ensure that same address is given to same user.

Now, if you set very short lease time (1 hour for example) when someone releases address, or lease time ends, address is brought back to the pool of available addresses, If there is active request, address can be given out to another client.
So, I can only do this through a small lease, for example 1 hour?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Deny DHCP to issue the same ip

Tue Oct 23, 2012 7:35 pm

For your exact stated goal, yes. But also keep in mind if the client maintains a consistent connection when the lease time is up, they will still get the same lease again, so it doesn't really meet what you are aiming for. The best option for you is you can still offer the static IP address service, just have a note with your normal service that addresses have the chance to change, which is true. That is the way a lot of service providers operate, most of the time your address doesn't change, but it will at some point. If a business needs a static IP it will pay for it to avoid the headaches of the times it does change.

Who is online

Users browsing this forum: Bing [Bot], scoobyn8 and 88 guests