NonRandomImg

Gavin Duley's Weblog

Still nothing of interest

Main page
Photo Gallery
Weblog (RSS)
Interests
UK Farming Crisis
What's new?
Links
Contact me


External (open in new window)
Librarything profile
Snooth profile
Twitter (RSS)


Old posts:
May 2013 (1)
Apr 2013 (1)
Oct 2011 (6)
Sept 2011 (1)
Aug 2011 (1)
Jul 2011 (27)


Categories:
/books
/botany
/cars
/cars/oldcars
/computing
/computing/android
/computing/mac
/computing/unix
/music
/photography
/photography/cameras
/photography/experiments
/soporific
/stuffisaw
/stuffisaw/error_messages
/this_site
/travel
/travel/australia
/travel/australia/south_australia
/travel/france
/travel/france/burgundy
/travel/uk
/wildlife
/wine
/wine/oenology_diploma
/wine/vintage2011


Fri, 01 Jul 2011

Odd hostname problems

Just for the past few months, my MacBook had been assigning itself a hostname from the network. Only odd thing is, the network is is on is my home network, and wasn't set up to hand it a hostname from DHCP.

A quick search on google found that Mac OS X goes through a number of steps to automatically determine its network hostname:

  1. The name provided by the DHCP or BootP server for the primary IP address
  2. The first name returned by a reverse DNS (address-to-name) query for the primary IP address
  3. The local hostname (set in the Sharing pane of System Preferences)
  4. The name localhost
-- Mac OS X hostname determination

Only thing is, it must have been asking my ISP's DNS servers, and ended up getting an odd amalgam of the local internal IP address and my ISP's domain, eg: 192-168-1-5.tpgi.com.au

This was a similar format to the external hostname given to my router by the ISP, which is in the form of 123-456-78-90.tpgi.com.au (where 123-456-78-90 represents an imaginary IP address 123.456.78.90).

Here's what /var/log/system/log showed:

Feb 24 05:03:42 192-168-1-5 kernel[0]: sleep
Feb 24 05:03:42 pippin kernel[0]: Wake reason = USB1
Feb 24 05:03:42 pippin kernel[0]: System Wake
Feb 24 05:03:43 pippin kernel[0]: USB (UHCI):Port 2 on bus 0x1d has remote wakeup from some device
Feb 24 05:03:42 pippin configd[34]: setting hostname to "pippin.local"
Feb 24 05:03:45 pippin kernel[0]: AirPort: Link Up on en1
Feb 24 05:03:47 192-168-1-5 configd[34]: setting hostname to "192-168-1-5.tpgi.com.au"
Feb 24 05:03:47 192-168-1-5 mDNSResponder[22]: NOTE: Wide-Area Service Discovery \
                disabled to avoid crashing defective DNS relay 192.168.1.1:53
Feb 24 05:03:49 192-168-1-5 mDNSResponder[22]: Note: Frequent transitions for  \
                interface en1 (192.168.1.5); network traffic reduction measures in effect
Feb 24 05:03:51 192-168-1-5 Mail[215]: Type selection took over 1.000 seconds. Stopping early....
(some line-wrapping added by me)

Obviously, as far as problems go, this was a very minor one. But odd, too -- it really shouldn't have been trying to get a hostname off my ISP, given that the network is behind a NAT firewalled router/"modem". Also, this address was a figment of the computer's imagination: attempting to ping it from within the network failed.

There were a number of suggestions as to how you could force Mac OS X to use a static hostname, but most of these seem to come with a warning as to why you shouldn't do that. In the end, since I am, err, "network administrator" of my home network I just gave myself a static IP address on the router, and told it to give that IP address the hostname I wanted.

This seemed to work:

Feb 25 00:04:04 192-168-1-5 kernel[0]: AirPort: Link Down on en1
Feb 25 00:04:07 pippin configd[34]: setting hostname to "pippin.local"
Feb 25 00:04:21 pippin airportd[3594]: Error: Power unexpectedly off, bailing  - Apple80211GetPower() = off (0)
Feb 25 00:04:21 pippin airportd[3594]: Could not find any preferred networks; trying broadcast requests..
Feb 25 00:04:21 pippin airportd[3594]: Error: Apple80211Scan() error 82
Feb 25 00:04:21 pippin airportd[3594]: Error: __performScan() failed (82)
Feb 25 00:04:22 pippin airportd[3594]: Error: Power unexpectedly off, bailing  - Apple80211GetPower() = off (0)
Feb 25 00:04:27 pippin login[3573]: DEAD_PROCESS: 3573 ttys001
Feb 25 00:04:41 pippin PubSubAgent[3593]: AgentTask: Daily Tasks took 6756 msec
Feb 25 00:05:07 pippin ntpd[14]: sendto(17.72.255.11) (fd=23): No route to host
Feb 25 00:05:18 pippin login[3603]: USER_PROCESS: 3603 ttys001
Feb 25 00:06:00 pippin kernel[0]: AirPort: Link Up on en1
Feb 25 00:06:07 pippin configd[34]: setting hostname to "pippin.home"
Feb 25 00:06:08 pippin mDNSResponder[22]: NOTE: Wide-Area Service Discovery disabled to avoid crashing \
                defective DNS relay 192.168.1.1:53
Feb 25 00:06:12 pippin ntpd[14]: sendto(17.72.255.11) (fd=23): Network is unreachable
Feb 25 00:06:42 pippin login[3623]: USER_PROCESS: 3623 ttys002

I just wonder what exactly it is that it is complaining about with "Wide-Area Service Discovery disabled to avoid crashing defective DNS relay 192.168.1.1:53"...

posted at: 01:50 | path: /computing/mac | permanent link to this entry

RSS Feed


Copyright (c) Gavin Duley 2007 onwards