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.
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.
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
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"
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.
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.
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.