The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,731 other followers

network – How can I release and renew my DHCP lease from Terminal? – Ask Different

Posted by jpluimers on 2016/06/07

Via the answer below I created the renew alias. I already had the first two aliases.

alias route-and-ipaddresses="netstat -nr | grep 'Internet\|Gateway\|default' && echo && ifconfig | grep '\: flags\|inet\|inet6' && echo more detailed info through ifconfig and netstat -nr"

alias whatismyip="curl http://whatismyip.akamai.com && echo"

alias renew_dhcp="sudo ipconfig set en0 DHCP && echo waiting 10 seconds for DHCP lease to be obtained && sleep 10 && route-and-ipaddresses && whatismyip"

–jeroen

via: network – How can I release and renew my DHCP lease from Terminal? – Ask Different.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: