Languages

Using Lion Recovery when no DHCP service is available

Learn how to use Lion Recovery when no DHCP service is available.

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 192.168.1.200, subnet mask 255.255.255.0, router address 192.168.1.1, and DNS servers 192.168.1.1, and 192.168.1.25. 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" 192.168.1.200 255.255.255.0 192.168.1.1
    
  4. Set the DNS server(s). This example uses the Ethernet (en0) interface.
    networksetup -setdnsservers "Ethernet" 192.168.1.1 192.168.1.25
    
  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.
Last Modified: May 16, 2014
Helpful?
Yes
No
  • Last Modified: May 16, 2014
  • Article: HT200168
  • RADAR: 10377481 View >
  • Views:

    6275
  • Rating:
    • 100.0

    (1 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked