LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Thread Tools
Old 10-31-2009, 04:37 PM   #1
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0
Question Can't Ping Linux CentOS 5.3 Machine to XP SP2 Windows Machine


[Log in to get rid of this advertisement]
Dear Mates,

I have two machines, one has XP service pack2, second one has CentOS 5.3 (Linux), they are connected through crossover cable.


I have configured everything fine but don't know why till now can't ping!

A. Windows machine settings as follows:

IP Address: 192.168.1.3
Subnet Mask: 255.255.255.0
Default Gatway: 192.168.1.1
+ Firewall is turned OFF.

B. For Linux machine, I will list everything stored in network files, logged as [root@localhost ~]# :

1. /etc/sysconfig/network:


ifconfig eth0 192.168.1.4 netmask 255.255.255.0 up
route add -net 192.168.1.0 netmask 255.255.255.0 eth0
route add default gw 192.168.1.1 eth0
NETWORKING = yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain



2. /etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE="eth0"
IPADDR="192.168.1.4"
NETMASK="255.255.255.0"
ONBOOT="yes"
BOOTPROTO="yes"



3. /etc/resolv.conf


nameserver 192.168.1.4
search locadomain



4. I restarted network service using this command:

/etc/init.d/network start


everything is fine.

When checking using ifconfig command.

I get the following:

eth0 Link encap: Ethernet HWaddr 00:08:0D:EE:19:66
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr:........
UP BROADCAST RUNNING......
RX....
TX....
collisions:0........
RX bytes:0 (0.0 b) TX bytes:......

lo Link encap: Local Loopback
inet addr: 127.0.0.1 Mask:255.0.0.0
inet6 addr:........
UP LOOPBACK RUNNING......
RX....
TX....
collisions:0........
RX bytes:0 (0.0 b) TX bytes:......

I mean I assigned the IP: 192.168.1.4 to Linux machine (Eth0).

I did everything above and can't ping till now, when pinging from windows or Linux I get a message "destination host unreachable" restarted Linux many times but same result. NETWORK CABLE is working fine I tested it.

Please advise me.

Thanks guys.

Last edited by Moderns; 10-31-2009 at 05:48 PM..
windows_xp_2003 Moderns is offline     Reply With Quote
Old 10-31-2009, 05:50 PM   #2
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
CentOS 5.3 commands are similar to Redhat commands.

I hope to find answer soon here, waiting you.

Thanks.
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-01-2009, 09:35 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,044
Thanked: 224
In case of 2 computers connected through a crossover cable you don't need a gateway and specifically in your case, you have defined a gateway (192.168.1.1) that is not reachable by any of the 2 boxes.
If you want, you can set each gateway to the ip of the specific box, but leaving it blank it's not going to do any harm either.

Regards
linuxslackware bathory is offline     Reply With Quote
Old 11-01-2009, 09:41 AM   #4
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 664
Thanked: 20
Try running this
Code:
# mii-tool -v
If you have this utility it will show you if there is an active link
linux dxqcanada is offline     Reply With Quote
Old 11-01-2009, 03:58 PM   #5
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Smile Thanks!

Quote:
Originally Posted by bathory View Post
In case of 2 computers connected through a crossover cable you don't need a gateway and specifically in your case, you have defined a gateway (192.168.1.1) that is not reachable by any of the 2 boxes.
If you want, you can set each gateway to the ip of the specific box, but leaving it blank it's not going to do any harm either.

Regards
I removed this line: "route add default gw 192.168.1.1 eth0" from the file: /etc/sysconfig/network.

I can't ping from windows to Linux even from Linux to windows can't.

Last edited by Moderns; 11-01-2009 at 05:27 PM..
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-01-2009, 04:03 PM   #6
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Quote:
Originally Posted by dxqcanada View Post
Try running this
Code:
# mii-tool -v
If you have this utility it will show you if there is an active link
Yes this utility is working with me and I got positive results..

eth0: negotiated 100baseTx-FD flow-control, link ok
product info: vendor....
.
.
.
.

Last edited by Moderns; 11-01-2009 at 05:27 PM..
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-01-2009, 11:35 PM   #7
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Also I removed this line: "route add -net 192.168.1.0 netmask 255.255.255.0 eth0" from the file: /etc/sysconfig/network.

It doesn't work yet!
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-02-2009, 12:26 AM   #8
AdnanShaheen
LQ Newbie
 
Registered: Aug 2009
Location: dubai
Distribution: Suse, RedHat, CentOS, Solaris, Windows
Posts: 25
Thanked: 0
Use the trace route from windows (tracert) to Linux (traceroute) and vice versa. Post the result, may be that help any one.

If you can not ping, you must not be able to trace the route as well. Most important thing about CentOS is its security. Also check if you are allowed to ping to/from your Linux
windows_vista AdnanShaheen is offline     Reply With Quote
Old 11-02-2009, 12:54 AM   #9
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Quote:
Originally Posted by AdnanShaheen View Post
Use the trace route from windows (tracert) to Linux (traceroute) and vice versa. Post the result, may be that help any one.

If you can not ping, you must not be able to trace the route as well. Most important thing about CentOS is its security. Also check if you are allowed to ping to/from your Linux
Thanks Adnan, I will check tracert 192.168.1.4 (linux IP) and traceroute 192.168.1.3 (windows IP) and will post results here when I go to home as I am at work now.

Also I will check pinging from / to Linux and will inform you when I reach.

Many thanks.
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-02-2009, 01:13 AM   #10
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: ubuntu, suse, mepis, mint, redhat and mandrake
Posts: 87
Thanked: 6
Look first disconnect your Internet connection... From your router or other wise your router is going to try and send it out over the Internet... Since this is more then likely not a Cisco router... Just a cheap cable router its not going to recognise the local account and send it out over the world wide web.... No Cable company is going to give direct access to there network..
linuxmint culaterout is offline     Reply With Quote
Old 11-02-2009, 01:25 AM   #11
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Quote:
Originally Posted by culaterout View Post
Look first disconnect your Internet connection... From your router or other wise your router is going to try and send it out over the Internet... Since this is more then likely not a Cisco router... Just a cheap cable router its not going to recognise the local account and send it out over the world wide web.... No Cable company is going to give direct access to there network..

Thanks Culaterout for your comment.

Actually I was pinging from windows while connecting wireless to internet, will this cause problem? only I have crossover cable connecting both laptops.

Thanks.
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-02-2009, 01:28 AM   #12
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Please if I have any mistakes in network files let me know.
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-02-2009, 02:36 AM   #13
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: ubuntu, suse, mepis, mint, redhat and mandrake
Posts: 87
Thanked: 6
Quote:
Originally Posted by Moderns View Post
Thanks Culaterout for your comment.

Actually I was pinging from windows while connecting wireless to internet, will this cause problem? only I have crossover cable connecting both laptops.

Thanks.
No problem related...Ops sometimes I forget we have wireless???

Not a very secure measure is wireless so I stay away from it... Seeing

how I log into my bank account via internet...

later
linuxmint culaterout is offline     Reply With Quote
Old 11-02-2009, 04:49 AM   #14
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Quote:
Originally Posted by culaterout View Post
No problem related...Ops sometimes I forget we have wireless???

Not a very secure measure is wireless so I stay away from it... Seeing

how I log into my bank account via internet...

later
Actually I didn't get you, by the way, when I go to home after 3 hours, I will check solutions suggested by mates above and will report it here.

Thanks.
windows_xp_2003 Moderns is offline     Reply With Quote
Old 11-02-2009, 09:17 AM   #15
Moderns
LQ Newbie
 
Registered: Oct 2009
Posts: 14
Thanked: 0

Original Poster
Quote:
Originally Posted by AdnanShaheen View Post
Use the trace route from windows (tracert) to Linux (traceroute) and vice versa. Post the result, may be that help any one.

If you can not ping, you must not be able to trace the route as well. Most important thing about CentOS is its security. Also check if you are allowed to ping to/from your Linux
for Linux: the command will be in bold color

[root@localhost ~]# traceroute 192.168.1.3 //windows ip
traceroute to 192.168.1.3 (192.168.1.3) 30 hops max, 40 byte packets
1 (192.168.1.4) 2999.519 ms !H 2999.490 ms !H 2999.456 ms !H


[root@localhost ~]# traceroute 192.168.1.4 // linux ip
traceroute to 192.168.1.4 (192.168.1.4) 30 hops max, 40 byte packets
1 (192.168.1.4) 0.083 ms 0.021 ms 0.019 ms

Also I can ping Linux IP address 192.168.1.4

[root@localhost ~]# ping 192.168.1.4
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=0.051 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=0.053 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=64 time=0.051 ms
64 bytes from 192.168.1.4: icmp_seq=4 ttl=64 time=0.052 ms
64 bytes from 192.168.1.4: icmp_seq=5 ttl=64 time=0.049 ms
64 bytes from 192.168.1.4: icmp_seq=6 ttl=64 time=0.051 ms
.
.
.
.
.



Also I can ping in windows to same windows IP 192.168.1.3
windows_xp_2003 Moderns is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to ping a machine but can do ssh to machine , wanna run vnc client amolgupta Linux - Software 4 07-28-2009 06:17 PM
(Mepis) Windows machine cannot ping linux machine by IP mabtjie Linux - Networking 1 11-08-2008 10:54 AM
CentOS machine + XP machine = XP invisible for Linux achtung_linux Linux - Networking 10 08-18-2006 04:16 AM
Can't ping Linux box from Windows machine, and other networking oddities on Mandriva Adinsx88 Linux - Networking 2 05-10-2006 07:09 PM
Can't ping linux machine from windows Drunkalot Linux - General 1 10-14-2005 09:53 AM


All times are GMT -5. The time now is 11:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration