Networking Forums

Networking Forums > Computer Networking > Linux Networking > can ping with number address but not with name address

Reply
Thread Tools Display Modes

can ping with number address but not with name address

 
 
Terry Liittschwager
Guest
Posts: n/a

 
      01-10-2006, 06:38 PM
Given the following setup:

router with ethernet ports 192.168.0.1

E5200 linux system 192.168.0.165 (and it's the master)

JEAN WinXP Home system 192.168.0.108

LAPTOP WinXP Pro system 192.168.0.167

From either JEAN or LAPTOP, I can successfully ping the other two machines
using their name or their 4-number address. However, from E5200 I can't
ping the other two by using their name though it works using their 4-number
address. In other words, from E5200:

ping 192.168.0.108 works

ping JEAN results in "ping: unknown host JEAN

I'm a newbie, both to Linux and to networking, and I haven't the slightest
idea where to start looking or how best to phrase a Google search. Any
suggestions will be greatly appreciated.

Terry Liittschwager
 
Reply With Quote
 
 
 
 
Steve Horsley
Guest
Posts: n/a

 
      01-10-2006, 06:57 PM
Terry Liittschwager wrote:
> Given the following setup:
>
> router with ethernet ports 192.168.0.1
>
> E5200 linux system 192.168.0.165 (and it's the master)
>
> JEAN WinXP Home system 192.168.0.108
>
> LAPTOP WinXP Pro system 192.168.0.167
>
> From either JEAN or LAPTOP, I can successfully ping the other two machines
> using their name or their 4-number address. However, from E5200 I can't
> ping the other two by using their name though it works using their 4-number
> address. In other words, from E5200:
>
> ping 192.168.0.108 works
>
> ping JEAN results in "ping: unknown host JEAN
>
> I'm a newbie, both to Linux and to networking, and I haven't the slightest
> idea where to start looking or how best to phrase a Google search. Any
> suggestions will be greatly appreciated.
>
> Terry Liittschwager


The problem is name lookup. I think the best thing to do is to
put these names in a configuration file that is especially for
storing name lookups. the file format is that each line contains
an address, then one or more names that address is known by.
Names are not case sensitive.

So add these lines to /etc/hosts:

192.168.0.108 jean
192.168.0.167 laptop

You will need root permission to edit this file.
Steve
 
Reply With Quote
 
metaltama@gmail.com
Guest
Posts: n/a

 
      01-10-2006, 09:32 PM
or if your'e pinging from the windows side, open up the file
WINDOWS\system32\drivers\etc\hosts

it should contain:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host
name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

Ok, now under "127.0.0.1 localhost", add the lines :

192.168.0.108 jean
192.168.0.167 laptop

so now the file would look like :

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host
name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
192.168.0.108 jean
192.168.0.167 laptop


Save the file and reboot windoze. it should then work.

 
Reply With Quote
 
metaltama@gmail.com
Guest
Posts: n/a

 
      01-10-2006, 09:32 PM
or if your'e pinging from the windows side, open up the file
WINDOWS\system32\drivers\etc\hosts

it should contain:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host
name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

Ok, now under "127.0.0.1 localhost", add the lines :

192.168.0.108 jean
192.168.0.167 laptop

so now the file would look like :

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host
name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
192.168.0.108 jean
192.168.0.167 laptop


Save the file and reboot windoze. it should then work.

Constant Meiring
And by the way Slackware is a decent Linux Dist. if you wanna learn
things. No point & click GUI's here.

 
Reply With Quote
 
Terry Liittschwager
Guest
Posts: n/a

 
      01-11-2006, 01:06 AM
(E-Mail Removed) wrote:

> or if your'e pinging from the windows side, open up the file
> WINDOWS\system32\drivers\etc\hosts
>
> it should contain:
>
> # Copyright (c) 1993-1999 Microsoft Corp.
> #
> # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
> #
> # This file contains the mappings of IP addresses to host names. Each
> # entry should be kept on an individual line. The IP address should
> # be placed in the first column followed by the corresponding host
> name.
> # The IP address and the host name should be separated by at least one
> # space.
> #
> # Additionally, comments (such as these) may be inserted on individual
> # lines or following the machine name denoted by a '#' symbol.
> #
> # For example:
> #
> # 102.54.94.97 rhino.acme.com # source server
> # 38.25.63.10 x.acme.com # x client host
>
> 127.0.0.1 localhost
>
> Ok, now under "127.0.0.1 localhost", add the lines :
>
> 192.168.0.108 jean
> 192.168.0.167 laptop
>
> so now the file would look like :
>
> # Copyright (c) 1993-1999 Microsoft Corp.
> #
> # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
> #
> # This file contains the mappings of IP addresses to host names. Each
> # entry should be kept on an individual line. The IP address should
> # be placed in the first column followed by the corresponding host
> name.
> # The IP address and the host name should be separated by at least one
> # space.
> #
> # Additionally, comments (such as these) may be inserted on individual
> # lines or following the machine name denoted by a '#' symbol.
> #
> # For example:
> #
> # 102.54.94.97 rhino.acme.com # source server
> # 38.25.63.10 x.acme.com # x client host
>
> 127.0.0.1 localhost
> 192.168.0.108 jean
> 192.168.0.167 laptop
>
>
> Save the file and reboot windoze. it should then work.


I see, I see, said the blind man to his deaf wife.

Thanks, guys, worked like a charm!

Terry
 
Reply With Quote
 
metaltama@gmail.com
Guest
Posts: n/a

 
      01-11-2006, 09:40 AM
cool

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simple q on IP address and port number dew Linux Networking 3 03-24-2007 12:16 PM
Domain name with one large number (not IP address) Seb Broadband 7 08-29-2006 08:52 PM
What is the 5th number in ip address Jeff Wireless Networks 6 03-16-2006 10:38 PM
Re: use your phone number for your web site address poster Broadband 1 04-28-2004 05:08 PM
Use your phone number for your web site address Admin Broadband 0 04-15-2004 10:24 PM



1 2 3 4 5 6 7 8 9 10 11