Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ip always assigned

Hello,


I have no internet connection and it's very strange..


I can ping to 192.168.0.1 but no to, for example 8.8.8.8 (Google DNS), it says that there is no route to host. It's no internet connection because I'm using it in another PC with linux.


When I try to change the LAN ip address to a new one, every time I try with a different IP, it says that this IP is already in use.


It's like if there is another process trying to set up the en0 device at the same time when I change the local IP address.


I have installed "Server" application yesterday and I think that it has changed my hostname and localhotname. Now, when I try to change it again, it freezes for a minute or so and I see an slapdconfig -changeip command in background that is trying to access to ldap server with no luck, because if I execute it in a terminal, it says that it can't connect with ldap server.


Sorry about my english.

iMac, OS X El Capitan (10.11.4), Server version 5.1

Posted on Apr 29, 2016 12:36 PM

Reply
13 replies

Apr 29, 2016 1:59 PM in response to i-node

A

Most likely, the computer is getting a network address from a router. The address assignment ("lease") expires, and has to be renewed, after a certain amount of time, which might be one hour or one day. The lease expired without being renewed because the device was offline at the time. Meanwhile, the address was leased to another device on the network, or maybe the router hasn't updated its list of address leases. When the offline device comes back online, a conflict results. Depending on what kind of router you have, the conflict may resolve itself automatically. If not, then from the menu bar, please select

System Preferences Network

If the preference pane is locked, click the lock icon in the lower left corner and enter your password to unlock it. Then click the Advanced button and select the TCP/IP tab in the sheet that drops down. Look at the menu labeled

Configure IPv4

If the selection in that menu is

Using DHCP

click the button labeled

Renew DHCP Lease

Test.

Make sure you don't have more than one DHCP server on the network. That could happen if you have more than one Wi-Fi access point, or if you have both a router and a separate broadband device in connection-sharing mode.

B

Less likely, you have a network address that you assigned yourself, and another device is assigning itself the same address. In that case, the selection in the Configure IPv4 menu will be either Manually or Using DHCP with manual address. This kind of conflict won't be resolved automatically. You have the following options to resolve it:

  1. Change the menu selection to Using DHCP.
  2. Change the manually-assigned address to one that isn't being used by another device.
  3. Change the address of the other device.

Which of these options you should choose depends on the details of why you're using a static IP address. Any change you make to the network settings must be applied before it takes effect. To do that, click OK and then Apply.

If the router is also your broadband device, then it may be operating in bridge mode. In that case, only one client at a time will be able to connect to the Internet. Refer to the manufacturer's or ISP's documentation to find out how to reconfigure the device in connection-sharing mode.

C

According to a report a "DirectTV" receiver can cause the problem. If applicable, disconnect the device from the network, or power it off, and test. Refer to the service provider for support.

Apr 29, 2016 2:05 PM in response to Linc Davis

I have tried several ways.


1. Using static address, looking in router menu before to check if the ip address is really free. = IP address already in use.

2. Using automatic DHCP and renewing IP address. = Can't set IP address

3. Using DHCP with an static IP. = Can't set IP address

4. ifconfig en0 down && ifconfig en0 192.168.0.15 up = IP address already in use

5. Tried Wifi and Wired.


It's like ALL IP addresses are in use.


I have tried several LAN IP's, I'm pretty sure that they are free. I have no problems connecting to Internet from another linux Gentoo box.


The strange thing with the MAC is that when I try wired connection, the icon under network options is green like if the connection is ok, and I can connect to router settings, but can't ping, for example 8.8.8.8 because there are no route to host.

Apr 29, 2016 2:10 PM in response to i-node

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.

Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem.

Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.

The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

Test while in safe mode. Same problem?

After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Apr 29, 2016 2:41 PM in response to Linc Davis

Hello,


I have started in safe mode and when I plugged the ethernet cable, IP address already in use again.


Could it be due to a Server 5.1 app problem? It changed my HostName, LocalHostName and ComputerName and freezed in the middle. I used scutil to set them with another name, but I don't know if it changed any other things.

Apr 29, 2016 4:01 PM in response to Linc Davis

Ok, if I fill data in terminal, I will set up en0, but with the same data in graphical network system preferences, configuring "Ethernet" device, it does not work and tell me that IP address is already in use.


ifconfig en0 down

ifconfig en0 192.168.0.15 up

route add default 192.168.0.1


I can ping 8.8.8.8. The problem now is that it doesn't resolve DNS's.

if I use nslookup to do that this way I can resolve DNS's

nslookup www.google.es 8.8.8.8


but if I try to do a networkmanager -setdnsservers Ethernet 8.8.8.8 8.8.4.4

it seems to configure it ok, but when I do a ping www.google.es it can't resolve the domain or any other.


What's wrong with "Ethernet" interface? What's different from CLI to the graphical config, and why networkmanager -setdnsservers does not solve the problem with DNS resolver?


Thanks.

Apr 29, 2016 4:11 PM in response to i-node

1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.

The test works on OS X 10.8 ("Mountain Lion") and later. I don't recommend running it on older versions of OS X. It will do no harm, but it won't do much good either.

Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.

2. If you don't already have a current backup, please back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.

There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.

You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.

In this case, however, there are ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone who understands the code can verify what it does.

You may not be able to understand the script yourself. But variations of it have been posted on this website many times over a period of years. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message. See, for example, this discussion.

Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.

4. Here's a general summary of what you need to do, if you choose to proceed:

☞ Copy the text of a particular web page (not this one) to the Clipboard.

☞ Paste into the window of another application.

☞ Wait for the test to run. It usually takes a few minutes.

☞ Paste the results, which will have been copied automatically, back into a reply on this page.

These are not specific instructions; just an overview. The details are in parts 7 and 8 of this comment. The sequence is: copy, paste, wait, paste again. You don't need to copy a second time.

5. Try to test under conditions that reproduce the problem, as far as possible. For example, if the computer is intermittently slow, run the test during a slowdown.

You may have started up in safe mode. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual before running it. If you can only test in safe mode, do that.

6. If you have more than one user, and only one user is affected by the problem,, and the affected user is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.

7. Load this linked web page (on the website "Pastebin.") Press the key combination command-A to select all the text, then copy it to the Clipboard by pressing command-C.

8. Launch the built-in Terminal application in any one of the following ways:

☞ Enter the first few letters of its name ("Terminal") into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Click anywhere in the Terminal window to activate it. Paste from the Clipboard into the window by pressing command-V, then press return. The text you pasted should vanish immediately.

9. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. If you don't know the password, or if you prefer not to enter it, just press return three times at the password prompt. Again, the script will still run.

If the test is taking much longer than usual to run because the computer is very slow, you might be prompted for your password a second time. The authorization that you grant by entering it expires automatically after five minutes.

If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.

10. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, a series of lines will appear in the Terminal window like this:

Test started

Part 1 of 4 done at: … sec

Part 4 of 4 done at: … sec

The test results are on the Clipboard.

Please close this window.

The intervals between parts won't be exactly equal, but they give a rough indication of progress.

Wait for the final message "Please close this window" to appear—again, usually within a few minutes. If you don't see that message within about 30 minutes, the test probably won't complete in a reasonable time. In that case, press the key combination control-C or command-period to stop it. Then go to the next step. You'll have incomplete results, but still something.

In order to get results, the test must either be allowed to complete or else manually stopped as above. If you close the Terminal window while the test is still running, the partial results won't be saved.

11. When the test is complete, or if you stopped it manually, quit Terminal. The results will have been saved to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.

At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "close this window" message. Please wait for it and try again.

If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.

12. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "The message contains invalid characters." That's a bug in the software that runs this website. Please post the test results on Pastebin, then post a link here to the page you created.

If you have an account on Pastebin, please don't select Private from the Paste Exposure menu on the page, because then no one but you will be able to see it.

13. When you're done with the test, it's gone. There is nothing to uninstall or clean up.

14. This is a public forum, and others may give you advice based on the results of the test. They speak for themselves, not for me. The test itself is harmless, but whatever else you do may not be. For others who choose to run it, I don't recommend that you post the test results on this website unless I asked you to.

15. The linked UNIX shell script bears a notice of copyright. Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

Apr 29, 2016 7:21 PM in response to i-node

A

Your system has been compromised by the installation of pirated and "cracked" commercial software, as well as a bootloader ("Clover") that serves no purpose that I know of other than to pirate OS X. It's also infected with commonplace malware. The only safe way to recover is to make a fresh start.

Please back up all data to at least two different storage devices, if you haven't already done so. One backup is not enough to be safe. The backups can be made with Time Machine or with Disk Utility. Preferably both.

Erase and install OS X. This operation will destroy all data on the startup volume, so you had be better be sure of the backups. If you upgraded from an older version of OS X, you'll need the Apple ID and password that you used, so make a note of those before you begin.

When you restart, you'll be prompted to go through the initial setup process. That’s when you transfer the data from a backup.

Select only users and Computer & Network Settings in the Setup Assistant dialog—not Applications or Other files and folders. Don't transfer the Guest account, if it was enabled.

Reinstall third-party software selectively. I can only suggest general guidelines. Self-contained applications that install into the Applications folder by drag-and-drop or download from the App Store are usually safe if genuine. Anything that comes packaged as an installer or that prompts for an administrator password is suspect, and you must test thoroughly after reinstalling each such item to make sure you haven't restored the problem. I strongly recommend that you never reinstall pirated software, "security" products, "utilities," or any software that changes the user interface or the behavior of built-in applications such as Safari. If you do that, the problem is likely to recur.

Never use software downloaded from a torrent.

Before installing any software, ask yourself the question: "Am I sure I know how to uninstall this without having to wipe the volume again?" If the answer is "no," stop.

Never install any third-party software unless you know how to uninstall it.

B

Some of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock those files and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Please back up all data before proceeding.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):

sudo find ~ $TMPDIR.. -exec chflags -h nosappnd,noschg,nosunlnk,nouappnd,nouchg {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. You may be prompted to select a language, then the OS X Utilities screen will appear.

If you use FileVault 2, select Disk Utility, then select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another drive icon. Click the Unlock button in the toolbar and enter your login password when prompted. Then quit Disk Utility to be returned to the main screen.

Select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

resetp

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button.

Select

Restart

from the menu bar.

ip always assigned

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.