I recently used ifconfig en1 1.2.3.4 to set the IP address of a network interface (specifically, the wireless card) on a Mac… How can I remove/unset it?

Using the graphical network configuration tool doesn't seem to change (or even be aware of) this address - when I use it to manually set an address, a second address is added to the device.

For example, right now ifconfig shows:

en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:23:xx:xx:xx:xx
inet 192.168.141.99 netmask 0xffffff00 broadcast 192.168.141.255
inet 192.168.1.112 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect
status: active

The first address - 141.99 - is the address I manually set. The second address — 1.112 — is the address assigned by my network's DHCP server.

Use delete:

ifconfig en1 delete 192.168.141.99

Sounds like you are looking to change the device en1 from 'static' to 'dhcp'. To do this perform the following:

sudo ifconfig en1 BOOTP
sudo ifconfig en1 DHCP

After making the config changes you will need to bring that interface down and back up:

sudo ifconfig en1 down
sudo ifconfig en1 up

origina:
http://apple.stackexchange.com/questions/25895/how-do-i-unset-an-ip-address-set-with-ifconfig

[Non-original]OS X How do I unset an IP address set with ifconfig?的更多相关文章

  1. [转]Debugging the Mac OS X kernel with VMware and GDB

    Source: http://ho.ax/posts/2012/02/debugging-the-mac-os-x-kernel-with-vmware-and-gdb/ Source: http:/ ...

  2. RASPBERRY PI 外设学习资源

    参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi         Get st ...

  3. RAC的QA

    RAC: Frequently Asked Questions [ID 220970.1]   修改时间 13-JAN-2011     类型 FAQ     状态 PUBLISHED   Appli ...

  4. NMAP - A Stealth Port Scanner--reference

    http://nmap.org/bennieston-tutorial/ 实例:nmap -sP 192.168.21.* Contents 1  Introduction Nmap is a fre ...

  5. f5会话保持

    B/S架构的建议选择 inset cookie :c/s架构的 建议选择 sorce ip 1.  Introduction to session persistence profiles Using ...

  6. linux作业--第三周

    1.统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来 [root@localhost ~]# cat /etc/passwd | grep ...

  7. Python标准库之os模块

    1.删除和重命名文件 import os import string def replace(file, search_for, replace_with): # replace strings in ...

  8. python基础课程_学习笔记20:标准库:有些收藏夹——os

    标准库:有些收藏夹 os os模块为您提供访问多个操作系统服务特征. os和它的子模块os.path还包含一些用于检查.构造.删除文件夹和文件的函数,以及一些处理路径的函数. os模块中一些重要函数和 ...

  9. [转]Top 10 DTrace scripts for Mac OS X

    org link: http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/ Top 10 DTra ...

随机推荐

  1. 做了一个js的拉动遮罩层,两个图片分别显示的效果

    想做成车修好了和没修好的对比,所以需要两个图片.需要用到的知识点, 1.定位 2.mouse 的事件(代码中体现) 3.鼠标指针的移动距离算法 4.css中,cursor的应用 好了,废话不多说 ,直 ...

  2. winform 读取保存配置文件

    原文连接: public static string fileName = System.IO.Path.GetFileName(Application.ExecutablePath);        ...

  3. ThinkPHP框架一

    1.1 框架的概念 框架其实就是可重用代码的集合,框架的代码是框架架构的代码,不是业务逻辑代码,框架代码保护类.方法.函数等等,框架代码按照一定的规则组合起来就形成了框架. 1.2 不使用框架开发的时 ...

  4. 用Python设计第一个游戏 - 零基础入门学习Python002

    用Python设计第一个游戏 让编程改变世界 Change the world by program 有些鱼油可能会说,哇,小甲鱼你开玩笑呐!这这这这就上游戏啦?你不打算给我们讲讲变量,分支,循环,条 ...

  5. 异常处理与调试6 - 零基础入门学习Delphi55(完)

    调试(Debug) 让编程改变世界 Change the world by program 使用调试窗口 为方便调式程序,Delphi中提供了许多调试窗口,给开发人员的调试工作带来了极大的便利. 断点 ...

  6. Google谷歌搜索引擎登录网站 - Blog透视镜

    建置好了网站之后,为了能提升流量或是增加曝光度,Mix通常会到Google谷歌,用手动登录的方式,登录网站,不久之后,搜索引擎就会派遣蜘蛛机器人,来检索你的网站,等一段时间之后,就会出现在搜索引擎内, ...

  7. Qt Quick - 开启下一代交互动效原型设计(效果很美,相关系列博文)

    http://blog.csdn.net/unixzii/article/details/46501265

  8. javascript之Arguments

    一.Arguments.callee //获取当前正在执行的函数,也就是这个函数自身,常用于获取匿名函数自身 语法:arguments.callee var factorial = function ...

  9. 文档生成工具doxygen+图像生成工具GraphViz

    文档生成工具doxygen+图像生成工具GraphViz 虽然jdk自带的javadoc也很好用,不过使用doxygen+GraphViz 的组合可以生成许多强大的图(类图.协作图.文件包含/被包含图 ...

  10. C#中Split分隔字符串的应用(C#、split、分隔、字符串)

    转载地址 .用字符串分隔: using System.Text.RegularExpressions; string str="aaajsbbbjsccc"; string[] s ...