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.
Hi,
i'd just like to connect 2 PCs via an ethernet cable (patch) and ping each other. I have 2 PCs running Sarge. I have edited the /etc/network/interfaces in both of them and added entries for the connected NICs. The IPs for the interfaces are of the same network (10.0.0.9 and 10.0.0.10 from 255.255.255.0). I have just added in the /etc/network/interfaces the IP and the netmask. Then i do /etc/init.d/networking restart, but when i try to ping i get "destination host unreachable". What do i miss?
Thanks hockeyman_102,
i am trying with other UTPs too. However, it must be a routing problem/conflict. In one of the PCs, i have an NIC, which is connected on my ADSL router and has an address from the same IP range. I am not experienced with networking, but i suspect this is the main problem.
So, basically, you have one Linux box with 2 NICs (one for your internet connection and one between your 2 boxes) and the other box is just connected to the first.
To be able to connect to internet from the 2nd box, you'll need to configure your first box to act as a kind of gateway. It must allow packets between the internet and the 2nd box to pass.
There's a specific iptables rule for this, that I've seen on the LQ forums a few times already. Search and you'll find...
"ping" should work, unless your boxes are blocking the ICMP protocol (unlikely).
Did you "ping" based on IP address or to a hostname? In the latter case, the problem may be name resolution (/etc/resolv.conf or /etc/hosts settings).
Also, do you have set your internet-connected box as default gateway on your 2nd box?
If you still can't get it to work, maybe posting some stuff like the output of ifconfig (on all network interfaces)
for starters.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.