[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 ...
随机推荐
- gradle构建依赖
本地依赖 gradle 作为构建工具,能够很方便的使用本地jar包,以下为使用的代码块. dependencies { //单文件依赖 compile files('libs/android-supp ...
- JQuery easyui (1) Draggable(拖动)组件
很不习惯这种强迫式的学习,但谁叫我不是老师了,所以还是决定坚持练习,顺带为博客加点东西.虽然我还是很反感短时间内惯性的去熟悉一个工具. easyui做为一个封装了JQusey的UI插件,其实还是蛮好用 ...
- [XMPP]简易的聊天室实现[二](使用CocoaAsyncSocket)
@import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/c ...
- 1006 Do the Untwist
考察编程基础知识,用到字符和数字相互转化等.形式是描述清楚明文和暗文的转化规则. #include <stdio.h> #include <string.h> #define ...
- Node.js how to respond to an upgrade request?
You just need to call socket.write with the appropriate HTTP syntax as plain text along these lines ...
- 关于Redis的一些常识
http://blog.csdn.net/mengxianhua/article/details/8961713 关于Redis的一些常识 2013-05-22 18:00 13315人阅读 评论(0 ...
- SVD学习
前言: 上一次写了关于PCA与LDA的文章,PCA的实现一般有两种,一种是用特征值分解去实现的,一种是用奇异值分解去实现的.在上篇文章中便是基于特征值分解的一种解释.特征值和奇异值在大部分人的印象中, ...
- 转:DataTable的一些特殊用法:Select
当你从数据库里取出一些数据,然后要对数据进行整合,你很容易就会想到: 1DataTable dt = new DataTable();//假设dt是由"SELECT C1,C2,C3 FRO ...
- SQL数据转移
方法一:如果想把数据库A中的表Table1中的数据复制到数据库B中的表Table2中,也就是要预先建立Table2,可以使用一下语句: use B goinsert into Table2 selec ...
- hdu 3874 Necklace(bit树+事先对查询区间右端点排序)
Mery has a beautiful necklace. The necklace is made up of N magic balls. Each ball has a beautiful v ...