Bluehost.com Web Hosting $6.95

linux windows hostname problem

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 ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-07-2003
Dhruv
 
Posts: n/a
Default linux windows hostname problem

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
Reply With Quote
  #2 (permalink)  
Old 10-07-2003
James Knott
 
Posts: n/a
Default Re: linux windows hostname problem

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.
Reply With Quote
  #3 (permalink)  
Old 10-07-2003
Mairhtin O'Feannag
 
Posts: n/a
Default Re: linux windows hostname problem

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


Reply With Quote
  #4 (permalink)  
Old 10-07-2003
Mairhtin O'Feannag
 
Posts: n/a
Default Re: linux windows hostname problem

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

>
>


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0