LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2013, 10:25 AM   #1
Dornith
Member
 
Registered: Jul 2012
Location: U.S.A
Distribution: Archlinux Multilib, Debian 7.0.0 32b
Posts: 153

Rep: Reputation: Disabled
Laptop doesn't recognize Desktop


I have a laptop running Ubuntu and a desktop running Arch. I'm working out a project (non-curricular) which requires getting a Java serve application to connect to a client application.

I have a test program written and running for the server, but when I try the client, I just get an UnknownHostException.

I tried pinging my desktop and it worked fine, but when I tried:
Code:
nslookup 192.168.0.49
I just got:
Code:
Server:		127.0.0.1
Address:	127.0.0.1#53

** server can't find 49.0.168.192.in-addr.arpa.: NXDOMAIN
I also tried host and got:
Code:
Host 49.0.168.192.in-addr.arpa. not found: 3(NXDOMAIN)
I really don't understand what's going on.

Also, why is it printing my ip backwards?

Edit: I managed to get the program working by using my ip address instead of my host name

Last edited by Dornith; 03-21-2013 at 11:04 AM.
 
Old 03-27-2013, 03:30 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
This is happening because this is expected; You will need to add your computers/servers/devices to your hosts file, if you do not have a local DNS server on your network. (192.168.0.49 is a class C address; you will not find a class C address in normal DNS). Here is my /etc/hosts file:
Code:
127.0.0.1       localhost.localdomain   ltp01 localhost
::1             localhost.localdomain   ltp01 localhost
As you can see, you can add more addresses and hostnames in here, and just as long as you have the devices mapped in /etc/hosts, you will then be able to resolve them fully and connect via hostname. For example:
Code:
127.0.0.1       localhost.localdomain   ltp01 localhost
::1             localhost.localdomain   ltp01 localhost
192.168.2.10    server01
192.168.2.35    iphone_dev
Now that is just an example, but I hope you understand better.

Cheers,

Josh
 
  


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
Ubuntu doesn't recognize wireless card on Grundig laptop. igonzalez Linux - Newbie 4 02-27-2011 07:38 PM
My Virtual Desktop Doesn't Recognize Any Hardware and Software. serdal Linux - Software 4 02-12-2010 11:21 PM
ubuntu doesn't recognize laptop's camera marciobarbalho Ubuntu 3 09-04-2008 09:19 AM
VL 5.9 on laptop doesn't recognize CD drive LinuxLiker VectorLinux 1 03-24-2008 06:36 PM
RH9 doesn't recognize my Toshiba v.90 internal modem on laptop joelmj Linux - Hardware 0 01-11-2004 06:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:45 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
Open Source Consulting | Domain Registration