LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-09-2010, 04:44 AM   #1
silverbird
LQ Newbie
 
Registered: Jun 2008
Location: Philippines
Distribution: Slackware
Posts: 24

Rep: Reputation: 0
Home network


I know people will say I should look for answers, but I have googled many questions and still not sure what to do.

I have one pc on which I have installed slackware and samba (fixed IP, mask 255.255.255.0)

I have another PC (also XP) which also has fixed IP running XP, and I can connect that to the slackware server easily

My third PC connects to the internet and gets its IP address from the Cisco router(?) that provides the IP and mask on boot up.

I tried changing the IP and Mask on the slackware server to match the internet PC (which uses a mask 255.255.254.0) but the PC mask and IP changed on the internet PC

I want the PC that connects to the internet to also be able to connect to the slackware server, but I see no need for the slackware server to also connect to the internet - I will mainly use it as a file server

When I worked for another company I think the IT department talked about having 2 network cards in the PC that connects to the internet - I guess this would be a solution - but any guidance would help.
 
Old 08-09-2010, 08:04 AM   #2
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
There's a couple of ways you could do this, the simplest to have two interface cards in the PC that connects to the Internet. The first card would connect to the router, and would give the PC Internet access. You would then have a second network (probably built using a switch) which connected to the non-Internet card on the Internet-conected PC, and to which the other PCs were connected. Then the PCs on the Non-internet side could talk to each other on the "inner" network, and could also talk to the Internet-connected PC through its second interface. You could share the Internet connection through the Internet-connected PC, as well. The "inner" network should use a "private" (RFC1918) subnet (10.0.0.0/8 or 192.168.1.0/24 are favourites)

There is another way of doing this, using secondary addresses, but unless you are comforatble with setting up default gateways and so on, it's probably going to be harder. The only resaon to do it this second way is to save the money you would spend on additional NICs, a switch, etc.

Something to be wary of: You said "PC mask and IP changed on the internet PC"...That sounds like you have DHCP running on the router, assigning addresses to the connected PCs. If this is the case, we need a LOT more info about the precise setup to get this going. It is do-able, though.

I don't know what you were googling for, but there's a lot out there on this particular subject, try googling "internet sharing linux howto"
 
Old 08-10-2010, 04:56 AM   #3
silverbird
LQ Newbie
 
Registered: Jun 2008
Location: Philippines
Distribution: Slackware
Posts: 24

Original Poster
Rep: Reputation: 0
Thank you jimbo, I have bought an additional network card and set it to have a fixed IP address.

From the internet PC I can access the internet and ping the slackware server and even connect using ssh, but am still unable to see the folders on the server.

From another XP PC (a third one) which has fixed IP address, I can connect to slackware and the shared folders - this PC can also see the internet PC!! (So they all have the same workgroup set) So I know samba is working.

I tried closing the firewall (comodo) on the internet PC but that did not help.

I googled with your suggested text and found all kinds of tutorials that still left me puzzled. One said set the internet PC to IP address 192.168.1.0 (or something similar, - but I thought to connect to the internet you could not have a static IP address.
 
Old 08-11-2010, 03:31 AM   #4
silverbird
LQ Newbie
 
Registered: Jun 2008
Location: Philippines
Distribution: Slackware
Posts: 24

Original Poster
Rep: Reputation: 0
Update

I can access the server by entering \\192.168.1.163\home directly in the folder box. Still unable to browse the netwrok but I can use the server now.
 
Old 08-11-2010, 04:18 AM   #5
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by silverbird View Post
I googled with your suggested text and found all kinds of tutorials that still left me puzzled. One said set the internet PC to IP address 192.168.1.0 (or something similar, - but I thought to connect to the internet you could not have a static IP address.
I think that the confusion here concerns what has the fixed IP address: to have a fixed IP address to the rest of the world, your ISP has to allocate your interface (ie, your modem/router) a fixed IP. That can only happen if your ISP allocates that fixed IP and most ISPs charge extra for that (although with some, it comes 'free' on their more expensive access plans).

That does not stop a workstation from having a fixed IP, nor does it force the workstation to have a fixed IP. That is essentially a conversation between the workstation and the other interface of the router (and the other devices on the local network) and has nothing to do with how the outside world sees the router interface to the net.

You could use DHCP internally, or you could use fixed IPs. Up to you, but if you constantly have machines coming and going from your network, or have many machines, it is probably easier to use DHCP to allocate IPs for the local network.

If the configuration of your local network never varies, maybe fixed IPs is very slightly easier, particularly if you have never used DHCP before.
 
Old 08-11-2010, 09:41 AM   #6
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
Sharing connections and setting up subnets

OK, so you need to set up the clients on the "Inside" network all with addresses in the same subnet (for instance set up the Internet-connected PC as 192.168.1.1 255.255.255.0, then the others as 192.168.1.2 255.255.255.0, 192.168.1.3 255.255.255.0,192.168.1.4 255.255.255.0,etc. They all need to be connected to a switch.

The Internet connection from the router will stay connected to the same PC as it was before, its the *second* interface I'm talking about in the first paragraph

All of thePCs in the private network should have a default gateway of the Internet-connected PCs address (192.168.1.1 255.255.255.0).

Depending upon whether it's a Windoze machine connecting to the Internet or a Linux machine (you don't say), you will need to set up the machine for Internet sharing (Windoze: http://support.microsoft.com/kb/306126, or Linux http://www.fs-security.com/docs/connection-sharing.php)

See how far you can get with the information above, and if you're still stuck, post the following:

Router make/type/addresses
Is router running DHCP
PC1 Operating System, IP addresses, Masks, default gateways
PC2 Operating System, IP addresses, Masks, default gateways
PC3 Operating system, IP addresses, Masks, default gateways
network details

Good Luck
 
Old 08-13-2010, 04:10 AM   #7
silverbird
LQ Newbie
 
Registered: Jun 2008
Location: Philippines
Distribution: Slackware
Posts: 24

Original Poster
Rep: Reputation: 0
Thanks jimbo,

I don't need the other PCs to have access to the internet - so I don't need the gateway stuff, but I may try this later just to see how it works.

For the moment I have my file server working and a PC with access to the file server and the internet.

Thanks for the help
 
  


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
Network printer for small home network? Peufelon Linux - Networking 3 06-10-2008 10:56 PM
Is this a secure way to set up a home network (with network storage) ? phildacey Linux - Security 2 08-24-2006 04:25 AM
Home network setup with network firewall/router Gates1026 Linux - Networking 4 01-17-2005 08:26 PM
Home Network Similar to Work Network Boffy Linux - Networking 2 08-05-2004 06:52 PM
Newbie wanna setup up a linux network on existing home network... marvc Linux - Networking 3 03-19-2003 09:02 PM

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

All times are GMT -5. The time now is 09:34 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