Solved

Hostname /IP address in Linux

Posted on 2014-03-03
6
384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 27

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

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.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.
Suggested Courses

734 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