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. Database Go and JSON

    在使用Go开发web项目的过程中, 数据库读写操作与JSON格式的输入输出是两块最基础的模块, Go的标准库已经帮我们做了很多, 熟悉database/sql与encoding/json这两个库能帮我 ...

  2. BZOJ 3529 数表(莫比乌斯反演)

    http://www.lydsy.com/JudgeOnline/problem.php?id=3529 思路:令F(i)为i的约数和, 1<=x<=n,1<=y<=m G(i ...

  3. TEA encryption with 128bit key

    If anyone needs some basic encryption in software, here's one solution. This TEA implementation fits ...

  4. 《Programming WPF》翻译 目录

    原文:<Programming WPF>翻译 目录 注:第1.2章我只做了笔记,没有翻译,请大家阅读时注意. 还有就是,这本书的英文版本下载:[O'Reilly] Programming ...

  5. House Robber II 解答

    Question After robbing those houses on that street, the thief has found himself a new place for his ...

  6. 关于set和map的用法

    1.set 定义:每个元素最多只出现一次,并且默认的是从小到大排序. set 遍历: 题目http://www.cnblogs.com/ZP-Better/p/4700218.html for(set ...

  7. Dynamic Flash Messages

    Dynamic Flash Messages的类似软件 - 其他jQuery插件 - 开源中国社区 Dynamic Flash Messages

  8. 【转】C++实现RTMP协议发送H.264编码及AAC编码的音视频

    RTMP(Real Time Messaging Protocol)是专门用来传输音视频数据的流媒体协议,最初由Macromedia 公司创建,后来归Adobe公司所有,是一种私有协议,主要用来联系F ...

  9. IOS 下雪动画

    #define SNOW_IMAGENAME @"snow" #define IMAGE_X arc4random()%(int)Main_Screen_Width #define ...

  10. iOS 实时监听app的网络连接状态

    实际iOS开发中,在网络通信中我们大部分使用第三方(只谈短链),譬如 AFNetworking.ASIHttpRequest(这个停更了,想必现在没多少人用),swift的 Alamofire 等. ...