Solved

Hostname /IP address in Linux

Posted on 2014-03-03
6
376 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now