LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux host name resolution (https://www.linuxquestions.org/questions/linux-networking-3/linux-host-name-resolution-96510/)

ja_nch 09-24-2003 07:46 PM

Linux host name resolution
 
Hi,

I just installed linux on a very nice Netvista IBM station. I have configured it as a Samba Server.

The problem I am facing is that it does not get its right IP address - name resolution.

I am setting its host name as myWorkStation.domain.corp.com
I am using DHCP for automatic configuring the networking
It automatically detects a DNS server as site.corp.com and also automatically detects some DNS secondary and 3rd addresses.

When I ping the linux box from a windows one, I receive a fully qualified name pointing to an address that does not respond.

When I review the network interface eth0 configuration from webmin, the IP address is somewhat else different from the one I receive at the first ping.

If I ping that new address it works fine, and I can access the server using that address.

It seems that the linux server is not registering itself very well against the DNS or DHCP Services.

Any help on this is very much appreciated.

THKS

JN

Looking_Lost 09-24-2003 08:13 PM

I might aswell ask but does Netvista IBM station. equate to a normal pc or some weird shit ?

ja_nch 09-24-2003 08:53 PM

It is a normal PC as well...

Looking_Lost 09-24-2003 09:06 PM

So did you set up the DNS entries yourself that resolve these computer names or are you using host files?

ja_nch 09-24-2003 09:13 PM

Well, during the installation the system asked me if I wanted to use DHCP so I select yes.

Now when it booted the first time I just went to the network configuration utility and the DNS servers were already there.

I used the etc/hosts file to define the 127.0.0.1 loop back host reference.

Looking_Lost 09-24-2003 09:21 PM

You're DNS sefvers are probably you're ISP ones which will know nothing about your computers

To make life easy

Linux:

/etc/hosts

192.168.1.10 myworkstation.corp.com (or whatever the ip address is)


same for your windows machine theres a host file in there somewhere where you can add appropriate entries.

ja_nch 09-24-2003 10:36 PM

But... the IP address is dynamic, which means that every time I reboot the machine I get a different one...

I think it would be very unconfortable for any of my corporate partners to look for a hosts file to tell their windows machine my new IP address every time...

KevinJ 09-24-2003 11:06 PM

Re: Linux host name resolution
 
Quote:

Originally posted by ja_nch
Hi,

The problem I am facing is that it does not get its right IP address - name resolution.

I am setting its host name as myWorkStation.domain.corp.com
I am using DHCP for automatic configuring the networking
It automatically detects a DNS server as site.corp.com and also automatically detects some DNS secondary and 3rd addresses.

The DNS information is coming from the DHCP server. It does not detect the DNS server on its own.

Quote:


When I ping the linux box from a windows one, I receive a fully qualified name pointing to an address that does not respond.

Elaborate. What are you pinging? "myWorkStation.domain.corp.com" ?

Quote:


When I review the network interface eth0 configuration from webmin, the IP address is somewhat else different from the one I receive at the first ping.

If I ping that new address it works fine, and I can access the server using that address.

I think I am understanding this now. You are pinging the domain name and it basically says "XXX.XXX.XXX.XXX is not responding" and that is an IP that is different from what you actually have assigned to your eth0.


Quote:


It seems that the linux server is not registering itself very well against the DNS or DHCP Services.

Are you sure your ISP allows you to dynamically update the DNS listings for you server? The vast majority of them do not and require you to pay more for a static IP address to have this capability.
Your ISP may not even be using Dynamic DNS and if they are, they may be using a Windows DNS server which will give you all sorts of problems.

It sounds like you have already purchased a fully qualified domain name. If this is for your business, I suggest you pay for a static IP address and have your ISP set up the DNS records. Even if you ever get this to work with a dynamic IP... DNS updates can sometimes take DAYS or even WEEKS. Each time your IP changes, it will not only have to be updated on YOUR name server, but that information will have to be propagated across DNS servers all across the net. Not a good business idea if you ask me.

-KevinJ

ja_nch 09-25-2003 09:10 AM

Kevin,

thanks for the interest.

In fact I am not trying to do so with Internet, but with a corporate intranet.

In fact they use Windows DNS servers.

I am just putting a samba server into such network and trying to access it from some partnes windows computers.

In good theory, I am trying to stablish a Windows shared folder into my intranet but using Linux.

Any Idea is still much appreciated.

JN

sickmusic 09-25-2003 10:55 AM

ja_nch,

i am having exactly the same problem.

when i do a: "ping machineName"
on a redhat terminal it shows the terminal pinging thru loads of 127.0.01's

wheras when i perform a "ping machineName" on a windows 2000 dos terminal it shows a different machine number altogether!!..

KevinJ 09-25-2003 02:53 PM

ja_nch,

I don't think this will work directly. I think the DHCP server is what actually updates the DNS database, and I think Microsoft has that locked down so that only clients speaking NetBIOS will get updated.

There may be a way with Samba, making your box look like a Windows box, but I still bet it will require some intervention on the DHCP and DNS server sides.

By far, the simplest thing to do, is to either get a static IP address assigned and static DNS records, or get a DHCP address reservation.

BUT... I just had an idea... If you are trying to set up a Samba server already, and your clients are simply mapping to file shares on this box, then can't they just map to the NetBIOS name? I know that Samba will update the WINS database, and also that name can be connected to via broadcast resolution.

-K

KevinJ 09-25-2003 03:41 PM

Maybe this.... in /etc/sysconfig/network-scripts/ifcfg-eth0 try setting


DHCP_HOSTNAME=myWorkStation.domain.corp.com

and then "service network restart"

-K

sidmark-2850 09-25-2003 03:49 PM

You mentioned that you are running a windows DNS server. Are you also running a Windows DHCP server as well? If you are, you should decide on an IP address for your samba server and make a reservation for it on the windows dhcp server. You can also do the same on a linux dhcp server. This will result in a host declaration. This way, the interface will receive the same address and you won't have to worry about FQDN's pointing to non-existant IP addresses. You will need to change the dns entry to match the address that you selected. Like KevinJ said, you can also look into dynamic DNS. I don't have any experience on that end. Yet.


All times are GMT -5. The time now is 07:01 PM.