LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2009, 12:34 PM   #1
hvpraveen
LQ Newbie
 
Registered: Feb 2009
Location: Bangalore
Distribution: ubuntu 8.10
Posts: 1

Rep: Reputation: 0
Problem in connecting the Laptop and Desktop's LAN and INTERNET simultaneously


Hi,

I am trying to set up simple LAN between my Laptop and Desktop PC. I have connected Laptop to INTERNET via a wireless modem though DHCP. Laptop and Desktops are connected to each other through CAT-5e cable.

So far, I am to connect INTERNET to my Laptop separately without having the connection to the Desktop. And, also I am able to communicate between Laptop and Desktop without having the INTERNET connection to Laptop. But, If I connect Laptop and Desktop and also laptop to internet, I loose the INTERNET connection from my Laptop. I can't have both the connections work simultaneously. I can't access Internet (even from Laptop) as long as Laptop and desktops are connected.

Following are the Laptop's wireless connection details:

Interface: 802.11 WiFi (wlan0)
IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0
Gate way: 192.168.1.1

For Laptop wired ethernet network, I have manually assigned following IPs.

Interface: ethernet (eth0)
IP Address: 192.168.1.3
Subnet Mask: 255.255.255.0
Gate way: 192.168.1.1

For Desktop wired ethernet network, I have manually assigned following IPs.

Interface: ethernet (eth0)
IP Address: 192.168.1.4
Subnet Mask: 255.255.255.0
Gate way: 192.168.1.1


I want to connect to Laptop and Desktop simultaneously while retaining the Internet connection. I would also like to access Internet from the Desktop via Laptop.

Could you folks please help me figure out what problem is in the above setup?

Any help from you folks are greatly appreciated.

Thanks in advance.

Regards,
Praveen

Last edited by hvpraveen; 02-26-2009 at 12:38 PM.
 
Old 02-26-2009, 01:18 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
the first problem is that you have both interfaces on the laptop in the same subnet.. you can't route data between interfaces in the same subnet

Laptop
wifi - 192.168.1.2
mask 255.255.255.0
Default gateway 192.168.1.1

eth0
192.168.2.2
mask 255.255.255.0


Desktop
eth0 - 192.168.2.3
mask 255.255.255.0
Default gateway 192.168.2.2


You need to enable ip forwarding in the laptop
http://www.ducea.com/2006/08/01/how-...ding-in-linux/

Then you need to manually add a route in your Wireless access point so that it will know that 192.168.2.0 is through the laptop



Another way would be to install firestarter and check the internet connection sharing box..
http://www.fs-security.com/docs/connection-sharing.php

Either way though you have to correct the addressing on the interfaces in your laptop as I described above.

Last edited by farslayer; 02-26-2009 at 01:19 PM.
 
  


Reply

Tags
connection, error, lan, setup, wired, wireless



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
connecting LAN to a internet sridhar_dct3 Linux - Networking 4 05-23-2007 11:14 PM
Connecting a computer to the Internet via LAN deki Linux - Networking 1 01-11-2006 12:15 AM
Problem with Linux PC connecting to Internet, but not LAN. tofu713 Linux - Networking 5 04-23-2005 11:54 AM
Problem with LAN connecting to internet. duffboygrim Linux - Networking 6 02-29-2004 04:50 PM
Problem connecting to LAN in order to get internet J_angel2000 Linux - Networking 7 02-27-2004 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:42 PM.

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