View previous topic :: View next topic |
Author |
Message |
greg32 Apprentice
Joined: 26 Mar 2003 Posts: 259 Location: Australia
|
Posted: Thu May 08, 2003 9:18 pm Post subject: Networking two computers |
|
|
Hi,
could someone please walk me through the process of networking my two pc's together. They are both running Gentoo 1.4. Each pc has two network cards. On both pc's the first network card is already set up for my dsl internet connection. So they are o.k.
I want the second card on both pc's to network each other together, so that I will be able to share files, play games over the connection through winex, and maybe even be able to see one anothers desktops.
I have them networked in windows no problems at the moment, but am confused how to do it in Gentoo. They are connected using a cross over cable.
On the first computer (my main one) eth0 has an ip 10.0.0.1, and on the second computer eth0 has an ip of 10.0.0.3. These are o.k. for the dsl connection allready. I would like the second card on the first computer to have an ip of 10.0.0.3, and the second card on the second computer to have an ip 10.0.0.4.
What programs do I need to emerge to do this, and also what settings to I net to set for them to automatically connect if both are on.
thanks for any help
regards Greg |
|
Back to top |
|
|
magic Tux's lil' helper
Joined: 16 Apr 2002 Posts: 118 Location: Alameda, CA
|
Posted: Thu May 08, 2003 9:30 pm Post subject: |
|
|
Greg,
How are your two computers connected to the DSL modem? Do you have a hub/switch or is only one of them connected?
If you are using a hub/switch you dont need a second network card.
magic |
|
Back to top |
|
|
magic Tux's lil' helper
Joined: 16 Apr 2002 Posts: 118 Location: Alameda, CA
|
Posted: Thu May 08, 2003 9:38 pm Post subject: |
|
|
Greg,
Were you using network sharing in Windows? |
|
Back to top |
|
|
greg32 Apprentice
Joined: 26 Mar 2003 Posts: 259 Location: Australia
|
Posted: Fri May 09, 2003 2:24 am Post subject: |
|
|
Hi magic,
The modem is a Alcatel Speed touch pro modem/router. It has a 4 port hub in the back of it. Currently 3 of the four ports are getting used (one other computer is on the internet as well). I just connect each individual computer to the modem basically.
To give them internet access, all I have to do is tell ethx the gateway of the modem. All the rest is set up inside the modem. Each operating system uses static ip's.
In windows I was using sharing. Windows XP set it all up for me, I had to do nothing but tell it which cards to use.
Thanks for your quick replies.
regards Greg |
|
Back to top |
|
|
jlg Guru
Joined: 31 May 2002 Posts: 360 Location: Montreal, CANADA
|
Posted: Fri May 09, 2003 3:12 am Post subject: |
|
|
according to your setup you only need one nic per pc. you should already be able to ping each other without setting up the second cards. |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Fri May 09, 2003 3:33 am Post subject: |
|
|
Not to mention, I think linux would have a fit having to figure out which card to go through to get to the 10.1.1.0 network ;p Maybe not though.
As was already said, your setup doesn't require a 2nd pair of network cards. 10.1.1.1 and 10.1.1.2 should be able to ping each other just fine without actually going out through the internet and back. _________________ http://get.a.clue.de |
|
Back to top |
|
|
greg32 Apprentice
Joined: 26 Mar 2003 Posts: 259 Location: Australia
|
Posted: Fri May 09, 2003 7:03 am Post subject: |
|
|
Really? Hmm. I'm listening.
I do know one thing, which also leads me to think you are right. Once I was in Windows, playing Warcraft III on the lan as we do all the time. I had forgotton that I had disabled the nic that networked the two computers together, and we were playing away. What made me realise this, was that norton had accessed the internet during the game and things got real jerky, and game was unplayable. I had a look at what was going on, and it seemed that the game was playing through the nics connected to the internet. I don't think the game was over the internet, and it seems Windows had reconfigured itself when asked to connect to the other computer.
If I was to do this in linux, would I experience the jerkyness that I had in Windows. Exactly how do I tell linux to access both the internet, and the other pc, through the same nics??
What settings do I need to do to set up files sharing and the such?
regards Greg |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Fri May 09, 2003 8:42 am Post subject: |
|
|
Well I don't know how to explain it in user friendly terms so I'll just try to sum it up by saying: Gentoo (or your TCP/IP stack actually) will know what to do with the packets based on normal routing rules. 10.1.1.1 and 10.1.1.2 are on the same network, so it won't attempt to send it out your gateway (router).
If you're not experiencing any lag playing games over the net, then you definitely shouldn' experience jerkiness in either windows or linux playing over the lan. _________________ http://get.a.clue.de |
|
Back to top |
|
|
jlg Guru
Joined: 31 May 2002 Posts: 360 Location: Montreal, CANADA
|
Posted: Fri May 09, 2003 4:35 pm Post subject: |
|
|
Quote: |
I do know one thing, which also leads me to think you are right.
|
Don't worry we are right! This is simple networking. See the reason that 10.0.0.1 can see 10.0.0.2 is because they are on the same network.
Your router is on 2 networks. 1: The internet and 2: Your Network. Its address for your network is probably something like 10.0.0.254 which in turn is the gateway for all pc in the 10.0.0 network. It is called the gateway because it allows your personal network to communicate with the internet through the port on which the router is connected to the net. This will be an other ip address that is totaly different. An example would be 24.168.20.27
lets say you are on pc 1 with ip 10.0.0.1 and you ping www.google.com The packet will go from 10.0.0.1 to your gateway 10.0.0.254 it will then see that www.google.com is not on the 10.0.0 network and will route the request through its other ip for example 24.168.20.27
Now lets say from pc1 10.0.0.1 you ping pc2 10.0.0.2 The packet will go to the router at address 10.0.0.254 then the router sees that this is a local ip so it sends the packet straight to 10.0.0.2
make sense now? this is a quick explanation. I recommend you read the network how-to: http://www.tldp.org/HOWTO/Net-HOWTO/ |
|
Back to top |
|
|
greg32 Apprentice
Joined: 26 Mar 2003 Posts: 259 Location: Australia
|
Posted: Fri May 09, 2003 6:02 pm Post subject: |
|
|
I just did ping 10.0.0.3 from 10.0.0.1, and sure enough, it did work! JLG, that explanation should go down in history as being the most simplistic, yet bang an idiot on the head and make him understand explanation I have read so far. Also, thanks to the others who replied, as you were 'ALL RIGHT'. I will now read up on how to actually get file sharing and the such working, and if I have any more problems, I will post back for some advice.
Just one question then. Why do people have more than one nic in their machines, if it is this simple?? Obviously other than when one machine is the gw to the net, and another needs to access the net through it?
regards Greg |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Fri May 09, 2003 6:58 pm Post subject: |
|
|
I just want to make a simple correction:
Pinging 10.1.1.1 from 10.1.1.2 does _not_ go in, out or through the gateway. Think of when you have a crossover cable connecting two computers -- there's no gateway, is there? =)
Routers do what? They connect networks. If there's no reason for the packet to travel off your network, it won't.
And as an aside, though no one here has said it, the term 'default gateway' is sort of ambiguous. You can have many gateways, but in fact, the default gateway is actually the _last_ gateway that is tried. It should be called the 'gateway of last resort' as opposed to the 'default gateway.' _________________ http://get.a.clue.de |
|
Back to top |
|
|
greg32 Apprentice
Joined: 26 Mar 2003 Posts: 259 Location: Australia
|
Posted: Sat May 10, 2003 12:55 am Post subject: |
|
|
Yep, I understand now splooge. Thanks for the help.
regards |
|
Back to top |
|
|
|