LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-18-2015, 10:29 AM   #1
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Rep: Reputation: Disabled
Basic networking for two computers


Hello,

This a newbie query regarding linux networking. I am well most of the part where u install and configure linux. But even after scratching my head for more than 2 months i couldn't get my way around it. I am looking for the following:
Step 1: just connect two computers with network
Step 2: add third computer to that network
Step 3: connect a wireless laptop to that network
Step 4: Share internet freely amongst the network

I tried to skim Linux networking howto but could'nt find exactly how do you connect two computers. Pardon me if i am wrong, i could not find a single example of setting up the network.

The information about concepts is clear but a simple example would do great job.

If you guys could atleast guide to a example of commands for completing the above process it would be more than helpful.

I can also skim any good books u may recommed. But please do guide me.

I am learning linux networking as hobby after comming home from work. 2 months i tried to follow the howto but to no avail. The concept is clear but how do u do exactly on ground is not clear.

Just like the way i was trying to learn gcc! i was from borland turbo c background and took me time because of not so helpful documentation to distinguish between gcc and make and between what does what. the only reason i got work for it was becasue of online website show small practical example of using gcc and make to create programs.

Thats the only bit i am asking! Show me what commands should i use. I can cram details of any linux command if i know which command to use. but without them i am just staring at void.

Being open source and free can be good. but documentation is a problem. to find a nice one you may have to search for a long time.

So my final option was to come here.

If you could enlighten i would be very gratefull.

I using debian base install as a test case.

Automatic networking is there but i want to how to network without automatic networking!! the magic commands and setting. I am sure they don't require 10's of pages to just connect two computers.

Thank u

George
 
Old 04-18-2015, 02:51 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Ok, let me try a few notes on this.

For the most part when we say network we mean tcp/ip. The basic part of that is IPv4. It requires a few things. One is support for the network interface card. Tcp/ip (tcp/ip is almost always built into a distro). An ip address, subnet mask. To access outside of that group you'd need a gateway address.

So, start with do you have a NIC and can you configure it with an ip address and subnet?


Most home users connect to a router which will automatically provide an ip, subnet mask, gateway and even a dns ip. We don't need to go that far just yet.

Last edited by jefro; 04-21-2015 at 02:55 PM.
 
Old 04-18-2015, 07:27 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
To access multiple Linux systems on a network you can install nfs (network file system). The link below gives a detailed description on installing and setting it up.
 
Old 04-18-2015, 08:40 PM   #4
thegwer
Member
 
Registered: Jan 2012
Location: San Antonio. TX
Distribution: CentOS. Ubuntu
Posts: 48

Rep: Reputation: Disabled
Just to get a better idea of what you are trying to accomplish are you wanting to create a Linux router that shares the internet to all of the computers that are at your house?


Travis
 
Old 04-18-2015, 09:10 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Here's a good basic tutorial: http://www.itworld.com/article/26934...-beginner.html

Most home networks utilize a router. You connect the computers to the router, using either wired or wireless connections, and communicate between computers via the router (a "wireless router" is simply a router that broadcasts a wireless signal and accepts wireless connections in addition to accepting wired connections).

Generally, Linux recognizes wired ethernet connections without difficulty. Wireless can be a little more complicated, depending on which wireless chipset is in the computer/wireless card. Some manufacturers of wireless equipment provide better Linux support than others.

If you want to share files--have directories that can be browsed from other computers across the network--that's a different ball of wax. You can use NFS (network file system) in a Linux only network, but, in a mixed network including Windows machines, you would need to use Samba.

As thegwer said, if you provide more information about what precisely you are trying to accomplish, it will be easier to help you.

Last edited by frankbell; 04-18-2015 at 09:12 PM.
 
Old 04-19-2015, 10:48 AM   #6
tyrolite
LQ Newbie
 
Registered: Apr 2015
Posts: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by cmgeo View Post
Hello,
Step 1: just connect two computers with network
Step 2: add third computer to that network
Step 3: connect a wireless laptop to that network
Step 4: Share internet freely amongst the network
1. The easy way is to buy a router and plug the cables into the lan ports. If you want to connect 2 computers with just one cable then you need to configure a dhcp server on one computer or manually assign IPs to each computer like this:

* Plug the cable between computer A and B

* On computer A:
Code:
# ip link set up dev eth0 # or the name of your interface
# ip addr add 192.168.0.100/24 dev eth0
* On computer B:
Code:
# ip link set up dev eth0 # or the name of your interface
# ip addr add 192.168.0.101/24 dev eth0
* From computer A ping B:
Code:
ping 192.168.0.101
Note: you can find inforamation about the interfaces with the 'ifconfig' command.

2. You need a router for this or two ethernet adapters on one of the computers.

3. You need a router with wireless support or you can turn one of the computer into a router with a wifi dongle and hostapd

4. Plug the internet cable into the WAN port of the router or configure NAT on the computer that is sharing the internet. I managed to share the internet from a 3G dongle to my devices using NAT and a wifi router; here's the blog post: https://tyrolite.wordpress.com/2015/...-raspberry-pi/

If you want a good book about networking try http://www.amazon.com/Computer-Netwo.../dp/0130661023
 
Old 04-20-2015, 11:03 AM   #7
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
Thank u all

I will followup with all your advises.

George
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking computers ? Richard14 Linux - Newbie 7 04-26-2014 12:38 PM
Basic issue: Accessing files between computers baldurpet Linux - Server 5 01-31-2009 08:16 AM
Networking Two Computers jhwatts Linux - Networking 3 09-24-2006 05:43 PM
Networking three computers srinuallada Linux - Networking 1 08-01-2002 04:31 PM
networking 2 computers Susan Linux - Networking 1 10-26-2001 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration