LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ICS - XP box has ICS enabled, Linux box to connect, how? (https://www.linuxquestions.org/questions/linux-networking-3/ics-xp-box-has-ics-enabled-linux-box-to-connect-how-8354/)

Thymox 11-06-2001 05:12 AM

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.

Thymox 11-30-2001 07:12 AM

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?

mcleodnine 11-30-2001 11:58 AM

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.

ChaosX2 11-30-2001 06:55 PM

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.

Netvyper 12-06-2001 07:43 PM

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:rolleyes:

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?

DavidPhillips 12-06-2001 11:18 PM

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



DavidPhillips 12-06-2001 11:22 PM

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

Thymox 12-07-2001 10:37 AM

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?

RecoilUK 12-08-2001 11:10 AM

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

DiBosco 12-08-2001 01:04 PM

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! ;-)

Thymox 12-10-2001 08:48 AM

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).

DavidPhillips 12-10-2001 09:11 AM

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

DavidPhillips 12-10-2001 09:24 AM

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

DiBosco 12-10-2001 10:15 AM

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>

Thymox 12-11-2001 06:32 AM

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.

DiBosco 12-11-2001 08:52 AM

OK, let's make sure I've got this right:

My understanding is that Dave, who is your flatmate, is a misguided individual who's running XP and has a permanent connection to th'Internet? (Openworld?)

You want to have your Mandrake 8.1 box set up with a static IP address for some reason?

AFAIK, if Dave sets up his XP machine to to share his connection (ICS - that a shared Internet connection?) then Windows says something like:

I'm now going to set myself to IP address 192.168.0.1 and I am going to be the DHCP master. You have *no* choice in this is you want to share your Internet connection. (I had no end of problems when I originally did this because my little Edimax print servers were also set up as DHCPs!)

So, given Dave's XP machine is now a DHCP master, if you want to have a static IP address on any machines on the LAN, you must tell the XP machine to only dish out IP address *above* a certain value. Then, you must have all your static IP address *below* that value. eg. Make the XP machine start the dynamic IP addresses at 192.168.0.100 - then ensure that any IP addresses you assign to be static, in the range 192.168.0.1 to 192.168.0.99

I'm afraid I don't know how to do this off the top of my head, I'd need to be in front of an XP machine and I don't know anyone stupid enough to run XP. ;-)

In reply to a couple of your specific questions:

>> 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. <<

I must confess I'm not 100% sure whether the DHCP server is intelligent enough to look at all the existing IP address and ensure it doesn't dish out the same one as one on, say, your sister's machine. It might well just keep a local cache and assign a number not in its cache. Someone more knowledgeable out there might be able to tell us! But the way to prevent the possibility of this happening would be to make sure the XP machine will only dish IP addresses outside of your static IP address range as explained above.

>> 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? <<

Yes, the XP box - *because you made it the machine that shares its Internet connection* will *always* be 192.168.0.1. That's certainly the way Win2k works. I know 'cos I am that soldier! <g>

I am afraid I simply don't know - other than telling you to use the connection wizard - how to connect your Mandrake box to the Internet. As I said before, it just worked for me and I was bloody grateful for that. I'll go hacking around config files etc when I have more time, and more in depth knowledge of Linux. In fact when I have everything set up and going, I'm going to try connecting my jellyfish to a Linux box and get rid of the Windows 2k machine that connects directly to the Internet. :-)

Does that make sense now? Don't hesitate to post back it it's not clear.

Cheers,

Rob.

Thymox 12-11-2001 09:18 AM

Found out a little earlier:
XP's 'automatic network configuration' wants all to be in the range of 10.1.1.x! Unfortunetly it doesn't tell you this (as far as we could see). No wonder I couldn't get the bloody thing to work! They couldn't see eachother! Thanks to all! With any luck, after Chrimbo I will have my old PII-333 back on it's feet (with a new mobo) and so I can set up a gateway myself which I will control!

I'm sure the little wizard does do it nicely, if:
1) Your housemate doesn't keep changing his mind as to whether he wants to be running XP's DHCP or DIY the networking setup. This is where the problems lied: XP wanted auto 10.1.1.x, we wanted manual 192.168.0.x!

2) You want to do things manually so that you know how they're done.

BTW, he doesn't have an always on connection, just a lowly 56K dial-up, but the principle will be the same since it's the networking part that was the problem.

I think that can now finally be laid to rest. Again, thanks to all.

PS Yes, he is a misguided individual running XP, but has sworn (and I'm going to keep him to it) that he will try Linux over Chrimbo. It's not as if I haven't got enough distros for him to play with.


All times are GMT -5. The time now is 12:08 AM.