LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Network connection sharing (https://www.linuxquestions.org/questions/linux-networking-3/network-connection-sharing-60493/)

Yanno 05-18-2003 01:03 PM

Network connection sharing
 
Hello everyone!

I can see that this question has been asked so many times, but unfortunately it did not help so far :(

On one hand, I have a PC, connected to the internet through an ADSL line, where I enabled ICS on a different network card...

On the other hand, I have a laptop with Mandrake 9.1 installed, configured to use static 192.168.0.2 to connect to the winXP box.

The problem is that the winxp box can ping the linux box, but not the other way aroud, and of course I have no connection to the internet on the linux box.

Any help is welcome!

Yann

WorldBuilder 05-18-2003 01:08 PM

You cannot ping by hostname or IP address? This is the first step. Let us know.

Chris

Yanno 05-18-2003 01:12 PM

Chris,

I cannot ping by IP address,

Thanks,

Yann

dejan_j 05-18-2003 06:27 PM

If u can ping but cant access the internet just make sure that "INTERNET SHARING" is enabeled on ur ex machine

Robert0380 05-19-2003 01:34 PM

some basic things to check:

1. if the two computers are directly connected, make sure its a crossover cable

2. (may or maynot make a difference, not sure) make sure the IPs of the computers are on the same subnet. You said Mandrake was 192.168.0.2, so make sure the ethernet card on the XP box is configures as 192.168.0.1

3. Make sure mandrake has its default gateway set to be the IP of the XP box (192.168.0.1 NOT the isp assigned address. And also that the netmask is 255.255.255.0

4. Make sure mandrake knows about the name servers
edit the /etc/resolv.conf file.

sets 1-3 should get the two boxes to ping each other at the very least. Step 4 should allow the Linux box to get web pages....

Important Note: I have no clue how ICS works on XP so the advice i gave assumes that it just sets up the XP box as a router....if you can supply more detail about ICS (like does it automatically forward DNS stuff, does it do DHCP) then i might be able to offer more advice.

Robert0380 05-19-2003 01:37 PM

If you want help setting it up the other way around (the right way :) ) with Linux as the gateway to the internet, then I could help with that as well. But I assume that's not an option.

Yanno 05-19-2003 02:39 PM

Hi Robert!

So, point by point...

1- yes the computers are directly connected: my cable is supposed to be a crossover one, although I am not sure how to check. But, if my windows box can ping the linux one, that should mean it is one or?

2- ipconfig tells me that the windows box is indeed 192.168.0.1; the netmask, in both cases, is set to 255.255.255.0

3- default gateway is set to 192.168.0.1, at least as far as I can tell: interestingly, linux displays the windows box name when I send the "route" command.

4- I added "
search t-online.de
nameserver 192.168.0.1
nameserver 62.225.252.244
"

to my resolv.conf file

I rebooted and then...

Ping still does not work, neither to 192.168.0.1 nor to the name of the windows box...

As far as I know, winXP should provide DHCP through ICS, but ipconfig/all tells me it is not enabled on my linux box connection...

Thanks anyway,

Yann
p.s. I wanted first to try linux on a small scale before taking the big step... It's not I am disappointed (I expected some difficulty) but... Hey, looks great so far, just waiting for the IT connection to work ;)

manthram 05-19-2003 03:01 PM

why dont you try by setting the linux box to get its IP by dhcp and then see if is works.

KennyK 05-19-2003 03:06 PM

I would recomend that since it is not working with the XP box as the router/gateway that you quit that and go for getting the Linux box to act as the gateway. First of all, you will get alot more help in this forum getting it setup. Second of all, when it is setup, you will know that your network is protected. I don't know what level of security XP provides, but Linux is great for that. It will also help you more to understand the functions of networking. Isn't part of the reason you decided to try out Linux is because you wanted to learn?

Just my thoughts.

Regards

Robert0380 05-19-2003 03:17 PM

Quote:

1- yes the computers are directly connected: my cable is supposed to be a crossover one, although I am not sure how to check. But, if my windows box can ping the linux one, that should mean it is one or?
if they can ping directly connected, then yes it's a crossover cable. Its not a relaiable way to tell, but if you put the to ends of the cables next to each other and compare the color coding, they should not be the same. If the colors are the same then it is not an X-over cable. Like i said, that's a bad way to check but it will atleast tell you that it's not a straight through cable.

Quote:

2- ipconfig tells me that the windows box is indeed 192.168.0.1; the netmask, in both cases, is set to 255.255.255.0
that's sounds cool

Quote:

3- default gateway is set to 192.168.0.1, at least as far as I can tell: interestingly, linux displays the windows box name when I send the "route" command.
that sounds good too.


Quote:

4- I added "
search t-online.de
nameserver 192.168.0.1
nameserver 62.225.252.244
"
also looks ok, but if you can, add another name server from you isp...but as long as the 1 is up it SHOULD work.



also you said ICS does do DHCP, try getting the IP and what not through dhcp on the linux box as suggested above in another post:


Code:


        [root@machine root]# dhcpcd eth0

then wait for it to finish

then try
Code:

      [root@machine root]# ifconfig eth0
or try pinging again.


p.s. im gettin carried away with the quote and code tags :)

Dodj 05-19-2003 07:30 PM

i have a similar problem, i cannot ping in EITHER direction. i have configured linux to use static ip address, and use the xp box as a gateway.........but when i open network connections in mandrake control(9.0) it says eth0, static, up, but the ip section is BLANK.


please i need this to work, it is very frustrating, i need someone who can diagnose and go through step by step to find a problem, my box is dual boot, and xp shared the internet fine with the other xp. I am unfamiliar with linux, but i am certain it is configured properly. Please i need expert help.

Any information you need i will provide, it has been over amonth and i still cannot get the net working!!! Thanks in advance

Robert0380 05-19-2003 09:43 PM

im about out of advice on this one, try everything you see in this thread. I seriously thinkg its better to set it up the other way though.....Linux as the gateway and Win XP as the slave. Not many people seem to know what Windows ICS does that alows it to share the connection (atleast not in great detail) but i bet more people in this forum could help you set it up the other way around (myself included).

Looking_Lost 05-20-2003 02:21 AM

Do any of the machines have any firewall's activated such as on XP the built in one?

For a quick fix bypassing windows ICS you could download the proxy from http://www.analogx.com/contents/down...work/proxy.htm
and use that on the windows machines for getting the linux one's onto the net. That shoud at least getting you browsing the internet.

If that doesn't work then the problem is probably a bit deeper.

sunnyvic 05-20-2003 05:21 AM

Hello Yanno,
I have been into a likely problem, but on windows to windows. The situation where you make your windowsXp as a server and mandrake or windows as a workstation, note that you remove the default LAN gateway from the server. Your LAN ip address on the server and the DNS should be okay for the server's LAN configuration. Now try this:
On winxp: LAN ethernet add the
IP address: 192.168.0.1
Subnet mask:255.255.255.0
Default Gateway:
DNS: xxx.xxx.xxx.xxx
Alt.DNS:xxx.xxx.xxx.xxx
Add nothing to the gateway on your server. But apply the server's IP address as the gateway for your workstations. Try pinging now, it should reply. Let me know how it goes. And let me add that if you are using windowsXp, you don't actually need any Internet Sharing Software installed on your server. You can use windows sharing technique. Share only your WAN network card, but don't share the LAN ethernet card. With this, it should work properly. Thanks!

Dodj 05-20-2003 08:39 PM

so if i disable the firewall will it work?
wont that make my computers vulnerable


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