Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick question on renewing DHCP programmatically and command line



Note that it seems the service name is localized, so it depends in which
locale you are when invoking the tool. For example, in french, you'll type
this for the "Built-in Ethernet" device:

    $ sudo networksetup -setdhcp "Ethernet intégré"

When the localized service name is found with:

    $ sudo networksetup -listallnetworkservices
    An asterisk (*) denotes that a network service is disabled.
    Ethernet intégré
    AirPort
    Modem interne
    Bluetooth
    VPN (PPTP)
    FireWire intégré
    *usbserial
    *usbserial
    *Adaptateur Ethernet (en2)
    FireWire intégré

However at a glance I don't see how to match the hardware port name with the
localized service name using this command-line tool.

HTH
Benoit


> It seems right except for the device name. It should be something like
> "Built-In Ethernet".
> sudo networksetup -setdhcp device_name [client_id]
> Where client_id is optional and specifying Empty will clear the dhcp
> client ids.
> So for example:
> sudo networksetup -setdhcp "Built-In Ethernet"
> Do not use hardware name, it the network service name, essentially the
> same as the device names visible in preferences.
> 
> Hope this helps.
> 
> Best Regards,
> Kenneth



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.