Renew DHCP lease script

Joined
Apr 28, 2009
Messages
2
Reaction score
0
Points
1
I go to this university where they use Bradford Wireless Network to control wireless use. For macs, it takes 4-5 minutes to obtain 10.5... IP from 10.9. The easiest way for me to avoid waiting is to go through System Preferences, Network, and renew DHCP lease there. But it gets highly annoying doing it so many times during the day after I sign in.

Is there a script that could execute this faster? I tried googling, but I couldn't find any good results.
 
Joined
Apr 7, 2009
Messages
3,308
Reaction score
58
Points
48
Location
Whangarei NZ
Your Mac's Specs
27 iMac+Thunderbolt, iMac 21,
First, why not try adding DNS numbers of your setup that you are using at Uni. Make a location for Uni go into Sys Prefs/Airport/Location/Edit Locations and then with the location selected go into Sys Prefs/Airport/Advanced/DNS and put in the DNS numbers for you ISP.
Like this;
202.27.158.40
202.27.156.72
Have a location for home with settings and another for Uni with its settings.
Let us know if that helps.
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
you could run an AppleScript, it has a function built in, called do shell script:
do shell script "ipconfig set en0 BOOTP" with administrator privileges
do shell script "ipconfig set en0 DHCP" with administrator privileges
(just copy the above 2 lines into Script Editor)

basically, you will run the same thing you would run from Terminal, but you can compile it and sava as a .app and run that with spotlight or anything .. this will run and just ask you for a password
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
yea, I was thinking about setting to bootp then reset to dhcp. That'd definitely do it!
 
OP
C
Joined
Apr 28, 2009
Messages
2
Reaction score
0
Points
1
I tried both the DNS numbers and the shell script. Neither worked. I put the script into the editor and saved it as an app. After executing it and typing in my password, my IP didn't change. I'm trying to figure this out because it's so tedious to go through the steps every time I want to use the wireless.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top