LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-08-2003, 03:35 AM   #1
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Rep: Reputation: 0
Talking Linux workstation and Windows XP Internet Share Help


Greetings,

This is the situation. I have a Red Hat 9.0 Workstation connected direct to a Windows XP Box, which is connected to the DSL Modem.

Linux eth0:
inet addr:192.168.1.2
Bcast: 192.168.1.255
Mask:255.255.255.0
Gateway: 192.168.1.1

WinXP eth0:
inet addr: 192.168.1.1
Mask: 255.255.255.0

Firewall settings on the Linux box are turned off.

I can ping from linux to winxp with no problem. "ping 192.168.1.1"
I can also access the webserver running on the winxp box by directing Mozilla to 192.168.1.1:28000.
I cannot ping from winxp to the linux box. "ping 192.168.1.2"
I cannot access the internet from the linux box, even with the IP addresses.

The route table for the linux box is:
dest:192.168.1.0 Gateway: * Genmask: 255.255.255.0 Flags: U metric: 0 Ref: 0 Use: 0 Iface: eth0
dest:169.254.0.0 Gateway: * Genmask: 255.255.0.0 Flags: U metric: 0 Ref: 0 Use: 0 Iface: eth0
dest:127.0.0.0 Gateway: * Genmask: 255.0.0.0 Flags: U metric: 0 Ref: 0 Use: 0 Iface: lo

I want to make sure both boxes can recognize each other, and then hopefully set up the resolver for URL's in linux to work ok.


thanks!
 
Old 07-08-2003, 03:56 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
on Linux
# route add -net 0.0.0.0 netmask 0.0.0.0 192.168.0.1
(I think that's right, syntax may be slightly off)

On WinXP, do you have two NICs? I think you might need to bridge the NICs together and make sure there's a route for 192.168.0.1 pointed to the interface of the second NIC. If you do (on WinXP)
> route print
it should show at the top a list of your adaptors and their hex numbers. You first NIC could be 0x1 and your second NIC 0x2 (or similar). You need to do a
> route add 192.168.0.0 mask 255.255.255.0 192.168.0.1 if 0x2 (or whatever your second NIC is)

I might be a little off on the details, but that's the general idea of what you want to do.
 
Old 07-09-2003, 04:36 AM   #3
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Original Poster
Rep: Reputation: 0
Talking

Win XP box does have two NIC's. one is 192.168.0.1 and the other, connected to the linux box, is 192.168.1.1.



Working on that right now with the add route.

on winXP: eth1 (second NIC): 192.168.1.1;

route add 192.168.0.0 mask 255.255.255.0 192.168.1.1

this has allowed the windohs box to ping the linux box. linux could still ping the windohs box!!


on linux : eth0: 192.168.1.2;

route add -net 0.0.0.0 netmask 0.0.0.0 dev eth0

this didn't do much, if anything.
 
Old 07-09-2003, 05:30 AM   #4
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Original Poster
Rep: Reputation: 0
Also got the SMB shares up... Yay! all boxes can see each other! next task is intenet sharing all LAN nic's

WinXp has two NIC's: 192.168.0.1 and 192.168.1.1

ICS on WinXP is on, but shares with 192.168.0.1, not 192.168.1.1

I am hoping that this can be fixed with the routing table settings because WinXP network settings does not allow to share Inet with more than one NIC.

Bridging didn't seem to help.

 
Old 07-09-2003, 02:58 PM   #5
d4k0t4
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
ICS in windows XP only works on the 192.168.0.xxx subnet, i hope this helps. the may have to be some weird protols installed too but I can't remember. Seach microsoft's technet on ICS in windows xp.

D4k0t4
 
Old 07-10-2003, 12:06 AM   #6
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Original Poster
Rep: Reputation: 0


I am decided on converting the Linux box to my router. That will be a task and a half 'cause I will need to learn more. It's sweet.
 
Old 07-13-2003, 06:04 AM   #7
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Original Poster
Rep: Reputation: 0
here I am, still trying to get things working.

I am still using my Win XP box as a router/ICS box.
I can see the shares on all three boxes in the LAN.
I can ping 192.168.0.4 on the Linux Box from 192.168.0.1.


From the linux box (192.168.0.4);
- I cannot ping to the internet.
- I can ping WinXP ICS box at 192.168.0.1.
- I cannot ping 192.168.0.2 (Host Unreachable), WinXP box #2.
- I can ping 192.168.0.4 from 192.168.0.4

Arg!! why can't the linux box ping to the net? It is bridged and ICS is turned on with WinXP *sigh*


 
Old 07-14-2003, 06:29 PM   #8
kierl
Member
 
Registered: Oct 2002
Location: Utah
Distribution: Gentoo(2.6.23-r3)
Posts: 181

Rep: Reputation: 30
Example config:

WinXP Box:

eth0: connects to outside network or net... this would be what your linux box can't see.
ip 192.168.0.1
mask 255.255.255.0

eth1: connects to the linux box
ip 192.168.1.1
mask 255.255.0.0 - notice that the third value is 0 a subnet mask tells your nic card which of the 4 values it can change when accessing the network. you have your secondary network(the one the linux box is on) on 192.168.1.x yet you are keeping your subnet mask at 255.255.255.0 this is preventing your nic from pinging over from 192.168.1.2 to 192.168.0.x or whatever... in my past experience( with windows and linux ) you'll have to set the mask on both the linux nic and the second win nic to 255.255.0.0 so on thi lin box your nic would look something like this:

IP:192.168.1.2
BCast:192.168.1.1
MASK:255.255.0.0
Gateway:192.168.1.1

Oh, and I'm not so sure you CAN ping the gateway's other nic... Anyways you'll still have to do all the routing stuff on the win box... probably just selecting the 2 nics and clicking on 'Bridge Connections' should be fine... But let me know if this helped... I'm not 100% sure if it will even work at all cuz I haven't really done this in a while... Actually, I'm not totally sure this even really makes sense... but give it a try and let me know...
 
Old 07-15-2003, 01:35 AM   #9
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks!!

This is what I did. I changed all NIC's to the same subnet: 192.168.*.*

I could ping 192.168.0.1 from all workstations, including linux.

The linux box eth0 was set up with the following:
IP: 192.168.0.4
Mask: 255.255.255.0
Gateway: 192.168.0.254

this allowed me to ping the WinXP NIC 192.168.0.1 but not the internet.

I have since changed the Gateway to 192.168.0.1 on the linux box and can access all workstation shares and the internet.

 
Old 07-15-2003, 01:07 PM   #10
kierl
Member
 
Registered: Oct 2002
Location: Utah
Distribution: Gentoo(2.6.23-r3)
Posts: 181

Rep: Reputation: 30
Yeah, Rock on! BTW... did my post actually help or are you saying thanks just to be polite?
 
Old 07-15-2003, 02:10 PM   #11
eternalcrow
LQ Newbie
 
Registered: Jul 2003
Location: Halifax
Distribution: Mandrake 9.2
Posts: 13

Original Poster
Rep: Reputation: 0
It Helped.

I realized my error in choice of Gateway.



192.168.0.254 is the wrong choice.

 
Old 07-15-2003, 05:21 PM   #12
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
Quote:
Originally posted by chort

On WinXP, do you have two NICs? I think you might need to bridge the NICs together and make sure there's a route for 192.168.0.1 pointed to the interface of the second NIC. If you do (on WinXP) ...
Since the original question was answered I am not going to add anything new, but regarding the quote - be aware of what bridging two interfaces, especially under WinXP, can cause. I've seen too many people in our company who got intimidating by this "excellent" feature of the WinXP and went ahead and enabled forwarding (you know forwaring is good even though you might not have a slightest clue whatsoever what it does), so by enabling forwarding on the bridged interfaces you are creating a network loop, your packets will never reach the destination since there is no spanning tree running on the interfaces, and you'll suck all the little bandwidth you have in the best case scenario.
P.S. You might know it already so you can ignore it, but if you are not familiar with it be aware of it.
 
  


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
Share Internet from Windows XP box?? general2000vn Linux - Networking 3 04-18-2005 06:58 PM
MS Password Internet Proxy + Linux workstation zakl Linux - Networking 4 10-05-2003 11:48 PM
Share internet between windows and linux over serial cable Nemlet Linux - Software 3 09-14-2003 11:20 AM
Is it possible to share a Linux printer on a workstation to W2K clients ikw38 Linux - Networking 1 06-23-2003 09:23 PM
Share an internet connection betwen a linux server and a windows client GiGA Linux - Software 4 08-21-2002 09:22 AM


All times are GMT -5. The time now is 05:51 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration