Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hostname /IP address in Linux

Posted on 2014-03-03
6
Medium Priority
?
390 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 500 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 500 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
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 500 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 500 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

664 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