Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-21-2006, 12:51 AM   #1
LQ Newbie
Registered: Apr 2006
Location: New York
Distribution: Mandriva 2006
Posts: 10

Rep: Reputation: 0
network setup: connect to another computer through the router

HI there,

I have a general, even conceptual network setup question.

my apartment has 3 computers, C1, C2, C3.

C1 is XP station that connects to the internet thru the router
C2 is a linux machine that has 2 NICs. Thru one it connects to the internet thru the same router and thru the other one it connects to C3, another XP machine, ie C2 is a linux server and internet gateway for C3.

Now, is it possible for me to access C1 from my C3? If yes, how it should be set up?

Old 04-21-2006, 04:09 AM   #2
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Yes. All you have to do is use the ip address of C1 or if you have dhcp you need to use name resolution.
Old 04-21-2006, 04:10 AM   #3
Senior Member
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
net -> router -> C1_XP <router> <--> eth0 C2_linux eth1 <---> C3_XP

>>access C1 from my C3
I suppose you want to share files only

samba on C2 to see C1
nfs to then share files from C2 to C3

That is my guess (but little knowledge on this)

Must be more than 1 solution (and yes dnat as well)

I assume you do not want / cannot change cabling, NIC, router,
if not please let people know.

Internet connection sharing is another story (see post that
came at same time as mine, I suppose)

Last edited by Emmanuel_uk; 04-21-2006 at 04:13 AM.
Old 04-21-2006, 04:11 AM   #4
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Duplicate posting - damn login problems!

Last edited by TigerOC; 04-21-2006 at 04:12 AM.
Old 04-21-2006, 10:47 AM   #5
LQ Newbie
Registered: Mar 2006
Location: Sevastopol, Ukraine
Distribution: CRUX/From Scratch
Posts: 12

Rep: Reputation: 0
The most preffered way(Ethernet bridge):
Step one - IP's
choose 3 ip adresses for your c1 c2 c3 network. You must only use adresses of this range not to conflict with internet: to to to (I'm likely lying about first 2 digits - see "LAN IP's" in some manual)
You may but this in dhcp but I recommend using static IP's for this case
Step two - bridging
An ethernet bridge is somewhat an ARP/Ethernet router wich makes your PC act like a network hub. When you bridge two ethernet cards together C1 and C3 will think they are connected directly.
To bridge you must compile an "ethernet bridge" kernel module or buildin this feature into kernel.
Then you must bring up the bridge via ifconfing(see man ifconfig for details) or via some graphical configuratir if you have one, but ifconfig is versalite.
Step three - having fun
You can also make some other configurations: from 2 subnets to NATing C3 but it's stupid when having only 3 computers so I wont write 'em until you ask me

Last edited by elfy; 04-21-2006 at 11:01 AM.
Old 04-22-2006, 03:42 PM   #6
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
it should be real simple to access C1 from C3 share what you want to access on c1 then open ie on c3 and access it by typing \\ipaddressofc1\sharename so if the ip address was on c1 and you shared a folder called music access it with the address \\\music\ if you are running nat on the linux box it shouldnt make a difference C1 will just think the the linux box is requesting it, and if there is no nat it should work just as well.

Old 04-23-2006, 08:05 AM   #7
LQ Newbie
Registered: Apr 2006
Location: New York
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks guys, reading your replies, I came to realize that what I really want to do is to have access from both C3 and C1 to the shared folder on the C2 (linux machine). I have already set it up for C3 to access C2 (working fine) but could not make it work for C1 --> C2 (can't figure out what i am doing wrong).

I use

router's IP
C3 (XP goes on Linux)
C2 to connect to the router, as a gateway for C3
C1 (the one that directly connects to the router) That's where I have problems now: I am not sure what to use as IP and gateway.


Last edited by vishivishi; 04-23-2006 at 08:21 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
IS that computer connect to network so hard zhangweiwei Linux - Networking 9 07-27-2005 01:44 PM
How to setup computer a switch/router? jimdaworm Linux - Networking 11 02-28-2005 12:45 AM
Need help with how to setup a 4-5 computer wireless network... SonoranFun Linux - Wireless Networking 4 01-18-2005 09:58 PM
Home network setup with network firewall/router Gates1026 Linux - Networking 4 01-17-2005 09:26 PM
HELP! My Computer can't connect to my network Scorlibrian Linux - Wireless Networking 2 01-08-2005 06:09 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:08 PM.

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