[Non-original]OS X How do I unset an IP address set with ifconfig?
2013-12-05 15:15
357 查看
I recently used
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
The first address -
Use
Sounds like you are looking to change the device en1 from 'static' to 'dhcp'. To do this perform the following:
After making the config changes you will need to bring that interface down and back up:
[/code]
ifconfig en1 1.2.3.4to 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
ifconfigshows:
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
[/code]
相关文章推荐
- How can I get my public IP address from the command line, if I am behind a router?
- 转载---How To Set Up A USB-Over-IP Server And Client With Ubuntu 10.04
- How to set up a PXE server with REHL 7 OS
- How To Set Up A USB-Over-IP Server And Client With Ubuntu 10.04
- How to set IP address using Qt
- If application data needs to be sent to IP address xx.xx.xx.xx, how does it work in underneath network?
- How to Make an HTTP Connection Using TCP/IP with RSocket
- How to Make an HTTP Connection Using TCP/IP with RSocket
- [lua] How do I know if a table is an array?
- How do I use a host name to look up an IP address?
- Set IP address with DOS command
- How to Make an HTTP Connection Using TCP/IP with RSocket
- How to Config the Pi with a Static IP
- How to set up native subversion (javahl) with Subclipse on Mac OS X
- How to Make an HTTP Connection Using TCP/IP with RSocket
- How to set an IIS Application or AppPool to use ASP.NET 3.5 rather than 2.0
- Oracle9i新特点:SPFILE的使用--How to set events with spfile and etc
- How can I set the background of UITableView (the tableview style is "Grouped") to use an image?
- Create an IP address tracking batch tool in Windows XP Pro
- The study of Programming Windows with MFC--Ip Address control and Date control