[X-Unix] How to find your DHCP server...

William H. Magill magill at mcgillsociety.org
Thu Sep 16 15:59:49 PDT 2004


On 15 Sep, 2004, at 21:43, Juan Manuel Palacios wrote:
> On Sep 14, 2004, at 12:48 PM, William H. Magill wrote:
>
>> Just yesterday, I was just pointed to an interesting tool by an Apple 
>> Supportline chap ...
>>
>> ipconfig getpacket en1   [or which ever interface you are using]
>>
>> In the middle of the output will be:
>>      server_identifier (ip): 10.0.1.1
>>
>
> 	Hi William! I'd be interested in learning more about this tool, but 
> as you say it is a bummer that it's not documented and I just cannot 
> be bothered to read through the strings(1) output! For instance, my 
> box is always connected to the LAN, so I don't understand why your 
> command above is dying silently and with an error status, both through 
> sudo and without it:
>
> $[juan at PowerBook: netwib](163/0,0)-> sudo ipconfig getpacket en0
> $[juan at PowerBook: netwib](164/0,0)-> echo $?
> 1
>
> $[juan at PowerBook: netwib](165/0,0)-> ipconfig getpacket en0
> $[juan at PowerBook: netwib](166/0,0)-> echo $?
> 1

You don't need sudo, but you do need the active interface.
I happen to use airport, and "en1" not "en0" is the active interface.
(type "ifconfig" to see what's there.)

It does "fail silently," and $? will yield a "1" ... the program DID 
complete successfully, it just had nothing to say about the interface.

T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
# XP1000  [Alpha EV6]
magill at mcgillsociety.org
magill at acm.org
magill at mac.com
whmagill at gmail.com





More information about the X-Unix mailing list