WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Cannot ping to tinycore by hostname  (Read 8900 times)

Offline bitsnbytes

  • Newbie
  • *
  • Posts: 7
Cannot ping to tinycore by hostname
« on: April 28, 2011, 03:09:40 PM »
I booted off a live cd and installed to hard drive using the instructions here . The install went through perfect and I'm able to boot via hard disc now. I also added the boot option to menu.lst to change the hostname from the default 'box'
Code: [Select]
kernel /boot/bzImage quiet host=tinycorepc

However, I cannot ping from an external system using the hostname but I can ping using the ip address :(
If I ping on the tinycore system itself it gives me the output below

Code: [Select]
ping tinycorepc
PING tinycorepc (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.074ms

The resolved ip is different to the one assigned by the dhcp server (192.168.1.32 and I ping using this ip). What do I change so I can ping via hostname, I'm sure it must be something simple, but I'm not so proficient in linux :(

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Cannot ping to tinycore by hostname
« Reply #1 on: April 28, 2011, 03:26:52 PM »
That's completely normal behavior? Windows pc's can scan each other, and some combined dns/dhcp servers add the hostname to dns, but most don't.
The only barriers that can stop you are the ones you create yourself.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Cannot ping to tinycore by hostname
« Reply #2 on: April 28, 2011, 03:27:26 PM »
You need a local name server and a dhcp server that updates it.
Your other option is to put all machines in the hosts file on each machine.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Cannot ping to tinycore by hostname
« Reply #3 on: April 28, 2011, 03:35:28 PM »
Code: [Select]
ping tinycorepc
PING tinycorepc (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.074ms

That's ping'ing a local loopback   ;)
« Last Edit: April 28, 2011, 03:37:13 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bitsnbytes

  • Newbie
  • *
  • Posts: 7
Re: Cannot ping to tinycore by hostname
« Reply #4 on: April 28, 2011, 03:37:00 PM »
So does it mean that this is not possible?  ???

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Cannot ping to tinycore by hostname
« Reply #5 on: April 28, 2011, 03:38:50 PM »
Read reply #2.

Offline bitsnbytes

  • Newbie
  • *
  • Posts: 7
Re: Cannot ping to tinycore by hostname
« Reply #6 on: April 28, 2011, 03:44:58 PM »
You need a local name server and a dhcp server that updates it.
I think the router is definitely capable of it since I can ping my local NAS server (netgear readynas which is unix) using the hostname.

Your other option is to put all machines in the hosts file on each machine.
Do you mean on the windows pc trying to ping the tinycorepc? That would be a pain since I have quite a few windows pcs :( and besides if it does work for my nas then why not for tinycore :(

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Cannot ping to tinycore by hostname
« Reply #7 on: April 28, 2011, 03:48:04 PM »
Your nameserver needs to know the name and IP of your tinycore.

Offline bitsnbytes

  • Newbie
  • *
  • Posts: 7
Re: Cannot ping to tinycore by hostname
« Reply #8 on: April 28, 2011, 03:54:05 PM »
resolv.conf reports
Code: [Select]
search lan
nameserver 192.168.1.254

192.168.1.254 is the default gateway. Is there anyway to find out the nameserver ip address? Is this different to the dhcp server?

What confuses me is that in my nas I just set the host name and it worked fine after a reboot, didn't have to do anything special to the windows pc. Is there anything I can check on the nas (to replicate settings)?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Cannot ping to tinycore by hostname
« Reply #9 on: April 28, 2011, 04:26:36 PM »
resolv.conf shows nameserver aquired by dhcp.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bitsnbytes

  • Newbie
  • *
  • Posts: 7
Re: Cannot ping to tinycore by hostname
« Reply #10 on: April 28, 2011, 04:31:36 PM »
It's getting all too confusing, best left alone I guess :(

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: Cannot ping to tinycore by hostname
« Reply #11 on: May 02, 2011, 12:18:32 AM »
Without DNS, the only way for Windows computers to find your tinycore box is to install and run nmbd and smbd (which requires Samba3.tcz).

Add (or change) the following stanzas under [global] in /usr/local/etc/samba/smb.conf:

workgroup = YourWorkgroupName
netbiosname = tinycorepc

hosts allow = 192.168.1. 192.168.2. 127. {remove the ";"}

Then run testparm and fix any errors.

Then run sudo /usr/local/etc/init.d/samba start

Your tinycore pc should now show up as part of the network on the Windows machines.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Cannot ping to tinycore by hostname
« Reply #12 on: May 02, 2011, 12:22:42 AM »
I'd have thought you would need local name resolution running to be able to ping by hostname from a windows (or a linux) box?

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: Cannot ping to tinycore by hostname
« Reply #13 on: May 02, 2011, 01:38:43 AM »
Yep, on a local peer-peer network you can use NetBios over TCP/IP for name resolution to avoid editing the hosts file on every machine as suggested in reply #2 (which is a royal PITA to maintain).


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Cannot ping to tinycore by hostname
« Reply #14 on: May 02, 2011, 01:51:04 AM »
Why not just run dnsmasq?