LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-06-2001, 05:12 AM   #1
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
ICS - XP box has ICS enabled, Linux box to connect, how?


Got my LAN working now (including basic SAMBA stuff), but:

How do I get my Linux box to connect to the internet via a WinXP box?

My computer doesn't have a modem, and even if it did, I couldn't really connect it up, as the phone point is bloody miles away. My flatmate's computer (running XP - why, oh, why, oh, why?) is connected to the internet and has ICS enabled. How can I connect to the internet via his XP-box?

(actually, still can't figure out how to do this in Windows either)

Would I be resigned to using his ISP, or could my computer specifiy a phone # to dial.

Cheers muchly.
 
Old 11-30-2001, 07:12 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Original Poster
Rep: Reputation: 56
We did it under Windows, but it insisted on using 'Automatic IP Configuration' which we all know to be DHCP. Now, does anyone know how to set my Linux box to use a dynamic IP address for it's gateway? If not, how easy would it be for us to get Window's gateway jobby running on static IP addresses - presumably then I could quite easily get Linux to use my house-mate's static IP'ed XP box as a gateway?
 
Old 11-30-2001, 11:58 AM   #3
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
If XP is acting as a reasonable DHCP server then all you need is a DHCP client. dhcpcd and pump are two of the more common utils.
 
Old 11-30-2001, 06:55 PM   #4
ChaosX2
Member
 
Registered: Aug 2001
Location: Sacramento, CA
Distribution: Gentoo 1.4+
Posts: 195

Rep: Reputation: 30
To have ICS enabled on Windows XP one of the network cards has to have a static IP. Normally its 192.168.0.1. If the windows machine is configured right all you need to do is have your linux box setup for DHCP.
 
Old 12-06-2001, 07:43 PM   #5
Netvyper
LQ Newbie
 
Registered: Dec 2001
Posts: 1

Rep: Reputation: 0
I have a similar Problem.

I have my Win2k Box running ICS for this computer, a win98SE Machine, and a WinME machine downstairs... which is a doddle to setup

My Mandrake 8.1 box seems to be networking ok.. SORTOF

It wouldn't get a DHCP address trying 5 times and getting a DHCP Reply NAK or something similar.... i'll check next reboot.
I can ping the other computers fine.
Although not with their Windows Computer Names... should i be able to?
IE:
Ping 192.168.0.1 Works
Ping Proxy Doesn't

i also can't ping any external Sites... getting an "Unable to locate Server" error in netscape

The KDE Connection thing (Network Monitor) Tries to connect, and both sends and recieves Data... so it is obviously talking to something.

However, no External connections are available.

As far as i know, i have just the TCP/IP protocol installed, and atm have a Fixed IP of 192.168.0.233

What else can i do to try to get on the web?
 
Old 12-06-2001, 11:18 PM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
ICS - XP box has ICS enabled, Linux box to connect, how?

try dhcpcd eth0

if it works check this file...


/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=no #optional
PEERDNS=yes #this will probably not help with ICS


put the nameservers in /etc/resolv.conf



route -n

if the default gateway is not shown do this


route add default gw 192.168.0.1



Last edited by DavidPhillips; 12-06-2001 at 11:20 PM.
 
Old 12-06-2001, 11:22 PM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Although not with their Windows Computer Names... should i be able to?
IE:
Ping 192.168.0.1 Works
Ping Proxy Doesn't



you can add them to /etc/hosts and that will work
 
Old 12-07-2001, 10:37 AM   #8
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Original Poster
Rep: Reputation: 56
OK, got him to set his computer to a static IP (192.168.0.1), mine is statically on 192.168.0.2 regardless of OS. Am I right in thinking, then, that all I need to do is route add default gw 192.168.0.1 and I can connect through his box? Once I've done this, will it have to be done on every reboot?
 
Old 12-08-2001, 11:10 AM   #9
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
I have this setup also.

I have static ip on win and Linux but run winipconfig u( u dont have to in xp its in the properties box) and find the dns server ip.

Set the dns server manually in Linux and your done.( for a dialup connection in Linux its usually in the ppp dir and called resolve.conf) but I set mine up at install so dont really know.

Hope that helps

RecoilUK
 
Old 12-08-2001, 01:04 PM   #10
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mandriva, Mandriva, Mandriva. (Three different releases depending on the computer)
Posts: 710

Rep: Reputation: 35
I got ADSL (Openworld) a year ago and set it up so that I had a Win2k machine with the USB modem on it. If you share the modem, Win2k automatically sets itself up as 192.168.0.1 and becomes the DHCP server. You have no choice AFAIK. I'd be surprised if XP didn't work in a similar way.


When I installed Mandrake 8.1, Mandrake automatically detected the settings, it just worked.

Even if you've already installed Mandrake, if you go to Control Centre (the one on the desktop) and go to Network and connection, there's an automatic setup page there. Make sure you make your Linux box get its IP address dynamically and that you get your Internet access via the LAN. Mandrake should see 192.168.0.1 as the Internet gateway and it should just work!

This was the easiest and most pain free part of all my Linux tinkering. :-)

If only bloody Samba was so easy! ;-)
 
Old 12-10-2001, 08:48 AM   #11
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Original Poster
Rep: Reputation: 56
Damn it! He's gone back to DHCP! Oh, Man! I've found that Samba is a doddle compared to my tinkerings with this! Basically I really do not like letting programs do things themselves unless I know (or at least understand the principles behind) how it does it!

The more I try and get this to work, with XP doing its 'Let me do it for you - it'll work straight away and you'll never have to think about it again' strategy and my ME box going 'Hmm, this looks interesting - maybe you should try this...', the more I pull my hair out!

All I want is this:
XP box static @ 192.168.0.1
Linux box static @ 192.168.0.2
WinME box static @ 192.168.0.2 (yes, it's dual boot)
WinME box2 static @ 192.168.0.3
And for them all to dial out via 192.168.0.1 (the XP box).

What I've got it this:
The XP box DHCP @ ???.???.???.???
Linux/WinMe Static @ 192.168.0.2
WinME2 DHCP @ ???.???.???.???

I believe (from reading the above) that the computer with the modem (XP box) needs to be static, and the others can be DHCP.

The biggest problem I have is that I do not have control over the XP box (it's not my computer, after all) and Dave (who's computer it is) wants it all to be 'Automagic' (aka DHCP), which I don't.

Hmm, maybe after the Christmas break I will have sorted it out. My brother wants me to help him set up a internet gateway for his house. I've suggested using some flavour of Linux because it's more stable (which he seems to have reluctantly agreed), and then I can get on with setting-up a 4th computer in our flat (with Linux) to be our internet gateway. At least then I'll have control over the gateway's properties!

BTW: I'm not really a control freak, it just bugs me that others cannot see that doing their way causes problems for others (I've had it for 4 years so far at Uni).
 
Old 12-10-2001, 09:11 AM   #12
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
it can be dhcp or static it will not matter to the server which you say is not yours.

my laptop here is setup something like your system, I will post my stuff here and you can compare it with yours

the main thing is that it is sharing the connection with 192.168.0.2 and .3 your client boxes.

and the ip is set using ifconfig like you have in the post you already have it set

also you have the default gateway set

running route -n will confirm that it is set

the default gateway line will have UG in it

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.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 192.168.0.1 0.0.0.0 UG 0 0 0 eth0



ifconfig will show that the ip is set

[root@Microdot root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:Bc:td:35:g4:60
inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:1081429 errors:0 dropped:0 overruns:0 frame:0
TX packets:1036870 errors:0 dropped:0 overruns:0 carrier:0
collisions:34
RX bytes:1085457938 (1035.1 Mb) TX bytes:196046750 (186.9 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1851 errors:0 dropped:0 overruns:0 frame:0
TX packets:1851 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:283636 (276.9 Kb) TX bytes:283636 (276.9 Kb)



the other requirement is dns

/etc/resolv.conf

nameserver 150.10.128.5

Last edited by DavidPhillips; 12-10-2001 at 09:26 AM.
 
Old 12-10-2001, 09:24 AM   #13
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
by the way mine is setup using dhcp

to do it you need this

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=no
TYPE=Ethernet
USERCTL=no
PEERDNS=yes


if you want it to come up on boot

use ONBOOT=yes

if the /etc/resolv.conf file does not get the nameserver in it from the dhcp then edit it
 
Old 12-10-2001, 10:15 AM   #14
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mandriva, Mandriva, Mandriva. (Three different releases depending on the computer)
Posts: 710

Rep: Reputation: 35
OK, OK, keep your hair on, I was only trying to help! ;-)

In case you're interested - you can easily have some computers with static IP addresses and some with dynamic on the same LAN. If you make the DHCP master (your XP box in this case) dish out IP addresses over (say) 192.168.0.100 and give your static machines addresses under that, your DHCP master will never try to assign addresses that you've already assigned statically.

The situation of XP wanting to be your nanny and DHCP is very different, surely? All you're saying with DHCP is I don't really *care* what my IP address is, your Netbios name always stays the same and that's what the humans on the nyetwork see.

When I first started doing network stuff I was a bit wary of DHCP, it seemed like it would make things complicated, but once you set it up, you can forget all about IP addresses and life becomes much easier when you're maintaining the network; you don't have to keep a record of who has what IP address and don't have to worry about assigning the same address to two people.

Apologies if I'm missing the point here, I'm not trying to tell you you *have* to do it one way or another. I've had so much help setting up Linux from the likes of Dave Phillips generously advising, I was just trying to pass on some of my knowledge. :-)

Linux is pretty complicated to set up, so anything that can get me going more quickly and giving me more time to tinker and learn as I go along is good in my book.

btw, if you think people can't see that you might want to do things in different ways at Uni, just wait 'til you get into the real world and deal with politics of the office! <g>
 
Old 12-11-2001, 06:32 AM   #15
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Original Poster
Rep: Reputation: 56
Sorry, just re-read my last post - it did sound a bit narky, didn't it. I didn't mean to be rude, I thought I was getting somewhere with my housemate, and then he decides, with no forewarning, that he's going to go back to DHCP.

I can see the possible benefits of using DHCP from the actual networking point-of-view, and I am quite happy to use it (I go '//DAVE' in network neighbour-hood, or whatever, like everyone else), but when it comes to manually setting up connecting to the internet through a gateway, I'm pretty sure that you can't say '//DAVE' (if I'm wrong, can someone let me know as this would be a god-send), but you have to specify an IP address.
Now, if XP is the DHCP server, from which all others will be given their IP addresses, then will his IP be static, even if my computer (which isn't the DHCP server) is booted before his?

Here's what I'm reading:
I can set my machine to statically be 192.168.0.2. The XP box can be the DHCP server and give out dynamic IP addresses to all others machines in the range of 192.168.0.1 --> 192.168.0.255, with the exception of 192.168.0.2 because that's my machine. Am I right so far? If this is so, would the XP box always be 192.168.0.1, and how could I stop it from assigning 192.168.0.2 to my sisters' computer if that's booted before mine?

Thanks for keeping with this thread, even with the agro attitude portrayed in my earlier post.

Oh, and I'm not going to be getting into all that office politics stuff, I'm going for classroom politics! That's right, I'm a complete masochist in that area, I'm going to be a teacher! GCSE/A-level grade (not sure what the American system does, but it's kids between 11-18) in either Biology, Human Biology or General Science, depending on the school.
 
  


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
Enable/Disable ICS on XP from LINUX box. agronom Linux - Networking 2 09-12-2005 09:57 PM
Setting up ICS on a Linux Box (Slackware 10) ziggo0 Linux - Networking 1 04-12-2005 03:59 AM
XP Box won't connect to internet thru RH9 Box (firewall/dhcpd), it can only ping fire Rhapsodic Linux - Networking 4 07-10-2004 03:02 PM
Connect Red Hat box to Win XP box? VBAHole22 Linux - Newbie 6 05-09-2004 11:13 AM
Win98 ICS,connect in Linux contrasutra Linux - Networking 3 05-06-2003 05:55 PM


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