LinuxQuestions.org
Visit Jeremy's Blog.
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 08-22-2004, 11:54 AM   #1
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Rep: Reputation: 30
Network connection sharing XP+Linux


Hi there, i have a Mandrake 10.0 connected to a cable modem via eth0 and a winXP machine connected to it via a network card (eth1) and a cross over-cable. My question simply for the moement is how i can get my XP machine to share the connection on my Linux machine. I have run MCC>Network&Internet>Internet connection sharing and run the wizard. I downloaded things called "Squid" and another program. It finished saying that the connection was ready to be shared. Unfortunately my XP machine still cant connect.

IS there anything i should be doing that i'm missing?

please forgive me for posting what is a common question but all the ones i've seen seem to have a different individual requiremtn to mine... hence i started a new thread

Last edited by Maverick1182; 08-22-2004 at 12:05 PM.
 
Old 08-23-2004, 05:23 PM   #2
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Post the output of
ifconfig
route -n

and from your xp
ipconfig /all
 
Old 08-24-2004, 04:42 AM   #3
freeborn
LQ Newbie
 
Registered: Aug 2004
Location: Everett, WA
Distribution: Fedora Core 3
Posts: 15

Rep: Reputation: 0
you'd better use ip masquerading instead of using proxy (squid). this is what i use in my network. here is a good howto:
http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/
 
Old 08-26-2004, 08:59 AM   #4
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Original Poster
Rep: Reputation: 30
this is the result of ifconfig:

eth0 Link encap:Ethernet HWaddr 00:0D:87:37:8DD
inet addr:82.43.91.135 Bcast:255.255.255.255 Mask:255.255.248.0
inet6 addr: fe80::20d:87ff:fe37:8ddd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16916 errors:0 dropped:0 overruns:0 frame:0
TX packets:1337 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1374129 (1.3 Mb) TX bytes:134932 (131.7 Kb)
Interrupt:5 Base address:0xd400

eth1 Link encap:Ethernet HWaddr 00:10:5A:C5:A4:CB
inet6 addr: fe80::210:5aff:fec5:a4cb/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:5
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:378 (378.0 b)
Interrupt:10 Base address:0xd000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:152 errors:0 dropped:0 overruns:0 frame:0
TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9878 (9.6 Kb) TX bytes:9878 (9.6 Kb)


and route -n:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
82.43.88.0 0.0.0.0 255.255.248.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 82.43.88.1 0.0.0.0 UG 0 0 0 eth0


my xp machine says the follwoing for ipconfig /all:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : homecomp
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Mixed
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection 4:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethe
rnet NIC #3
Physical Address. . . . . . . . . : 00-56-AF-00-04-A5
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . . . . : 0.0.0.0
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 255.255.255.255


For some reason ip address isnt filled in, but when i boot off windows on both machines, they happily share an internet connection with auto setup!
 
Old 08-26-2004, 09:53 AM   #5
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
OK

On you linux machine:

You have to give eth1 a static address 192.168.0.1
ifconfig eth0 192.168.0.1
enable routing the traffic from eth1 to eth0

echo 1 > /proc/sys/net/ipv4/ip_forward

On your windows machine:

You have to give the nic the address 192.168.0.2 with a default gw 192.168.0.1 set dns to the dns of you isp.
If you want to use squid to limit your windows xp user access to the internet, you have to change the internet explorer setting to connect to a proxi server 192.168.0.1 on the port you selected when you installed squid.
 
Old 08-26-2004, 11:42 AM   #6
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Original Poster
Rep: Reputation: 30
i've done what you suggested arno, on the linux computer (i think you mean ifconfig eth1(my card which connects to my XP machine) right? not eth0 (my terminal to my cable modem) as you typed?)


i dont follow how i configure the windows machine?
whats NIC?
how do i find the DNS of my ISP?

squid installed automatically when i tried setting up internet connection sharing in Mandrake control centre.
 
Old 08-26-2004, 02:21 PM   #7
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
You are right to choose eth1

If you are lucky (your eth0 got itīs address via a dhcp call and a dns name also should have been loaded) the dns address can be found in /etc/resolv.conf
cat etc/resolv.conf



In windows xp

open network configuration
choose lan connection
properties
tcpip
properties
fil
ip 192.168.0.2
subnt 255.255.255.0
df gw 192.168.0.1
 
Old 08-27-2004, 01:06 PM   #8
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Original Poster
Rep: Reputation: 30
arno, tried what you suggested, all seems to configure fine, the LAN connection says it connected at 100mps but explorer cant surf the web..... any ideas?

have even tried installing IPX protocols but to no help.
 
Old 08-27-2004, 05:03 PM   #9
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Try the following on you XP machine

ping 192.168.0.1

tracert 66.102.11.104

from your linux machine

traceroute 66.102.11.104

and tel me what the result is
 
Old 08-28-2004, 04:56 AM   #10
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Original Poster
Rep: Reputation: 30
On the XP machine:

ping 192.168.0.1 ---> Destination host unavailable

tracert 66.102.11.104 ----> tracing route over 30hops , destination host unavailable

On linux machine:


1 10.85.192.1 (10.85.192.1) 8.508 ms 9.813 ms 7.790 ms
2 gsr01-cr.blueyonder.co.uk (62.30.112.33) 7.753 ms 7.161 ms 9.006 ms
3 bas-cro-pos.telewest.net (194.117.136.106) 9.563 ms 12.066 ms 13.717 ms
4 194.117.136.122 (194.117.136.122) 10.501 ms 11.200 ms 12.448 ms
5 195.66.226.125 (195.66.226.125) 11.741 ms 9.932 ms 11.098 ms
6 216.239.49.254 (216.239.49.254) 19.220 ms 20.371 ms 19.722 ms
7 216.239.48.50 (216.239.48.50) 20.307 ms 22.542 ms 47.073 ms
8 216.239.49.10 (216.239.49.10) 22.413 ms 20.439 ms 216.239.49.58 (216.239.49.58) 22.085 ms
9 216.239.49.18 (216.239.49.18) 27.763 ms * 21.031 ms

then on the next lines is has asterisks for each line.....
 
Old 08-28-2004, 11:00 AM   #11
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Hi arno!

I also tried your procedure on my XP machine connected via eth1 (internal LAN) with 192.168.0.1 assigned IP while eth0 (external) has 203.115.158.190 (provided by our DSL provider). My XP can ping eth1 and as well as eth0 but not the internet gateway IP.

I have no problem on my Linux box. I can browse and ping external host names such as yaoo.com.

I already visited the site you suggested on Masquerading Howto and have pasted almost entirely the docs to my ms word. I tried to put the script on my Slack10 but I can't make it run via scripts so I just typed all one by one thru CLI to see if will work. It does not.

I followed the instructions on the Howto and I'm sure that all modules required are there since it does not return any error when I entered all manually thru CLI.

When I'm executing route -FC on my Linux box all my XP machines are listed together with all other IP's and as well as tracerouting is working but not on my XP machines.

I'm just wandering why the script is issuing bad commands when run? What did I miss during installations of my Slack?

I put the script on /etc/rc.d/ and named it rc.firewall and put chmod 700 or chmod +s on it and edited my rc.local and added these lines: sh /etc/rc.d/rc.firewall.

What seems to be wrong?

And one thing more, why my ethernet cards IP in some instance losses its settings after every reboot so I need to do ifconfig again?
 
Old 08-28-2004, 12:30 PM   #12
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Maverick1182,

could you post the content of
ipconfig /all on you xp machine

and the type and the output of
dmesg | grep eth1 on your linux box


and the output of
mii-tool on your linux bix
 
Old 08-28-2004, 12:45 PM   #13
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
I can't do it now cause I booted on XP and my Slack is sharing/dual booting with this and also I'm downloading - its just going midway.

My ipcofig on XP looks the same with Maverick.
 
Old 08-29-2004, 05:37 AM   #14
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Original Poster
Rep: Reputation: 30
K here are the outputs arno....

XP machine:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : homecomp
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Mixed
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection 4:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethe
rnet NIC #3
Physical Address. . . . . . . . . : 00-56-AF-00-04-A5
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 62.30.112.39
194.117.134.19


dmesg :

eth1: no IPv6 routers present
eth1: Setting full-duplex based on MII #24 link partner capability of 01e1.
eth1: no IPv6 routers present

mii-tool :

eth0: negotiated 100baseTx-FD, link ok
eth1: negotiated 100baseTx-FD, link ok
 
Old 08-29-2004, 10:43 AM   #15
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
You posted
Ethernet adapter Local Area Connection 4:
how many connection's are there ?

In one of the messages you wrote you activated a internet sharing wizard on the xp box, try to reverse that because you don't use the xp box to share the connection that's the linux box.

could you again post the output from your linux box

ifconfig
route -n
 
  


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
Setup Network & ADSL Connection (Internet Sharing) on SuSE 9.2 egcoder Linux - Networking 0 01-31-2005 06:47 PM
sharing network connection fredgt Linux - Networking 1 08-01-2004 04:51 PM
problem sharing internet connection thru crossover network kozonak Linux - Newbie 3 03-09-2004 04:39 AM
How to setup home network(sharing adsl internet connection) faidzullah Linux - Newbie 2 10-14-2003 12:19 PM
Network connection sharing Yanno Linux - Networking 32 05-25-2003 04:25 AM

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

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