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 09-02-2004, 02:20 PM   #1
Covenent
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora 2 Core
Posts: 8

Rep: Reputation: 0
Internet Connection Sharing - Windows XP Home to Fedora 2


My apologizes for posting a question that has undoubtedly been asked several times before, but I have searched and read through nearly every post I could find on the subject but with no solution to my problem.

I have a laptop with Windows XP Home installed on it (named HAL), and a PC with Fedora 2 installed on it (named QUEEG).

HAL has a wireless network connection (this is how it receives its Internet access), and a LAN connection. QUEEG only has 1 NIC card. HAL and QUEEG are connected to each other via a crossover cable, and they happily share network files thanks to Samba.

What I want know is how to share HAL's internet connection with QUEEG. I have enabled Internet Connection Sharing on HAL's LAN connection, and I have ran the Internet Configuration Wizard on QUEEG - but with no success. Both machines can ping each other by IP and name.

Here is the result of ipconfig on HAL:

Quote:
Ethernet Adapter Wireless Network Connection:
Connection Specific DNS-Suffix: Hayes
IP Address: 192.168.2.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.2.1


Ethernet Adapter Local Area Connection:
Connection Specific DNS-Suffix:
IP Address: 192.168.0.1
Subnet Mask: 255.255.255.0
Default Gateway:
I have tried manually setting the IP address of QUEEG to 192.168.0.2 and it's default gateway to 192.168.0.1 (HAL's LAN), but this didn't work. I also tried letting QUEEG obtain an IP automatically from HAL via DHCP but this didn't work either.

Has anyone any suggestions as to what I should try next? I'm faily stumped now as to what to try next, I'm not very familiar with Linux or networking I'm afraid...

Thanks for any suggestions,
 
Old 09-02-2004, 02:46 PM   #2
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
First, your setup is not normal. It's usually the linux box that shares the internet. Making a windows computer also function as a router is bad.

Are you sure the Windows computer has ip forwarding turned on? I think you need to do some registry editing: http://www.wown.com/j_helmig/w2kprout.htm

When you execute the route command on the Linux box, what does it say? (Is 192.168.0.1 the default gateway?)
 
Old 09-02-2004, 02:56 PM   #3
mermxx
Member
 
Registered: Apr 2004
Location: Wales
Distribution: rh9, winxp
Posts: 411

Rep: Reputation: 30
all u need to do is run the ics wizard on winxp and statically assign addys as u have done. then check in /etc/resolv.conf that u have entered ur gateway/dns server as ur nameserver which is the ip addy of your win xp box
for example
nameserver 192.168.0.1 (winxp assigns this addy by default as your lan ip when u run the ics wizard) if this doesn`t work then try assigning by the same method the other addy of 192.168.2.1 but I should imagine the first address will work just fine :-)
 
Old 09-02-2004, 03:03 PM   #4
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
On QUEEG run:

Code:
route add default gw 192.168.0.1 eth0
on the Windoze machine open up the command prompt (Start/Run/command) and type in:

route print

than you want to find the name of the nic that is connected to QUEEG and at the being of that line there should be a hex value (i.e. 0x1, 0x2), remember that hex value.

Now type in;
route add 198.168.0.2 < THIS COMPUTERS GATEWAY ADDRESS > if < That HEX VALUE >

Now make sure the all the nics are configured and up, you should now have your routes set and it all be working... I am not too sure if the windows route command is right, the Gateway part... But give it a try... It should work thats the only way I could see what you would put there....

Post back with results...

Andrew

---

Andrew nrd.
 
Old 09-02-2004, 04:59 PM   #5
Covenent
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora 2 Core
Posts: 8

Original Poster
Rep: Reputation: 0
bobwall:

I just turned on IP forwarding, and it doesn't seem to have made any difference.

When I run the route command on QUEEG I get the following:

Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default HAL 0.0.0.0 UG 0 0 0 eth0
So to try and answer your question.. I think the answer is yes as HAL is 192.168.0.1 ( )

mermxx:

My /etc/resolv.conf originally looked like this:

Code:
search localdomain
nameserver 127.0.0.1
I changed the IP of the name server to both of your suggestions, but neither seemed to have worked.

NLR:

Code:
route add default gw 192.168.0.1 eth0
On QUEEG results in this output:

Quote:
STOCADDRT: File exists
On the Windows machine

Code:
route print
Tells me that the hex index of the card is 0x3 (as well as telling a bunch of other stuff).

Quote:
Originally posted by NLR
On QUEEG run:
Now type in;
route add 198.168.0.2 < THIS COMPUTERS GATEWAY ADDRESS > if < That HEX VALUE >
I tried this, but I'm not exactly sure what I am meant to be inserting here (and I presume 198.168.0.2 is a typo, and that you mean 192.168.0.2). When you say < THIS COMPUTERS GATEWAY ADDRESS > do you mean the router (192.168.2.1) that my wireless card communicates with? If you do then running this:

Code:
route add 192.168.0.2 192.168.2.1 if 0x3
Results in this output:

Quote:
The route addition failed: Either the interface index is wrong or the gateway doesn't lie on the same network as the interface. Check the IP Address Table for the machine.

Thanks for the help so far guys, hopefully I can this sorted soon - you have certainly given me an angle to work with. I don't have the time now to mess around anymore, I will try again tomorrow. If you need more details on my setup please ask.

Cheers,
 
Old 09-02-2004, 05:07 PM   #6
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
Try to ping google.com by ip address instead of name on the client (find out google's ip by doing a ping on another computer). If it works, then I bet that the entry in resolv.conf is supposed to be whatever the name server HAL is using (should be your ISP's name server). Just add the entry to it and restart your network interfaces.
 
Old 09-02-2004, 05:16 PM   #7
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
Yes that was a typo... I don't know much about windows route... You could try the computers ip address... The only reason I could think of windows wants is because it wants to know what computer that computers gateway is... I don't understand why though... Try:

route add 192.168.0.2 192.168.0.1 if 0x3

Maybe....

Andrew
 
Old 09-03-2004, 03:02 PM   #8
Covenent
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora 2 Core
Posts: 8

Original Poster
Rep: Reputation: 0
bobwall

I tried pinging google by IP and name already and neither worked.

NLR

I just tried that and doesn't seemed to have worked either.


Any other suggestions - I'm stumped.
 
Old 09-03-2004, 03:14 PM   #9
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
Here is a page that you can walk though, just to verify that the ISC set up right. MAKE SURE that the windows box with ISC has the IP 168.192.0.1. This is a MUST. That may alone solve the problem.

heres the link: http://www.annoyances.org/exec/show/ics_xp

When you get that down let me know

Andrew
 
Old 09-03-2004, 06:44 PM   #10
Covenent
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora 2 Core
Posts: 8

Original Poster
Rep: Reputation: 0
Hmm how odd...

I just started up both machines and suddenly QUEEG could suddenly ping google's IP (but not name). So then I just changed the nameserver in /etc/resolv.conf to my router (192.168.2.1) and now everything works fine!

At last I can finally start using machine properly!

Thanks for the help guys, I'm not sure which solution worked in the end but one of them obviously did. I owe you one
 
Old 09-03-2004, 06:52 PM   #11
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
I suspected from the beginning that there was something wrong with your DNS setup.
 
Old 09-03-2004, 06:58 PM   #12
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
Good to here that its working!

Andrew
 
Old 11-05-2006, 06:57 PM   #13
frederick_ken
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
Hi,

My network setup is exactly identical to that of Covenent; however, I my QUEEG can only ping a certain IP addresses only after HAL pings the same address. Any ideas what's wrong?

NOTE: for simplicity sake, you can assume my my computers and default gateway's ip addresses are the same as those of Covenent's.

Many many thanks in advance!

Quote:
Originally Posted by Covenent
Hmm how odd...

I just started up both machines and suddenly QUEEG could suddenly ping google's IP (but not name). So then I just changed the nameserver in /etc/resolv.conf to my router (192.168.2.1) and now everything works fine!

At last I can finally start using machine properly!

Thanks for the help guys, I'm not sure which solution worked in the end but one of them obviously did. I owe you one
 
  


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
Sharing Internet Connection Windows <- Linux (Fedora Core 3) e6x Linux - General 7 08-03-2005 12:58 PM
sharing internet connection with windows xp melinda_sayang General 11 12-10-2004 09:51 PM
Sharing internet connection with windows Kontrau Linux - Networking 2 05-02-2004 07:10 PM
How to setup home network(sharing adsl internet connection) faidzullah Linux - Newbie 2 10-14-2003 12:19 PM
Internet Connection Sharing with a Windows PC Chryzmo Linux - Networking 22 09-26-2003 12:10 PM

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

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