LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Network setup problem (https://www.linuxquestions.org/questions/linux-networking-3/network-setup-problem-344899/)

Xing 07-20-2005 03:14 AM

Network setup problem
 
Dear All

i am using slackware 10.1 currently..

i am trying to set up a LAN network which can be accesed with a domain name.

i am running netconfig on slackware and putting in hostname as "xxx" domain as "net" and rest all i am providing static ip as per my network specifications. i am not using a name server.

now i am able to access my pc from other part of my network by typing "http://172.16.56.201" but when i type "http://xxx.net", the index page does not open. and this is my problem. i want that the site should be accessible by typing "http://xxx.net" in the browser.

the entries in my /etc/HOSTNAME file are "xxx.net" and the "/etc/hosts" also has the correct entry in front of the IP. i am confused what did go wrong.

my httpd server is also running. so please send some suggestions.

regards

xing

flupke 07-20-2005 03:18 AM

Try to ping xxx.net from a host on your lan to be sure the the name resolution works.
If this is OK, then the problem must come from your httpd config.
Are your virtual hosts ok?

HTH
Flupke

Xing 07-20-2005 03:33 AM

i have pinged xxx.net but no response..

i think u r right, the name resolution is not working and i am going through httpd.conf to see if i can locate anything..

please suggest if anything particular to look for in httpd.conf or any other solution..

i am not virtual.. i am just trying to setup a server on local LAN which should be accessible to anyone by typing the "http://xxx.net" in the adrress bar of browser

regards

xing

PDock 07-20-2005 05:09 AM

xxx.net is not a fully qualified domainname.. Run netconfig again using xxx then mynet.net which results in that computer being named xxx.mynet.net

flupke 07-20-2005 05:48 AM

Well... If there's no firewall blocking ICMP traffic, as long as the ping does not work you wont get anywhere.
I think the problem comes from your /etc/hosts file.

Xing 07-20-2005 08:51 AM

I have mentioned earlier that /etc/hosts seems alright.. let me put the output here

127.0.0.1 localhost
172.16.56.201 denamsro.net denamsro

and i think this is the right output...

HOSTNAME is also looking good. The entry is

denamsro.net

so what next we need to check.

remember, the 172.16.56.201 is pinging but http://denamsro.net is not

regards

xing

flupke 07-20-2005 10:17 AM

Just to be sure : you're not trying to ping http://denamsro.net, are you?
Because if you do, no wonder it does not work. You have to ping denamsro.net *without* 'http://'. It's not part of the hostname.

Another question : what do you mean by 'it does not work'? Is your browser falling in timeout, do you get a blank page, an apache error page, ... ?

Xing 07-21-2005 01:14 AM

yes, i have been pinging denamsro.net only and do not get any response. i am easily able to ping the IP address

Xing 07-21-2005 02:44 AM

i just came across more information

i ran 'hostname' and 'domainname' command on the terminal.. the response i received was 'msro' and '(none)' respectively.

it surprises me because with the netconfig tool, i have put hostname as 'denamsro' and domainname as 'net' .. HOSTNAME shows denamsro.net and hosts shows
172.16.56.201 denamsro.net denamsro

CAN THIS BE ROOT OF PROBLEM???

i have set hostname as denamsro and domainname as denamsro.net, but i was still not able to ping the denamsro.net or denamsro.denamsro.net

while doing netconfig, i did not configure nameserver so it should take default of local nameserver...

Everything is getting confusing.. ANY HELP!!!

regards

xing

flupke 07-21-2005 06:14 AM

If you can ping the ip address, then the only problem is that it can't resolv the name on the machine from which you issue the ping command.
Running netconfig, hostname, etc... on the machine denamsro will not change anything.

Indeed, your hosts file looks ok, so I think the question is : does the machine use it?

Can you make sure tha

flupke 07-21-2005 06:18 AM

If you can ping the ip address, then the only problem is that it can't resolv the name on the machine from which you issue the ping command.
Running netconfig, hostname, etc... on the machine denamsro will not change anything.

Indeed, your hosts file looks ok.
So I think the question is : does the machine use it?

When you ping, does it display the ip address or do you get really nothing?
Can you make sure that your /etc/nsswitch.conf contains the line
Code:

hosts:      files dns
?

PDock 07-21-2005 06:24 AM

One more time about fully qualified domain names. Look at your browser line; you went to 'www.linuxquestions.org'. 'www' is undoubtedly a CNAME for the actual name of one computer in the linuxquestions.net domain. You only have two of the three portions needed for a fully qualified name.

Quote:

I have mentioned earlier that /etc/hosts seems alright.. let me put the output here

127.0.0.1 localhost
172.16.56.201 denamsro.net denamsro
Wrong should read more like
Code:

127.0.0.1 localhost
172.16.56.201 denamsro.doesnotread.net denamsro

So try netconfig again replacing '.net' with 'anything.net' then ping denamsro.anything.net
I am prepared to eat crow should this fail.
ppd

Xing 07-21-2005 06:56 AM

YES FLUPKE , the IP is getting pinged but the name is not.. so we can assume that the name is not getting resolved.. i checked even my resolv.conf but it seems alright (again!!!)..
The question of whether the host file is getting used came to me as well but how can we know whether it is getting initialized at the boot time?? i could not see execution of rc.inet1 at boot time..

Pinging the Ip gets the replies from the PC i am pinging.. the response is something like this
Reply from 172.16.56.201 TTL .............

Yes, /etc/nsswitch has the line.. so no problem there as well

PDock i did as you said but result still same result.. i also rebooted my PC after doing the changes...

I think we all should, for the time being, concentrate on the fact that the IP is pinging and domain name is not .. so there is problem with the resolution of the domain name.. maybe we should look whether /etc/hosts is being read at the boot time or not.. and if not, how to ensure and verify it does..

Just to make sure, i do not think i need to configure DNS or nameserver on my PC as the default will be 172.16.56.201 only.. right??

regards

xing

Xing 07-21-2005 06:57 AM

PDock , we cannot use 'www' for the local LAN.. so it will be written as http://denamsro.anything.net in the browser and it has worked fine earlier :)

PDock 07-21-2005 07:53 AM

I was not suggesting you change denamsro to www; as a matter of fact I also said www was not the real name of the linuxquestion computer serving up web pages.
I take it now when you cat /etc/HOSTNAME ; your getting denamsro.anything.net
when you cat /etc/hosts ; your getting a line for localhost and
another: 172.16.56.201 denamsro.anything.net denamsro

Without a name server the /etc/hosts file [\windows\host] for each machine on your lan must contain a line for denamsro in order to ping by name. Actually it should contain all names on your lan.

ppd


All times are GMT -5. The time now is 07:40 AM.