Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got a miniscule network comprised of only 2 computers. On one, I'm running W2K pro and on the other I'm dual-booting W2K Advanced Server and TurboLinux Server 6.0 with no problems as of yet. I've already set-up DHCP on the linuxbox and configured my NIC to work. Everything works fine, except that I can't ping with either computer. I always receive a REQUEST TIMED OUT message when I ping with my windows system. If i ping with linux, it shows no message until I press ctrl+c to stop the ping cycle and always receive 100% packet loss. I'm pretty positive it's not the cable because I'm always able to ping when I run W2K Server on the linuxbox and can always connect to it with the other machine. Also, since I've also set-up linux for DHCP I always receive an IP address when I log onto the windows machine.(I hope I'm not being vague, when I say my windows machine I mean my W2K pro machine; I'm dual-booting linux with W2k server). Anyway I was hoping someone can help me out with this problem. Is there something I might be missing? Also, I want to know If I absolutely need Samba to connect windows to linux for file-sharing, printer-sharing and general networking. I also need advice for windows to linux networking. Is there a how-to on this subject I can obtain somewhere?
To ping all you need is the ip addresses to be on the same network. The routing tables will be created when you set the ip address for the same network addresses.
To do this you need to know the address of the win computer. Maybe it's something like 192.168.0.1 with a netmask of 255.255.255.0 or something simular.
this means that where you have a 255 in the netmask the numbers must match to be on the same network.
so 192.168.0 is the network but it is stated like this 192.168.0.0
the last number must be different, it is the individual machine
so you can set up linux with 192.168.0.2 with a netmask of 255.255.255.0
To do that try this
ifconfig eth0 192.168.0.2 netmask 255.255.255.0
then you can ping the other computer by ping 192.168.0.1
to use names put them in the /etc/hosts file like this
The problem with doing that is that I would have to set up static IP's on both machines. I want to learn how to maintain and troubleshoot DHCP on linux so I've configured DHCP on my linux system. They are both on the same network, which is 192.168.73.0 and netmask of 255.255.255.0. The odd thing is that I always receive an IP address, but cannot ping to linux. Which brings up another question, whether relevant or not, can you put DHCP clients into /etc/hosts? And if so, how do you do it?
Thanks for your reply.
/etc/hosts is the place your system looks to resolve names to addresses. Which you apparently already know.
So putting them in there would allow you to use the name in place of the address. However you should specify the address for dhcp to assign to each client based on their hardware mac address so that the hosts file is correct.
As far as pinging the machine goes if
ping aaa.aaa.aaa.aaa does not work you have something setup wrong, must likely the default route is a problem.
aaa.aaa.aaa.aaa being the ip address of the machine you are pinging, on the same network.
If these machines are on a different network and you need to access them from one another use samba as a wins server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.