Sign in to follow this  
Followers 0
Mario

Linux LAN question

6 posts in this topic

First, heres my lan setup:

There is a wireless Netgear router. The router is a DHCP server and DNS server as well as the gateway to the internet. I have a Fedora Core 3 desktop computer and a laptop that dual boots XP and Mepis. There are a couple other windows computers on the network.

In Windows, as you probably know, you can ping computers by the lan IP address (usually 192.168.1.x) or by the computer name.

In Linux, I set the hostname file to the name 'LinuxLaptop'. While computers can ping the linux laptop by the IP address, they cannot ping it by the name in the hostname file. When I try to ping it, the computer just says 'hostname unknown.' or something along those lines.

Is there a way to make the linux computer with the name LinuxLaptop tell the router its name so when the other computer asks the router to resolve 'LinuxLaptop' it knows what IP address to translate it to?

On a less related notes:

- linux computers cannot ping computers running windows on the lan by the computer name.

- Is there a linux command similar to the windows command "netview"?

thanks

0

Share this post


Link to post
Share on other sites

Unless you are running your own nameserver on the LAN, the host name is only known to the local computer. You can set up the /etc/hosts file in each remote computer to associate the hostname with the IP.

0

Share this post


Link to post
Share on other sites

the windows computers cannot find the linux machine because its not running the same nameserver services (i think, correct me if im wrong) but as stated above if you set up in the linux machine the ip's (assuming they dont change) in the file /etc/hosts then from the linux machine you can ping the others by their local IP address. for reference here is a sample /etc/hosts file


IPAddress                Hostname       Alias
127.0.0.1            localhost    deep.openna.com
208.164.186.1  deep.openna.com   deep
208.164.186.2  mail.openna.com   mail
208.164.186.3  web.openna.com   web

good luck

0

Share this post


Link to post
Share on other sites
the windows computers cannot find the linux machine because its not running the same nameserver services

Ok, well you're wrong. You are both technically wrong, but on the right track. You can setup host files on each computer linking a hostname to an IP on the network. On Windows, it's in ~\system32\drivers\etc\hosts while in Linux it's /etc/hosts. You can see examples on how to set the corresponding values in the same file. Windows will check this and LMHOSTS first, before going to DNS to resolve it, and since it'll be in the hosts file, you'll have immediate resolution and your packets will be on their way. You'd be better of doing this manually on all machines and making sure it works after each entry by attemping to ping the hostname.

Edited by semen
0

Share this post


Link to post
Share on other sites

huzzah ive been corrected with an acceptable answer that wasnt a flame, thank you! :D

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0