Weird Output in terminal
You can read through the thread on Apple Discussion Group for details. The most important that some routers doesn't like computer names which can't be part of valid DNS name (English letters, numbers, dashes, underscores). 

To name my Mac I use something like Eir-Mac or EirMac and have no problems.