LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-29-2008, 04:24 AM   #1
anupamjamatia
LQ Newbie
 
Registered: May 2008
Posts: 24

Rep: Reputation: 15
How to share internet connection with Single LAN card shared over a switch


Hi ,
I am really having a serious problem with my office network.Here is the details of the existing setup.My VSAT is is connected to the vsat modem .The modem is connected by CAT5 cable to a switch.Frm this switch ,14 static IP address/connections are distributed.One of those 14 connections is connected to another swith.From the second switch my Fedora 7 machine is connected.Now I want to set my fedora PC as a proxy server(which is having only one integrated intel ethernet card)and want to connect other fedora/WindowsXP PCs to the switch.
The IP settings for my fedora PC is
IP address 166.26.122.9(one of the 14 IPs provided by ISP)
Subnet mask 255.255.255.0
Default Gateway 166.26.122.1
Primary DNS 232.61.89.3
Secondary DNS 232.61.89.9

Can anyone find a solution to this problem?How can I share my internet connection with other PCs on the network without installing a second Ethernet card on my Fedora PC.Please send me a step y step solution ......
Thanking you

Last edited by anupamjamatia; 05-29-2008 at 08:11 AM.
 
Old 05-29-2008, 05:49 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Set up a 'virtual' ethernet device - since you only have eth0 it will look something like this in the Debian '/etc/network/interfaces' file (obviously there are differences between distros):

auto eth0
iface eth0 inet dhcp // This line will cause dhcp to run, presumably getting an IP address from your modem

iface eth0:0 inet static // static, so we can run dhcpd on this to provide other computers with an IP number
address 192.168.10.1 // a private IP address
netmask 255.255.255.0


The only questions I have are:
1. how does your modem work? Does it connect to the ISP on its own or via PPPoE and Linux?
2. won't the modem hand out multiple IPs to other devices on the switch?

A possible problem is that all machines will send a DHCP request, so the first computer to boot up will 'own' the modem connection. One way around this is to set all the other computers to a static IP - unfortunately that means that all other network configuration will also be manual. A better way is to see if your computers have the option of only sending DHCP requests to a specific address - that way they can send requests to the Linux machine but not the modem.

On Linux, you need to:
1. set up dhcpd to server addresses via eth0:0
dhcpd setup includes handing out dynamic IPs, DNS, and (optionally) gateway addresses
2. unless you have appropriate scripts in place to refresh your DNS list and change the dhcpd configuration, you will want to run BIND9 and essentially advertise yourself as the DNS.
3. set up IP Tables to route internet-bound traffic out through eth0 and to the modem.
 
  


Reply


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
internet connection sharing with single lan card nolinuxnollife General 1 12-15-2007 06:51 AM
using switch to share internet connection jrtayloriv Linux - Networking 2 12-23-2006 07:36 PM
How can I share my Internet connection with other LAN ms windows users emiliofil Linux - Networking 1 02-21-2004 10:01 AM
LAN with static IP addresses and shared internet connection #2 Klas Linux - Networking 10 01-26-2004 10:43 AM
LAN with static IP addresses and shared internet connection Klas Mandriva 1 01-21-2004 07:14 PM

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

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