[Non-original]OS X How do I unset an IP address set with ifconfig?
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?的更多相关文章
- [转]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:/ ...
- RASPBERRY PI 外设学习资源
参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi Get st ...
- RAC的QA
RAC: Frequently Asked Questions [ID 220970.1] 修改时间 13-JAN-2011 类型 FAQ 状态 PUBLISHED Appli ...
- NMAP - A Stealth Port Scanner--reference
http://nmap.org/bennieston-tutorial/ 实例:nmap -sP 192.168.21.* Contents 1 Introduction Nmap is a fre ...
- f5会话保持
B/S架构的建议选择 inset cookie :c/s架构的 建议选择 sorce ip 1. Introduction to session persistence profiles Using ...
- linux作业--第三周
1.统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来 [root@localhost ~]# cat /etc/passwd | grep ...
- Python标准库之os模块
1.删除和重命名文件 import os import string def replace(file, search_for, replace_with): # replace strings in ...
- python基础课程_学习笔记20:标准库:有些收藏夹——os
标准库:有些收藏夹 os os模块为您提供访问多个操作系统服务特征. os和它的子模块os.path还包含一些用于检查.构造.删除文件夹和文件的函数,以及一些处理路径的函数. os模块中一些重要函数和 ...
- [转]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 ...
随机推荐
- [Head First Python]6. 定制数据对象:打包代码与数据
相同功能,演进实现 数据文件 sarah2.txt sarah Sweeney,2002-6-17,2:58,2.58,2:39,2-25,2-55,2:54,2.18,2:55,2:55 1- 返回 ...
- Python模块的介绍
Python模块的学习: 1.os模块: 下面只对os模块中几个比较常用的方法做一些简单的示例: os.system():这个方法在shell中体现的比较多,在dos命令行中也可以执行,下面就以在do ...
- Coins(hdu 2844 多重背包)
Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- Tempter of the Bone(dfs+奇偶剪枝)
Tempter of the Bone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Othe ...
- STM32之------独立看门狗(IWDG)和窗体看门狗(WWDG)
一 前沿废语: 之前有很风靡的游戏,名字叫<看门狗>.该游戏用了很新的引擎技术,打造出了一个辽阔庞大的世界,内容是玩家Aiden·Pearce(主角)是一名精通黑客技术的高手,当时 ...
- javascript全局对象
一.Array 二.Boolean 三.Date 四.Error 五.EvalError 六.Function 七.JSON 八.Math 九.Number 十.Object 十一.RangeErro ...
- List<T>类
List<T>类是ArrayList的泛型等效版本,两者功能相似.它实现了6个接口,实际上市对应的3对. 1.IEnumerable<T>和IEnumerable 2.ICol ...
- 关于ViewPager被嵌套在ScrollView中不显示的问题
关于ViewPager被嵌套在ScrollView中不显示的问题 进入全屏 ScrollView 嵌套ViewPager,要不是业务需求这样,估计没人愿意这么干!因为这种方式,会问题多多,简单百度一下 ...
- Combinations 解答
Question Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. F ...
- MongoDb C/java driver
1,在linux下安装客户端连接windows下 的MongoDBServer.