LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2015, 06:15 AM   #1
hruday
Member
 
Registered: Jun 2015
Posts: 87

Rep: Reputation: Disabled
unable to ping server ip from client system


i have centOS server 5.8 with ip address 192.168.1.105.
now task is if i do "ping test.xyz.com" from any other system in LAN then it should reply from 192.168.1.105. how to do it.?
 
Old 06-05-2015, 06:42 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,406

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
Things to consider

research "name resolution", bind, hosts file, and possibly arp for interesting and pertinent information.

Easy answer: put that host into your local DNS. Easier answer that does not scale well: if you do not run a DNS, put it into the hosts table (/etc/host) on every client machine.
 
Old 06-05-2015, 06:46 AM   #3
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,364

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
In general, you'd need to have a DNS server running, but a minimal approach that may work for you is to just add the hostname mapping to the /etc/hosts file. Another option (if you don't want the hassle of administering a DNS server), is to consider using Avahi. This is described well here:

https://wiki.archlinux.org/index.php/Avahi

FWIW, my home DSL router happens to provide this service, making it a trivial exercise to reach machines by hostname.
 
Old 06-05-2015, 07:07 AM   #4
hruday
Member
 
Registered: Jun 2015
Posts: 87

Original Poster
Rep: Reputation: Disabled
@ferrari and @wpeckahm will u please help me out with commands. Thanks
 
Old 06-05-2015, 07:34 AM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,364

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
I would have expected you would have told us if you had a DNS running. So, assuming a small LAN with one server that you need to reach by hostname the easiest solution is to edit /etc/hosts on the client machine(s) with an entry similar to

Code:
192.168.1.105  test.xyz.com  test
For more info
Code:
man /etc/hosts
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openvpn client can ping server but can't ping viceversa Gil@LQ Linux - Networking 1 09-05-2013 05:25 PM
openvpn client can ping server, server cannot ping client psycroptic Linux - Networking 0 10-12-2012 09:42 PM
unable to ping host from OpenVPN client after port 22 denied Winanjaya Linux - Networking 1 03-29-2010 05:34 AM
[SOLVED] Linux router and client unable to ping each other felixllopart Linux - Networking 4 09-29-2009 04:39 AM
MDK 10 host unable to ping W98SE client Manasseh Linux - Networking 2 05-16-2004 01:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration