Solved

Hostname /IP address in Linux

Posted on 2014-03-03
6
380 Views
Last Modified: 2014-03-18
I have ubuntu server. The network interfaces is set up for DHCP
when I run Ifconfig, I see the interface gets IP 172.16.27.193 as shown in the screenshot
however when I run nslookup hostname, the Ip address is 172.16.27.20

I am not sure why those 2 IPs are different:
172.16.27.193 and 172.16.27.20

Thanks:

ipipip
0
Comment
Question by:jskfan
6 Comments
 

Author Comment

by:jskfan
ID: 39902203
ip
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 125 total points
ID: 39902269
DHCP and DNS are two difference services, which may or may not be linked.

In your case, your DNS is giving you incorrect information, so you need to find out more about how DNS is configured in your network and how it is controlled.
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 125 total points
ID: 39902416
What Tintin says is true. Also, your reverse lookup isn't working (in-addr.arpa).

A tip is to try and use FQDN while troubleshooting, example: ubuntu.mydomain.com unstead of just ubuntu.

A good tool when troubleshooting DNS are "dig".  And also the tool "nslookup".
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 125 total points
ID: 39902571
Check with Reverse DNS entries in your nameserver to understand why these 2 IP's are showing two different names. Whether nslookup or dig -x both will try to query to in-addr.arpa withing RDNS so i suggest below action plan.

1. Check and configure reverse dns in your network.
2. Configure your ubuntu box with that dns address in /etc/resolv.conf
3. Then try to test by using #nslookup <ip> or #dig -x <ip>

TY/SA
0
 
LVL 26

Accepted Solution

by:
skullnobrains earned 125 total points
ID: 39912179
you are asking the dns server at 172.16.27.2 to answer to a dns query for ubuntu.X where X is whatever is configured in the "search" line of your /etc/resolv.conf

if you expect dns and dhcp to be linked, you'd probably should use  single server for both. what is your dhcp software ? is it on the same host as the dns server ?

you probably should try and give a name that is a little more unique than ubuntu to your machine if you expect to debug anything
0
 

Author Closing Comment

by:jskfan
ID: 39937724
I will check it later…Thank you Guys!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
shell script or linux command to upload a directory to artifactory? 2 135
Need BIOS update Linux for MSI X99A motherboard. 4 44
linux 13 55
Linux FTP Error 5 15
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question