Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
11-06-2001, 05:12 AM
|
#1
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Rep:
|
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.
|
|
|
11-30-2001, 07:12 AM
|
#2
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Original Poster
Rep:
|
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?
|
|
|
11-30-2001, 11:58 AM
|
#3
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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.
|
|
|
11-30-2001, 06:55 PM
|
#4
|
Member
Registered: Aug 2001
Location: Sacramento, CA
Distribution: Gentoo 1.4+
Posts: 195
Rep:
|
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.
|
|
|
12-06-2001, 07:43 PM
|
#5
|
LQ Newbie
Registered: Dec 2001
Posts: 1
Rep:
|
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?
|
|
|
12-06-2001, 11:18 PM
|
#6
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
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.
|
|
|
12-06-2001, 11:22 PM
|
#7
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
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
|
|
|
12-07-2001, 10:37 AM
|
#8
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Original Poster
Rep:
|
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?
|
|
|
12-08-2001, 11:10 AM
|
#9
|
Member
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270
Rep:
|
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
|
|
|
12-08-2001, 01:04 PM
|
#10
|
Member
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 814
Rep:
|
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! ;-)
|
|
|
12-10-2001, 08:48 AM
|
#11
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Original Poster
Rep:
|
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).
|
|
|
12-10-2001, 09:11 AM
|
#12
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
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.
|
|
|
12-10-2001, 09:24 AM
|
#13
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
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
|
|
|
12-10-2001, 10:15 AM
|
#14
|
Member
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 814
Rep:
|
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>
|
|
|
12-11-2001, 06:32 AM
|
#15
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 04:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|