Renegotiate a DHCP lease (RENEW)
Is it just me? Here is a something that is suppose to fall off the BSD apple tree like dust in the wind. I never ask single question before I do many hours - days of searching, researching and testing. I read a lot of interesting things that BSD can do and I gather all the commands that I can find that claim to work, but the minute I go to try them, they don't work or they stop working since the last update, TODAY.
I'm simply trying to re-new the DHCP lease that is generated by the DSL connection (the INTERNET side). From what I gather, this will help you keep the same I.P. address (static IP). Once you have dhclient.leases.em0 in your < /var/db >, I read that with BSD you do not have to wait for the lease to expire in order to re-new it. I have this this file::::
# dhclient -r em0 # I get: dhclient: illegal option - - r
# /sbin/dhclient -r em0 # I get: dhclient: illegal option - - r
I read dhclient.conf(5), dhcpd.conf(5), dhcpd.leases(5), dhclient(8) and dhcpd(8) trying to get a clue but I found nothing but the fact that the -r option is not included, non did I understand what this option has been replaced with.
Anyway, there got to be a few ways that I have not found or else there would be no INTERNET. Could you guys tell post a few of the many ways to accomplish this using FreeBSD 8.2 or 9.0 that actually been tested and work on your machine?
Thanks in advance
I have 17 more links but they all say the same thing and nothing more. Just ask and I'll post them.
DHCP with ADSL? I'm guessing you have one of those new fangled combination routers.. generally one would have used a PPPoE client in the past.
As for leases, I don't know where you discovered the '-r' argument.. but it is indeed invalid, there is no documented way to renew the lease.. subsequent dhclient(8) attempts generally reassign it.
FreeBSD uses an old version of OpenBSD's dhclient(8), you could use the ISC DHCP client if you want advanced features: net/isc-dhcp41-client.
Alternatively if you do have a combo router, there is likely a web interface that would allow you to fiddle with DHCP leases.
Thanks BSDfan666, I thought I was going crazy. Everyday I'm on top of new undocumented stuff (actually, old stuff and no warning or info of new replacements) and most links are not dated so how is one suppose to know other than reading 30 years worth of changes. If you had not help me along these past few weeks I be stupid forever trying to make something work that can't work. I'm still trying to figure out something from child-hood and I need nothing else added.
Yes it is one of those new (cheap-made) router and there are features at AT&T end that allow for some settings but for how long is the question and some are blocked... I pull the plug on all of them since posting, I lost dsl and got it back. I jump up the Maximum Transmission Unit (MTU) that I read about in Open-BSD PF from 1492 to 1500 ... it burped but DSL is still working. According to Open-BSD PF that's was a serous issue. I play ball hard because it's was nothing compared to what I did with BSD in under 3 days. It took the chicken out of me.
Get what, remember the stuff you said in this post...
Since than, I tried every sequence possible and one of those accidental three-line sequence actually renewed the lease, TWICE before my eyes. I double checked and it worked ... but I was still trying to do something else at the moment "How to set 1000base with full-duplex" .. So I missed it and never been able to remember those steps for the life of me. I had to finally post this thread.
When I stubble upon it again, I'll record it here. I always do. I might loss my computer but you guys will be here until the end of time. At lease I know for sure it can be done because I checked the lease all day long for each action until I understood the baseT thing and a whole lot more. Than came static-ip and renew.
About the -r, it's the 11th line up in the link I posted above and it was used up to FreeBSD 6.0 according to other threads I found with the same command and -r. The best one was dated 2004, but I lost it.
Anyway, now I know how to deal with BSD ... once I learn 9.0 I may never upgrade for the next 10 years, including security patches if it screw up any of the present commands, documents or speed. Beside, not everyone need every single thing anyway. I have my own security tricks.
It only destroy what it took a user a life-time to learn. Even Windows let the commands live for 5 years before breaking peoples apps, hearts and minds. But I got a felling this is the new day. 9.0 and others of 2011 -2014 will be popular like 6.0 once was for the next twenty years I bet. It's like what python did, they crash the pass "BUT" documented all-new-stuff from day one of the big switch. I swear, I learn more about networking in three days than I did in my Network+ class. For now on it's all about tech with out the love
Just wanted to say thanks again BSDfan666
Thanks a million
Simplest method? Manually kill dhclient. Then manually start dhclient on that interface. Voila! Done.
The very first time you connect via DHCP, the handshake looks like so:
client: DHCPDISCOVER broadcasting for a DHCP server
server: DHCPOFFER reply with an IP
client: DHCPREQUEST reply with the offered IP
server: DHCPACK marking that IP as used by the client
When you stop/start dhclient, the following occurs:
server: DHCPOFFER with an IP
client: DHCPREQUEST with the last IP it had
server: DHCPACK, marking that IP as in use by the client
If that IP is no longer available (ie, assigned to another client), then the server sends a DHCPNACK (Not ACKnowledged). Then the offer/request happens again with another IP.
There's really no such thing as "DHCP renew" option. It's just the client requesting the last IP that it had, and the server either accepting it or sending another IP.
|Thread||Thread Starter||Forum||Replies||Last Post|
|isc dhcp server||queshaw||OpenBSD Packages and Ports||1||8th February 2011 11:09 AM|
|W2K DHCP Issue||DrJ||Other OS||4||25th May 2009 07:19 PM|
|obtain 2 ips via dhcp||dextro||FreeBSD General||2||6th February 2009 04:56 AM|
|Obtaining multiple IPs from ISP via DHCP||dextro||General software and network||15||9th January 2009 02:36 AM|
|DHCP Server||WeakSauceIII||OpenBSD General||1||25th September 2008 03:34 AM|