Jump to content

Connecting linux and windows


Guest nawialkair
 Share

Recommended Posts

Guest nawialkair

Hi

I have two machines

 

M1 has XP SP1 installed and connected to the internet via sattelite.

M2 has mandrake 10 installed.

 

I have a network card in each machine.

They are connected using a small hub.

 

I gave each machine a static IP and made the ip of M1 the default gateway in M2.

 

I could not get the network up.

When I ping M2 from the M1 I get a time out response.

The same when I ping M1 from M2 I get this:

Destination Host Unreachable

 

 

Thanks

Link to comment
Share on other sites

Prerequisites for any net problem (for you and anybody else with a problem reading this):

 

Please post output of "ifconfig", "iptables -nvL" , "route -n", and contents of /etc/resolv.conf.

 

If you post this info, we can almost certainly help. In particular, I too have a satellite connection, from Central point, using Astra - I connect through Linux.

 

What provider do you use?

 

Can you ping your Linux network card from the Linux box and the windows card from windows?

 

If above works, try connecting machines together directly with a crossover cable if you have one.

 

Chris

Link to comment
Share on other sites

Guest nawialkair

Thanks for your reply chris

 

You are talking to a guy who is new to linux.

 

When I type these:

ifconfig

iptables -nvL

route -n

 

in a terminal window

 

I always get this response:

bash: ufconfig: command not found

 

the same goes to the rest.

 

The file /etc/resolv.conf

is empty

 

My internet provider is

Direcway two way sattelite connection

 

______________________________

 

Let me describe what I did exactly.

1- I went to hardDrake

2- I clicked on the network card then on run config tool

3- CHose lan network

4- I did not choose the manual choice

5- manual configuration

6- in the Ip address I entered 192.168.0.2

the netmask was 255.255.255.0

network hotplugging and start at boot are checked

7- Host name empty

DNS server 1 is automatically filled with 192.168.0.2

DNS server 2 empty

DNS server 3 empty

serach domain also empty

Gateway 192.168.0.1 which is the IP of the windows XP machine

zeroconf host name is also empty "I don't know what the hell it means"

Thats exactly what I did.

Link to comment
Share on other sites

It's very encouraging, all these new Linux users - we'll soon be able to TAKE OVER THE WORLD HAHAHAHAHAHA!!!

 

Ok - you need to be the root user (administrator) to be able to run system commands, so in the console, type su <enter> followed by your root password at the prompt.

 

7- Enter a hostname - anything you like. "linux" will do.

 

You don't need hotplugging unless you are using a laptop - turn it off.

 

The DNS setting should be the same as on your windows machine, though that will not stop the PCs talking to each other. (/etc/resolv.conf is the file that should contain the DNS setting once configured correctly).

 

The rest should be OK.

 

Then reboot (you don't normally need to reboot with Linux, but it's easier than explaining what to type etc..).

 

Become root as above and post the results of the commands I asked for above.

 

Do the pinging - on the LINUX box, type:

 ping -c 4 192.168.0.2

This will tell you if the linux network card is working (or not...).

 

And on the WINDOWS box, type

 ping 192.168.0.1

This will tell you if the windows network card is working.

 

Then try pinging each PC from the other.

 

Post results.

 

Chris

Link to comment
Share on other sites

Guest nawialkair

here are the results you asked for.

The command iptables -nvL

command not found

 

eth0 Link encap:Ethernet HWaddr 00:08:A1:3F:09:94

inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:14 errors:1507 dropped:0 overruns:0 frame:0

TX packets:12 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:2730 (2.6 Kb) TX bytes:504 (504.0 b)

Interrupt:5 Base address:0xe400

 

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:166 errors:0 dropped:0 overruns:0 frame:0

TX packets:166 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:11856 (11.5 Kb) TX bytes:11856 (11.5 Kb)

 

 

Kernel IP routing table

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

 

 

The content of resolve.conf is:

nameserver 192.168.0.2

# ppp temp entry

 

 

 

 

 

Thanks

Link to comment
Share on other sites

>>The command iptables -nvL

>>command not found

 

Means theres no firewall - OK for now.

 

eth0 looks like it's set up OK - where are my ping results? :)

 

The routing table is good.

 

Again, though your resolv.conf is wrong - should contain the same DNS addresses as windows, it won't stop PC->PC comms.

 

Chris

Link to comment
Share on other sites

Guest nawialkair

WOW thats a fast reply..

 

 

The ping of linux machine from linux itself

 

[root@localhost nawi]# ping -c 4 192.168.0.2

PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.

64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.069 ms

64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=0.058 ms

64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=0.057 ms

64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=0.057 ms

 

--- 192.168.0.2 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2999ms

rtt min/avg/max/mdev = 0.057/0.060/0.069/0.007 ms

 

The ping of the windows XP from linux box:

[root@localhost nawi]# ping -c 4 192.168.0.1

PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

From 192.168.0.2 icmp_seq=1 Destination Host Unreachable

From 192.168.0.2 icmp_seq=2 Destination Host Unreachable

From 192.168.0.2 icmp_seq=3 Destination Host Unreachable

From 192.168.0.2 icmp_seq=4 Destination Host Unreachable

 

--- 192.168.0.1 ping statistics ---

4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3000ms

, pipe 3

 

Windows XP pinging its own IP

 

Pinging 192.168.0.1 with 32 bytes of data:

 

Reply from 192.168.0.1: bytes=32 time<1ms TTL=128

Reply from 192.168.0.1: bytes=32 time<1ms TTL=128

Reply from 192.168.0.1: bytes=32 time<1ms TTL=128

Reply from 192.168.0.1: bytes=32 time<1ms TTL=128

 

Ping statistics for 192.168.0.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

 

When I ping the linux IP, I always get time out response

 

 

 

 

 

I really appreciate yor help

Link to comment
Share on other sites

Just happen to be sat here...

 

So your network cards are working OK - the problem lies between the machines. (assume you don't have another firewall installed, perhaps on windows).

 

Check the cabling / hub is switched on...

 

If you can try a crossover cable, that will eliminate the hub and existing cables.

 

Is it possible one of your cables IS a crossover? That would also stop it working.

 

chris

Link to comment
Share on other sites

Guest nawialkair
Could the problem be that the computers have gateways set?

 

In all the time I have used networks, in this situation I dont think the gateway entries are required in the config. remove them then try pinging.

 

I removed the gateway but no success.

________________________________________

 

 

I used the cables to connect 2 windows computers.

I never had a problem with them.

 

 

I made a small mistake here

I have a switch not a hub. Will that change anything??

Link to comment
Share on other sites

Shouldn't make any difference, unless it's faulty.

 

Try unplugging all the cables, then plugging them back in to dirfferent ports on the switch (in case one is in an uplink socket - this should be marked).

 

You will need the gateway address when you want to access the internet...

 

Chris

Link to comment
Share on other sites

Installing another distro is a bit drastic... Some of MDKs wizards are a bit dodgy, but it looks like the network device IS actually set up OK in this case, and the underlying network stuff is standard Linux, which as we know is GREAT for networking :)

 

So - let's recap:

 

Both your network cards appear to work (because you can ping them from the same PC)

 

We think your cables are OK (because they worked before). Still think you should try a crossover cable though - we need to be 100% certain they and your switch are OK. Assume you have unplugged and restarted the switch again. Are they pre-made flexible (as opposed to solid core)cables? Also are all the same coloured wires going to the same pin at both ends?

 

Are all the correct lights on the hubs and network cards on?

 

Do the activity lights flash when you try pinging?

 

We need to make absolutely sure there is not a firewall blocking communication - remember this could be on the windows machine.

On windows (XP), right click on the network places icon and choose properties. Right click on the local area connection icon - choose properties again. Select the advanced tab and make sure the internet connection firewall box is unchecked for now.

You may also have a 3rd party firewall on windows - if so, disable it for now.

 

On Linux, log in as root and try the "iptables -nvL" for me again, just to make 100% sure.

 

Then try pinging again & let us know.

 

If this doesn't work, let us know what cards you have installed on both machines - on-board, PCI or ISA. Make and model, and are they dual output - ie have they sockets for coax or AUI as well as RJ45 plugs like you are using now. Also, (clutches at straws) not something silly like having 2 network cards in the same machine, and plugging in to the wrong one... (I know, but I've done this myself...)

 

Is there another PC/dual boot with windows you can use to test the connection or cables - mate got one? (laptop easiest...). Or even a knoppix CD. Then we may be able to rule out one of the PCs.

 

Please also post output of ifconfig again - I see there are Rx errors - which implies there may be something getting through...

 

Running out of ideas if the above doesn't help, but not about to give up...

 

Chris

Edited by streeter
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...