LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Need help with internet connection (https://www.linuxquestions.org/questions/linux-networking-3/need-help-with-internet-connection-343781/)

netcat 07-16-2005 01:20 PM

Need help with internet connection
 
I've been trying for some time to get my Linux machine connected to the internet.
My "network" looks something like this: Internet -> WinXp -> USB network card -> Linux
I'm assign a static IP to the linux machine, 192.168.0.x and with 192.168.0.1 as gateway. I've also tried setting the gateway to the IP of this comp or the IP of the usb device, but then I get "network unreachable" when trying to do a ping, and I get no "default" column when doing route, so I guess I've done something right with the 192.168.blah settings at least. ;P
I'm guessing it won't work because it seems Slackware hasn't probed for the network card or whatever..

crazytigger 07-16-2005 01:57 PM

If you are using Internet connection sharing on your windoze box, you should be letting the Linux NIC pick up an IP from the windoze machine. ICS works like a DHCP server.

netcat 07-16-2005 02:00 PM

I've tried using DHCP, but that didn't work. I get "Network unreachable" when trying to ping.

eantoranz 07-16-2005 02:28 PM

well... go step by step.

Are you able to ping the XP box?

What does your routing table look like? (route -n)

netcat 07-16-2005 02:47 PM

I "can" ping the xp box, meaning I don't get network unreachable, but "Destination host unreachable".. :P
route -n gives:
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----- 1 ------- 0 ---- 0 -----eth0

eantoranz 07-16-2005 02:50 PM

U can... or can't?

eantoranz 07-16-2005 02:51 PM

What are the IPs of the linux and the XP box?

netcat 07-16-2005 02:57 PM

I can't, but at least it responds in some way.
Xp Ip: 217.208.127.x
Linux: 192.168.0.6

eantoranz 07-16-2005 03:01 PM

I mean... the XPs inner IP (the interface connected to the linux box). :-)

netcat 07-16-2005 03:03 PM

Right. ;P I think it is 169.254.70.46..

eantoranz 07-16-2005 03:06 PM

There you are. The linux box will NEVER reach your XP box... because they are mapped to different networks.

You have to give the inner XP interface a static address in the 192.168.0.x network. That's the first step.

eantoranz 07-16-2005 03:08 PM

then, set the linux's gateway to the XPs innner interface address.

netcat 07-16-2005 03:36 PM

Allright, now I can ping and connect to the Xp box... :) But still no internet, it seems.

eantoranz 07-16-2005 03:42 PM

OK.... that's a first step.

In order to be able to connect to the internet, set the linux's gateway to the XPs innner IP.

Once that is done, you should be able to ping public IPs from the linux box. If you can't then probably it's because the XP box is blocking you.. meaning you haven't shared your internet connection.

If you can ping public IPs from the linux box, but still can't use a browser, check that the DNS for the linux box are the same of your XP box. That should be it.

netcat 07-16-2005 03:56 PM

:D Got it to work now! Replying from the linux box now. :) :Pengy:
Thanks x1000. ;)


All times are GMT -5. The time now is 10:22 PM.