Using Lion Recovery when no DHCP service is available

Learn how to use Lion Recovery when no DHCP service is available.
This article has been archived and is no longer updated by Apple.

Lion introduces the ability to reinstall OS X via the Internet using Lion Recovery. Lion Recovery uses DHCP to obtain Internet connection information. Learn what a network administrator can do if the network does not have a DHCP server.

The command line utility networksetup can be used to configure network settings when DHCP services are not available.

Before you start, you should have the following information:

  • A valid IP address for your network that is not in use
  • The correct subnet mask
  • The correct router (gateway) address
  • One or more valid addresses on your network's DNS server

The following example configures the Mac's Ethernet port (en0) for use with IP address, subnet mask, router address, and DNS servers, and You should substitute values appropriate to your network, or use a different port if necessary.

  1. While started from the internet recovery partition, open Terminal (in the Utilities menu).
  2. Get a list of available network interfaces using this command:
    networksetup -listnetworkserviceorder
    The output will be something like this. Note: An asterisk (*) denotes that a network service is disabled.

    $ networksetup -listnetworkserviceorder
    (1) Ethernet
    (Hardware Port: Ethernet, Device: en0)

    (2) AirPort
    (Hardware Port: AirPort, Device: en1)

    (3) FireWire
    (Hardware Port: FireWire, Device: fw0)

    (4) Bluetooth DUN
    (Hardware Port: Bluetooth DUN, Device: Bluetooth-Modem)
  3. Set the IP address, subnet mask, and router. This example uses the Ethernet (en0) interface.
    networksetup -setmanual "Ethernet"
  4. Set the DNS server(s). This example uses the Ethernet (en0) interface.
    networksetup -setdnsservers "Ethernet"
  5. Execute these commands to verify the settings (change the port if needed):
    networksetup -getinfo "Ethernet" 
    networksetup -getdnsservers "Ethernet"
  6. Quit Terminal and proceed with Lion Recovery.
Published Date: