LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-14-2005, 02:10 PM   #1
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Rep: Reputation: 15
DNS configuration issue


Hi,

Another day, another question regarding linux.

I have 2 server running. One is linux based and the other one is windows server 2003 based.

Linux box is called : aps02 and adress is : 10.2.100.20
Windows box : bas02 and adress is : 10.2.100.30

From the Windows box, I can do :

ping aps02 --> perfect
ping aps02.net2.xxx --> perfect
ping 10.2.100.20 --> perfect

No problems at all there.

From the Linux box :

ping bas02
ping: unknown host bas02 --> WRONG

ping 10.2.100.30 --> perfect
ping bas02.net2.xxx --> perfect

Files from the linux configuration :

/etc/hosts

Code:
127.0.0.1       aps02.net2.irg       aps02        localhost.localdomain   localhost
/etc/resolv.conf

Code:
search xxxx.com
nameserver 10.2.100.20
Now, with the host cmd :

[root@irgaps02 log]# host bas02.net2.xxx
bas02.net2.xxx has address 10.2.100.30

Dig :

Code:
dig bas02.net2.xxx

; <<>> DiG 9.2.1 <<>> bas02.net2.xxx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21416
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;bas02.net2.xxx.             IN      A

;; ANSWER SECTION:
bas02.net2.xxx.      86400   IN      A       10.2.100.30

;; AUTHORITY SECTION:
net2.xxx.               86400   IN      NS      aps02.net2.xxx.

;; ADDITIONAL SECTION:
aps02.net2.xxx.      86400   IN      A       10.2.100.20

;; Query time: 1 msec
;; SERVER: 10.2.100.20#53(10.2.100.20)
;; WHEN: Wed Sep 14 15:06:57 2005
;; MSG SIZE  rcvd: 90

To summarize, i need to acces bas02 from my network. For some reason, bas02.net2.xxx is accessible but not bas02 ?!

Anyone can point me to a config file where I could fix that problem ?

Or is that a problem that is in my Windows box ?
 
Old 09-14-2005, 03:11 PM   #2
issinho
Member
 
Registered: Jun 2005
Location: Bosie, ID
Distribution: Fedora Core 4, Kurumin,BackTrack, Slackware 10.2, IPCop
Posts: 105

Rep: Reputation: 15
Well, you could edit the hosts file to enable the translation.

Also, looks like your network is setup with the DNS server being the Linux Box, am I correct? Check out some HowTos on setting up a Linux DNS.
 
Old 09-14-2005, 03:30 PM   #3
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Original Poster
Rep: Reputation: 15
Yep, the linux box is the DNS server.


Seem to be working now however.

edited the file hosts and added :

10.2.100.30 irgbas02.net2.irg irgbas02 localhost.localdomain localhost

restarted network service and seems to be working now.



Quote:
Well, you could edit the hosts file to enable the translation.
What would that exactly do and how could I do such a thing.
Most important part here being : What would that exactly do
 
Old 09-14-2005, 03:42 PM   #4
issinho
Member
 
Registered: Jun 2005
Location: Bosie, ID
Distribution: Fedora Core 4, Kurumin,BackTrack, Slackware 10.2, IPCop
Posts: 105

Rep: Reputation: 15
Address Translation

Well, you already edited the file and it works, right?

Why: Well, basically, your Linux box goes to that file to determine the numeric address of the name you type in. For example, If I want to go to www.linuxquestions.org, my machine first looks to the hosts file to see what that numeric address is. If it doesn't find it there, it looks to a machine that might carry that answer (the DNS). From there it continues until it is denied or cannot find a server that knows that numeric address.

Editing the hosts file is one way to cut the journey. If you wish to deny access to a certain site, you can add this line to the hosts file:

www.whatever.com 0.0.0.0

This will tell the browser that the address of whatever.com is 0.0.0.0 (not a real address so it says it cannot be found.

The hosts file was originally created at the dawn of the internet, when there were only 10 or so computers using it. So, it was easy and simple to edit. Try that today and you'll spend your life doing it. Today DNS servers take over the role of the hosts file. But you can still edit it anyway and make your resolutions faster.

That's kind of "What it does" and "why it works"
 
Old 09-14-2005, 03:49 PM   #5
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
That's kind of "What it does" and "why it works"
Thx very much for that . Those are the anwser I like most.

I dont like the "Do this and stfu" comments. I like to understand what i'm doing.

Thx again.
 
  


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
DNS issue Red Squirrel Linux - Networking 25 11-02-2004 10:21 PM
DNS issue or caching issue? AZDAVE Linux - Networking 7 10-02-2004 12:28 AM
dns issue no.3 iquadri1 Linux - Networking 0 09-29-2001 01:24 PM
dns issue no.2 iquadri1 Linux - Networking 0 09-29-2001 01:22 PM
dns issue no.1 iquadri1 Linux - Networking 0 09-29-2001 01:20 PM

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

All times are GMT -5. The time now is 04:13 PM.

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