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.
hi,
I want to setup a home network for the purpose of internet connection and file sharing for totally three systems(2 desktops and a laptop).The internet connection is PPPOE
My friend said me that if use switch or hub the connection must be as
2 systems ---> switch or hub ---> 3rd system(gateway) ---> ethernet modem
I think in this case i need two ethernet cards at the 3rd system.How to setup IP address for the 2 ethernet cards, same or different.Plz also say me about the gateways.If i have to use squid then how i must make it to get the request for data in one NIC card and transfer it to another so that it reaches the ethernet modem.
Is it possible to make a connection like this?
3 systems --->switch or hub ---> ethernet modem
I think this one possible when using a router instead of switch or hub,but it may be too costly isn't' it?
It can be done either way. By far the easiest way is buy a router. Too expensive? This is a relative question, wireless routers are less than $100. here. I've had one for four years when they cost a lot more.
You can find help tutorials on this board if you decide to add a second ethernet card to one station, and share the connection. This is cheaper, more difficult to set up.
My router has one ethernet port to connect to the modem, four wired ports for wired ethernet connections and a wireless connection. There are lots of combinations to choose from, none are very expensive.
[QUOTE=camorri]
You can find help tutorials on this board if you decide to add a second ethernet card to one station, and share the connection. This is cheaper, more difficult to set up.
hi,
Thanks for the response .I didn't find any relevant tutorial.Plz help me to get with 2 NIC cards.
regards,
Tom.
O.K. the best I'm going to be able to help you with is the big picture. The details you are going to have to research and work through yourself, or find help with specific questions. I took the easy way, and bought a router. Still my recomendation.
On the gateway machine, you need two ethernet cards. One is connected to your DSL or Cable modem. From what youhave said, you have that and have it working.
Next install a second nic, if not already done on the gateway. The two nic's need to be on separate sub-nets. This is done with a choice of IP addresses. The sub-net connecting to the hub is best to set up as configured IP addresses, don't try to use DHCP here. You could, but it makes it even more complicated.
So, if the nic connecting to the modem is sub-net 192.168.0.xxx, then make the hub nic 192.168.1.xxx using a mask of 255.255.255.0 on both sub nets.
That is the easy part. Now for the hard part. You have to set up the gateway as a router. This is done, as far as I know with iptables.
You didn't say what distro the gateway is. If it is rpm based, use whatever package management tool you have to install iptables.
Next you will need to do some googleing. Google for iptables how-to. There are many links to look at. They will show you how to configure the gateway as a router, even a firewall if you hav't got one running. This is the tough part. No simple answers, unless you buy a router.
hi,
thanks a lot.Actually buying a router is not a problem but i am eager to improve my knowledge on both networking and linux.I felt that it will be a shame for me to fail in configuring 2 NICs, being an RHCE.It's the common setup followed here in many colleges in india.I will try everything including making gateways as a router.Thanks again.
regards,
Nirmal Tom.V
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.