This is a discussion on linux windows hostname problem within the Linux Networking forums, part of the Linux Forums category; Hi, I have a problem with linux computer and windows computer. My linux computer is (192.168.2.101) with ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I have a problem with linux computer and windows computer. My linux computer is (192.168.2.101) with hostname lnxserver. My windows is 192.168.2.102 with hostname windows. Now when I ping each of them via ip they work fine and can receive pings from each other. When I ping themselves as their hostnames, they work fine (for example, .102 address as windows and .101 as lnxserver), its fine. The problem lies is when I try to ping the linux computer from windows machine as (ping lnxserver), and it times out or vice versa (ping windows) from linux machine. I dont know how to resolve this because I need to get my samba working. Appreciate any help. Thanks Dhruv |
|
|||
|
Dhruv wrote:
> The problem lies is when I try to ping the linux computer from windows > machine as (ping lnxserver), and it times out or vice versa (ping > windows) from linux machine. > > I dont know how to resolve this because I need to get my samba > working. > Did you add the computers to the hosts file? -- Fundamentalism is fundamentally wrong. To reply to this message, replace everything to the left of "@" with james.knott. |
|
|||
|
You're missing a step. You need to be able to talk about lnxserver and
windows on each machine by it's "host name" which belongs in the /etc/hosts file as follows : on the linux machine : # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost localhost.localdomain localhost 192.168.2.102 windows somedomainname on the windows machine : # localhost: Needs to stay like this to work 127.0.0.1 localhost 192.168.2.101 lnxserver The format of a hosts file is : IPADDRESS MACHINENAME So, in the first example on Linux, the address 127.0.0.1 will resolve as "localhost" "localhost.localdomain" and again as "localhost". The address 192.168.2.102 will resolve as "windows" or "somedomainname". In the second example, you can extrapolate. Windows will see "lnxserver" and resolve as number 192.168.2.101 What you really need is some sort of name to address resolution system - aka DNS. If you really only ever want a small number of hosts in your network, adding them into each hosts file would suffice, but will get tedious and error-prone as you add machines. Each machine must know about the name you will be referring to each machine as. So windows must know about lnxserver, and lnxserver must know about windows. If you add a third machine - say - linux2, it must be added to lnxserver's /etc/hosts file, and to the window's machine's \winnt\system\drivers\hosts file. Hope that helps.. Mairhtin O'Feannag dmalhotr2001@yahoo.com (Dhruv) wrote in news:b6d0b0b.0310062308.6706cff4 @posting.google.com: > Hi, > > I have a problem with linux computer and windows computer. > > My linux computer is (192.168.2.101) with hostname lnxserver. > > My windows is 192.168.2.102 with hostname windows. > > Now when I ping each of them via ip they work fine and can receive > pings from each other. When I ping themselves as their hostnames, > they work fine (for example, .102 address as windows and .101 as > lnxserver), its fine. > > The problem lies is when I try to ping the linux computer from windows > machine as (ping lnxserver), and it times out or vice versa (ping > windows) from linux machine. > > I dont know how to resolve this because I need to get my samba > working. > > Appreciate any help. > > Thanks > > Dhruv |
|
|||
|
Sorry.. on that last bit of my message, the hosts file for windows is in
: \winnt\system32\drivers\etc directory. Fat fingers, don't you know! M "Mairhtin O'Feannag" <irishboyca@rocketmail.com> wrote in news:Xns940D8D646B8C8mairhtinofeannag@64.164.98.29 : > You're missing a step. You need to be able to talk about lnxserver > and windows on each machine by it's "host name" which belongs in the > /etc/hosts file as follows : > > on the linux machine : > > # Do not remove the following line, or various programs > # that require network functionality will fail. > 127.0.0.1 localhost localhost.localdomain localhost > 192.168.2.102 windows somedomainname > > on the windows machine : > > # localhost: Needs to stay like this to work > 127.0.0.1 localhost > 192.168.2.101 lnxserver > > The format of a hosts file is : IPADDRESS MACHINENAME > > So, in the first example on Linux, the address 127.0.0.1 will resolve > as "localhost" "localhost.localdomain" and again as "localhost". The > address 192.168.2.102 will resolve as "windows" or "somedomainname". > > In the second example, you can extrapolate. Windows will see > "lnxserver" and resolve as number 192.168.2.101 > > What you really need is some sort of name to address resolution system > - aka DNS. If you really only ever want a small number of hosts in > your network, adding them into each hosts file would suffice, but will > get tedious and error-prone as you add machines. > > Each machine must know about the name you will be referring to each > machine as. So windows must know about lnxserver, and lnxserver must > know about windows. > > If you add a third machine - say - linux2, it must be added to > lnxserver's /etc/hosts file, and to the window's machine's > \winnt\system\drivers\hosts file. > > Hope that helps.. > > Mairhtin O'Feannag > > > dmalhotr2001@yahoo.com (Dhruv) wrote in > news:b6d0b0b.0310062308.6706cff4 @posting.google.com: > >> Hi, >> >> I have a problem with linux computer and windows computer. >> >> My linux computer is (192.168.2.101) with hostname lnxserver. >> >> My windows is 192.168.2.102 with hostname windows. >> >> Now when I ping each of them via ip they work fine and can receive >> pings from each other. When I ping themselves as their hostnames, >> they work fine (for example, .102 address as windows and .101 as >> lnxserver), its fine. >> >> The problem lies is when I try to ping the linux computer from >> windows machine as (ping lnxserver), and it times out or vice versa >> (ping windows) from linux machine. >> >> I dont know how to resolve this because I need to get my samba >> working. >> >> Appreciate any help. >> >> Thanks >> >> Dhruv > > |