Find the answer to your Linux question:
Results 1 to 4 of 4
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 ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    3

    Exclamation Can't Ping Linux CentOS 5.3 Machine to XP SP2 Windows Machine

    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.

  2. #2
    Just Joined!
    Join Date
    Oct 2009
    Posts
    3
    CentOS 5.3 commands are similar to Redhat commands.

    I hope to find answer soon here, waiting you.

    Thanks.

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    I like clean config files so lets start out with the simple things.


    Quote Originally Posted by Moderns View Post
    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.
    Ensure the firewall is turned off.

    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
    GATEWAY=192.168.1.1
    Remove the RED statements above. They are not needed.
    Add the BLUE statement to this file


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

    DEVICE="eth0"
    HWADDR=00:08:0D:EE:19:66
    IPADDR="192.168.1.4"
    NETMASK="255.255.255.0"
    ONBOOT="yes"
    BOOTPROTO="yes"
    BOOTPROTO="static"
    Add the first BLUE line and replace the RED statement with the second BLUE statement.

    After the above is done restart the network with;

    Code:
    service network restart
    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.
    How did you test the cable?

    Post the output from the following command;

    Code:
    route -n
    On the windows maching please post the output from the following;
    Code:
    route print

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #4
    Just Joined!
    Join Date
    Oct 2009
    Posts
    3

    Smile

    Hi Robert,

    Thank you very much for your efforts.

    Actually I just solved the problem before few hours and had internet connection problem couldn't post here immediately.

    I removed all gateway statments like:

    "Default Gatway: 192.168.1.1"
    "route add -net 192.168.1.0 netmask 255.255.255.0 eth0"
    "route add default gw 192.168.1.1 eth0" from Linux files also didn't include it in windows.

    The problem was the driver of Local Area Network (LAN), it was not the right driver, I changed the driver to the correct one and now able to ping from linux to windows and vise verse.

    However your comments are so useful and I will take them in regards.

    Thanks again and I hope it's clear to all

    Regards,
    Moderns

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...