# disable ip addr self-assignment



## catz (Feb 17, 2003)

Help! Is there a way to stop OS X from self assigning an ip address? 

In switching between wireless networks, instead of obtaining the ip info through dhcp, my machine seems to end up with a self-assigned 169 addr. 

I've tried to force it to dhcp with no success. Some of the methods I've tried are:
1. through the Network Prefs GUI, changing from DHCP to Manual and back to DHCP
2. through the Network Prefs GUI, using locations
3. through CLI, ipconfig set en1 DHCP
4. through CLI, SystemStarter restart Network

The only time that I can successfully obtain ip through dhcp is by reboot, booting into the correct network location setting. 

In FreeBSD, you can force the request / renewal of ip through the use of dhclient command. That does not seem to be available in Darwin. 

Is there something that I have overlooked? I switched to OS X b/c of the flexibility & stability of BSD. The last thing that I want to do is to have to reboot in order to get networking set up correctly.


----------



## Juxel (Feb 17, 2003)

Try this:

sudo ipconfig set en0 BOOTP 
sudo ipconfig set en0 DHCP 

I'm assuming you know what to enter for en0.  Let me know if that makes any different for you.

-Juxel


----------



## theed (Feb 17, 2003)

in my experience if you are set to DHCP, then your machine will not self assign unless your DHCP server fails to hand out an address.  Check the network traffic to make sure that your server is doing what you expect it to.


----------



## catz (Feb 17, 2003)

> Try this:
> 
> sudo ipconfig set en0 BOOTP
> sudo ipconfig set en0 DHCP



Nope, no luck with that at all. 



> in my experience if you are set to DHCP, then your machine will not self assign
> unless your DHCP server fails to hand out an address. Check the network traffic
> to make sure that your server is doing what you expect it to.



The DHCP server is functioning properly as other clients on the network can dhcp
 without a hitch. 

My other thought is that perhaps this is related to the AirPort Extreme card. Co
uld it be possible that it's has trouble talking to the right network when you s
witch wireless lans? So far the only fix to my problem is a reboot... and that's
 just not the right way to go about it.

Also, just now, in the middle of having an active wireless connection... the interface dropped its valid ip and self-assigned a 169. ip again. Could it be possible that I have a faulty extreme card?

Any help & inputs would be appreciated.

-Catherine


----------



## Juxel (Feb 17, 2003)

If you're feeling ambitious you could try removing the Airport Extreme Card, startup the computer while holding Option-Control-Shift, that resets the Power Management Unit which keeps track of devices in the machine.  Wait about 10 seconds, then do a normal reset and that should reset the Power Management.  Once it boots up, just turn it off, but the Airport Card back in and give it another shot.

-Juxel


----------



## catz (Feb 17, 2003)

Juxel-

Well, the problem was definitely related to not receiving the response from the DHCP server. I had enabled ipfw and did not take client-side services into consideration. The DHCP packets were dropped at the firewall. Oops! I don't know why that didn't occur to me when I was doing the troubleshooting last night. 

Thanks again. 

-Catherine


----------



## Juxel (Feb 17, 2003)

Hehe...You always have to start at the most obvious things I guess.  Seems like that's the problem a lot of the times, something very simple that is just overlooked.


----------



## miercoles (Mar 24, 2005)

How do I disable ipfw?  I'm having the same problem that catz did, but read the man page for ipfw and can't figure out how to disable it.


----------

