How to assign Static IP via Terminal in Mountain Lion OSX?

I have formatted by Macbook Pro 13 inch (2009 Oct) running on Mountain Lion OSX. I am trying to install the OSX via Ethernet at office network but I am unable to do so due to network restrictions. Macbook Pro picks the IP automatically when connected over Ethernet.
In order to install the OSX over the same network I have to configure the Macbook to static IP (public netowork). Could you please guide me how to configure Static IP via Terminal? I mean the commands to feed in Terminal. Thanks!

First get a list of your network services:
networksetup -listallnetworkservices
Then use the desired service name in the following command:
networksetup -setmanual SERVICE IP SUBNET ROUTER
For example, by default the Wi-Fi connection will be called "Wi-Fi," so you can use the following to set it to a classic private IP address:
networksetup -setmanual Wi-Fi 192.168.1.2 255.255.255.0 192.168.1.1
To set it back to DHCP, use the following command:
networksetup -setdhcp SERVICE
To keep DHCP services but only use a manually designated IP address, then use the following command:
networksetup -setmanualwithdhcprouter SERVICE IP
You may need to preceede these commands with "sudo" (followed by a single space) to run them with administrative privileges.

Similar Messages

  • How to assign static ip via mac address on LINKSYS WRT54G2

    ? how do i assign an ip per mac address with this router? i can't seem to find the option and its becoming a real pain
    on my buffalo router i can paste a mac address and assign and ip for each mac on my network

    The feature that you are looking for is called "DHCP reservation".  This feature is not available on the WRT54G2.  Several of the newer Linksys wireless n routers support this feature.
    You can assign your computer a fixed (static) LAN IP address, however, you will need to do it manually.  Linksys has some very specific rules about assigning fixed LAN IP addresses.  Be sure to follow them carefully.
    Rules for using fixed LAN IP addresses on Linksys routers:
    With Linksys routers, a fixed (static) LAN IP addresses must be assigned in the device that is using the address. So you need to enter the fixed address in the computer or printer, not in the router.
    When using a Linksys router, any fixed LAN IP address must be outside the DHCP server range (typically 192.168.1.100 thru 192.168.1.149), and it cannot end in 0, 1, or 255.
    Therefore any fixed LAN IP address would normally need to be in the range of
    192.168.1.2 thru 192.168.1.99 or
    192.168.1.150 thru 192.168.1.254
    assuming you are still using the default DHCP server range.
    Also, in the computer, when you set up a static LAN IP address, you would need to set the "Subnet mask" to 255.255.255.0 and the "Default Gateway" to 192.168.1.1 and "DNS server" to 192.168.1.1
    It is also important that no two devices on your network be set to the same static LAN IP address.

  • How to assign static ip address to the server having solaris 10. i.e. nge0

    hi,
    how to assign static ip address to the server having solaris 10. i.e. nge0 i.e. 192.168.3.125 ipshold be persistantt across reboots. what steps do i need to follow to put all information including gateway,netmask etc..Also i want to integrate one init script ..can i integrate it using /etc/init.d/<service name> like linux. and do chkconfig on it?i am not getting complex procedure of SPF and FMRI etc..can u help me?

    Create a file in your /etc directory called hostname.nge0. Add the hostname of your system to this file. In your /etc/hosts file, assign the static IP address you want to the same hostname. You can then disable and enable the network-physical service to configure the network interface:
    svcadm disable network-physical
    svcadm enable network-physical

  • HT1338 Yesterday, I purchased Mountain Lion OSX and tried to download it but I don't think it worked.  How can I tell if I am using Mountain Lion and how do I get help if the download was unsuccessful?

    Yesterday, I purchased Mountain Lion OSX and tried to download it but I don't think the download worked.  How can I tell if I am using Mountain Lion and how do I get help if the download was unsuccessful?

    Click your Apple menu icon top left corner of your screen.
    From the drop down menu click About This Mac.
    If Mountain Lion is installed, it will say:  v10.8
    If not, launch the App Store. From the App Store menu bar click Store > Check for Unfinished Downloads
    FYI ..  for downloading Mountain Lion from the App Store, a high speed (broadband) internet connection is strongly recommended by Apple as noted here > iTUNES STORE - MAC APP STORE - TERMS AND CONDITIONS
    If you need to reinstall OS X or repair the the startup disk Mountain Lion Recovery, that requires broadband access to the internet via Wi-Fi or an Ethernet connection. OS X is downloaded over the internet form Apple when OS X Recovery is used for reinstallation.

  • How do I format an external drive with mountain lion?

    How do I format an external drive with mountain lion?

    Applications > Utilities > Disk Utility
    select the external drive in the left pane
    partition and format in the right pane

  • How can I make a bootable disk for Mountain Lion?

    How can I make a bootable disk for Mountain Lion?

    Make Your Own Mountain/Lion Installer
    1. After downloading Mountain/Lion you must first save the Install Mac OS X Mountain/Lion application. After Mountain/Lion downloads DO NOT click on the Install button. Go to your Applications folder and make a copy of the Mountain/Lion installer. Move the copy into your Downloads folder. Now you can click on the Install button. You must do this because the installer deletes itself automatically when it finishes installing.
    2. Get a USB flash drive that is at least 8 GBs. Prep this flash drive as follows:
    Open Disk Utility in your Utilities folder.
    After DU loads select your flash drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    Click on the Erase button. The format process can take up to an hour depending upon the flash drive size.
    3. Locate the saved Mountain/Lion installer in your Downloads folder. CTRL- or RIGHT-click on the installer and select Show Package Contents from the contextual menu. Double-click on the Contents folder to open it. Double-click on the SharedSupport folder. In this folder you will see a disc image named InstallESD.dmg.
    4. Plug in your freshly prepared USB flash drive. You are going to clone the content of the InstallESD.dmg disc image to the flash drive as follows:
    Double-click on the InstallESD.dmg file to mount it on your Desktop.
    Open Disk Utility.
    Select the USB flash drive from the left side list.
    Click on the Restore tab in the DU main window.
    Select the USB flash drive volume from the left side list and drag it to the Destination entry field.
    Drag the mounted disc icon from the Desktop into the Source entry field.
    Double-check you got it right, then click on the Restore button.
    When the clone is completed you have a fully bootable installer that you can use without having to re-download Mountain/Lion.
    Note: The term Mountain/Lion used above means Lion or Mountain Lion.

  • My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    Have a look here...
    what-to-do-when-your-hard-drive-is-full.html

  • How can I do a clean install of Mountain Lion?

    I have an older MacBook Pro that I'm selling. I upgraded to Mounbtain Lion, but there was not an option to do a clean install (wiping everything clean and starting fresh). I want to do this to make sure all of my data is removed before I sell it. How can I do a clean install of Mountain Lion in order to accomplish this? In the past, from DVDs, it was easy. Thanks!

    Budrew wrote:
    Sure, but I would imagine that it will be common for people to sell their Macs with upgraded OSs.
    That was only OK when you bought the Upgrade DVD and included both the original system discs and the disc you used to upgrade the OS.
    Since Apple has now gone to the Download only model of OS X you now always need to install the Original OS or an Upgraded version that you have the DVD disc for.
    If a Mac came with Leopard and you upgraded to Snow Leopard and then to Lion or Mt Lion you must remove Lion or Mt Lion and reinstall either Leopard or Snow Leopard and include all the discs for that system, Originals and the Upgrde Snow Leopard DVD.
    If your system came Snow Leopard and you installed Lion or Mt Lion thenn again you remoeve Lion or Mt Lion and reinstall Snow Leopard and include the original discs that came with the system
    If your system came with Lion and you upgraded to Mt Lion then you remove Mt Lion and reinstall Lion.
    The reason for all of that is because with the Download only OS all upgrades are TIED to YOUR Apple ID, not to the computer. So the new owner can not reinstall Lion or Mt Lion, whichever you upgraded to, without using your Apple ID.

  • I have a brand new Mac. How do I do the free upgrade to Mountain Lion?

    I have a brand new Mac. How do I do the free upgrade to Mountain Lion?

    http://www.apple.com/osx/uptodate/
    fill out the form

  • Hello,i have a retina with Mountain Lion.I have logic PRO 7 and logic Pro 8 ,with  G5.I can't use the CD with the retina!!It's not a powerpC!!How do i install Logic Studio 8 with Mountain Lion successfully ?too évolution Logic PRO 9?

    Hello,i have a retina with Mountain Lion.I have logic PRO 7 and logic Pro 8 ,with  G5.I can't use the CD with the retina!!It's not a powerpC!!How do i install Logic Studio 8 with Mountain Lion successfully ?too évolution Logic PRO 9?

    The installer for Logic Pro 8 has a bug which keeps it from operating in Lion or Mt. Lion.  Use the program Pacifist to install it.

  • How can I edit iCal server addresses in Mountain Lion? I keep getting an error with regards to my google calendar and I understand that the way to fix the problem is adjust the server address, but I cannot access it because the preferences are restrictive

    How can I edit iCal server addresses in Mountain Lion?
    I keep getting an error message with my google calendar, and I heard that if I delete the extra slash at the end of the address the problem will be fixed. But the iCal account preferences take me to system preferences > accounts every time I want to edit the account.
    Does anyone know where I can edit the server address?

    You should ask in the iCloud forum, this is for iMacs. https://discussions.apple.com/community/icloud/icloud_on_my_mac

  • HT204350 Incorrect link to "OS X: How to migrate data from another Mac using Mountain Lion and earlier"

    Incorrect link to "OS X: How to migrate data from another Mac using Mountain Lion and earlier". Should be http://support.apple.com/kb/HT6025

    I think the OP is saying OS X: How to migrate data from another Mac using Mountain Lion and earlier (which should be a link to HT4889) just links back to OS X: How to migrate data from another Mac using Mavericks (HT5872).
    It does indeed do that, & HT4889 seems to be MIA.

  • How to fix mac os x 10.8 mountain lion HDMI not working

    how to fix mac os x 10.8 mountain lion HDMI not working

    You can't install OS X on a PC. Buy a Mac and you can install Windows on it in a second partition.

  • I just upgraded to mountain lion osx and now my applications are crossed out and out of date. they will not run. how do i fix this?

    I just upgraded to mountain lion osx and now my applications are crossed out and out of date. they will not run. how do i fix this?

    Here is a recent post I assembled for a similar question:
    Unfortunately you got caught up in the minor miracle of Rosetta.  Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
    However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion).  While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
    Workarounds:
    1. If your Mac will support it, restore OS X Snow Leopard;
    2.  If your Mac will support it, partition your hard drive or add an external hard drive and install Snow Leopard into it and use the "dual-boot" method to choose between your PowerPC software or Lion/Mt. Lion;
    3.  Upgrade your software to Intel compatible versions if they are available, or find alternative software that will open, modify and save your data files;
    3.  Install Snow Leopard (with Rosetta) into Parallels:
                                  [click on images to enlarge]
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439
    NOTE:  Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization.

  • Hi, how do I create a standalone installer for Mountain Lion, ie, download once and then no more broadband required, thanks?

    Hi, how do I create a standalone installer for Mountain Lion, ie, download once and then no more broadband required, thanks?
    Context is that my other computers are not mobile and I do not have broadband worth troubling for a 4GB download - so will go to Apple Store with MacBook Pro for first download.

    The easiest way is to download the installer but do not open it.
    Next, make a copy of it and store it where it won't get lost.
    Then take one of the copies and place into the applications directory and open it to begin the installer.
    This has saved me the trouble of ever having to download the installer twice, plus you can mess around with the installer and try different options without having to worry about not having a clean install file if needed.
    Best wishes

Maybe you are looking for

  • Need help, I am waiting for XML to onLoad to be called before sending return statement

    I have created a function that is going to return an array based on some XML that I am loading. Below is a visual of what I am trying to do. I am basically looking for a way to have my function wait for the xml to be loaded before the return function

  • How to set a variable's value from job output

    Can anyone point me at documentation on how to set the value of a variable based on the output of a job? We are running TES v6.0.2.153. The Agent/Adapter is a Linux command line, so the Command could be for example: echo foo and I would like a variab

  • PI 7.1 trial version

    Hi All, Could you please tell me, from where we can download the PI 7.1 trial version? Regards Sara

  • Folders open in a new window

    Since I upgraded from Tiger to Leopard, every folder I click on opens in a new window. I have checked Finder Preferences and the "always open folders in a new window" check box is unchecked. Does anyone know how to correct this irritating problem? Th

  • Debug error

    Please help me debug this code. Thank you. /* college java class */ import containers.Input; public class college      static Student s[] =new Student[100];      static int index;      public static void initialiseObjects()           for(index=0;inde