LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-03-2008, 04:19 AM   #1
rajlovesall
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Rep: Reputation: 0
can't ping from a linux to xp server


Hi, i am raj,
my system is a dual booting system, one is linux and another is xp.
also my network server is xp. In xp ip is 192.168.1.4, gatway is 192.168.1.1, I can ping to server 192.168.1.1 through xp, but in linux, can't ping to server. message is showing destination host unreachable. Also in xp, i got internet, but no get through linux. anyone please help.
 
Old 12-03-2008, 04:27 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
It is always helpful for guys around to help you if they know what distribution you are using.
You might not have configured your network card properly.
If you are sure your distro has detected and installed the card use the command ifconfig to see the configuration.
If you are using red hat linux use system-config-network to configure network and assign ip address, netmask and other details.
If you are using Ubuntu, you can do it graphically.
go to System > Administration > Network and complete the network details.
Other distributions can also configure your network graphically more or less the similar way.
 
Old 12-03-2008, 04:31 AM   #3
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 252

Rep: Reputation: 32
on command prompt type this netstat -rn. Make sure that there is a default route.
 
Old 12-03-2008, 04:34 AM   #4
rajlovesall
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
for redhat, I used this command "system-config-network" and put the ip is 192.168.1.4 and netmask 255.255.255.0, gatway 192.168.1.1, and also using to restart the service network that time no problem occur, but yet not ping to the server or other system through this linux platform and also easy to ping through xp platform to other systems and server, please help me

Last edited by rajlovesall; 12-03-2008 at 04:45 AM.
 
Old 12-03-2008, 04:53 AM   #5
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
iptables -F
 
Old 12-03-2008, 05:18 AM   #6
rajlovesall
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
hi, actually i am using xp and recently installed the redhat linux, and i am using system-config-network and put ip, netmask, and gatway, the gatway i am putting that is ipconfig command giving results that IP adress ...192.168.1.4, sub netmask 255.255.255.0, Default gatway 192.168.1.1, is shown and so i put this. also i flush the iptables and save. Actually I want internet from this xp server shared net. how can i get internet for the linux platform. Xp has no problem, internet is fine, ping to all system, but the only problem is linux, ping is not properly worked. self ping is ok and 127.0.0.1 is ok, but 192.168.1.1 is not ok, please give a solution for this
 
Old 12-03-2008, 05:25 AM   #7
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
Is it a so called SERVER of your or a Real SERVER out there?

If its a Real LAN server, I had the same problem of connection time out and connection refused... messages... I don't know how, this problem vanished itself and now I am able to connect to my LAN w$indows server using Fedora.

But my observation is, it was a server side problem ..... Now It accepts my connection and I surf.

Can you ping your server when your Firewall is disabled??

if no then it may be a server side prob.

Cheers!!
 
Old 12-03-2008, 05:26 AM   #8
chipotphe
Member
 
Registered: Nov 2007
Posts: 62

Rep: Reputation: 16
post output of

netstat -rn
ifconfig
route -n
 
Old 12-03-2008, 05:37 AM   #9
mohannad
LQ Newbie
 
Registered: May 2005
Location: jordan
Distribution: Slackware 14.1
Posts: 22

Rep: Reputation: 16
hi,
try to ifdown -a then ifup the interface you use to connect to the XP server, make sure internet connection sharing is enabled in windows .
 
Old 12-03-2008, 05:44 AM   #10
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
Hmm.. It seems like you are in exactly a situation I have been through..

Could you please elaborate some more?

Do you want to share you internet connection using tow LAN CARDS? if yes do you have a Crossed Wire Cable?

There is not limitation to write in detail.. so please feel free to discussing in detail.. I hope we, together can sort it out..

Cheers!!
 
Old 12-03-2008, 05:46 AM   #11
rajlovesall
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Rajmohan>ipiconfig
'ipiconfig' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\Rajmohan>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.4
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

C:\Documents and Settings\Rajmohan>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\Raj>ping 192.168.1.4

Pinging 192.168.1.4 with 32 bytes of data:

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

Ping statistics for 192.168.1.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\Raj>ping 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:

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

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\Raj>netstat -rn

Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 21 97 7f 12 23 ...... Realtek RTL8139 Family PCI Fast Ethernet NIC - P
acket Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.4 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.4 192.168.1.4 30
192.168.1.4 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.1.255 255.255.255.255 192.168.1.4 192.168.1.4 30
224.0.0.0 240.0.0.0 192.168.1.4 192.168.1.4 30
255.255.255.255 255.255.255.255 192.168.1.4 192.168.1.4 1
Default Gateway: 192.168.1.1
===========================================================================
Persistent Routes:
None

C:\Documents and Settings\Raj>ifconfig
'ifconfig' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\Raj>ifconfig
'ifconfig' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\Raj>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.4
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

C:\Documents and Settings\Raj>route -n

Manipulates network routing tables.

ROUTE [-f] [-p] [command [destination]
[MASK netmask] [gateway] [METRIC metric] [IF interface]

-f Clears the routing tables of all gateway entries. If this is
used in conjunction with one of the commands, the tables are
cleared prior to running the command.
-p When used with the ADD command, makes a route persistent across
boots of the system. By default, routes are not preserved
when the system is restarted. Ignored for all other commands,
which always affect the appropriate persistent routes. This
option is not supported in Windows 95.
command One of these:
PRINT Prints a route
ADD Adds a route
DELETE Deletes a route
CHANGE Modifies an existing route
destination Specifies the host.
MASK Specifies that the next parameter is the 'netmask' value.
netmask Specifies a subnet mask value for this route entry.
If not specified, it defaults to 255.255.255.255.
gateway Specifies gateway.
interface the interface number for the specified route.
METRIC specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database
file NETWORKS. The symbolic names for gateway are looked up in the host name
database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,
(wildcard is specified as a star '*'), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only
matching destination routes are printed. The '*' matches any string,
and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.
Diagnostic Notes:
Invalid MASK generates an error, that is when (DEST & MASK) != DEST.
Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1
The route addition failed: The specified mask parameter is invalid.
(Destination & Mask) != Destination.

Examples:

> route PRINT
> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2
destination^ ^mask ^gateway metric^ ^
Interface^
If IF is not given, it tries to find the best interface for a given
gateway.
> route PRINT
> route PRINT 157* .... Only prints those matching 157*
> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

CHANGE is used to modify gateway and/or metric only.
> route PRINT
> route DELETE 157.0.0.0
> route PRINT

C:\Documents and Settings\Raj>
 
Old 12-03-2008, 06:09 AM   #12
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
I thought it was a Linux related problem.. But all you have done is "ping xyzzzzz"from your windows system.....

what does it mean?

I had asked you a few questions.?????
 
Old 12-03-2008, 07:26 AM   #13
colonboy
Member
 
Registered: Dec 2005
Location: Prior Lake, MN
Distribution: Fedora, Suse, Mandriva, Ubuntu
Posts: 35

Rep: Reputation: 15
Raj,

When in Red Hat, would you post the output of the following:

netstat -rn
ifconfig
route -n

as requested earlier in this post by chipotphe? Thanks.

Colonboy
 
Old 12-03-2008, 08:08 AM   #14
mohannad
LQ Newbie
 
Registered: May 2005
Location: jordan
Distribution: Slackware 14.1
Posts: 22

Rep: Reputation: 16
ifconfig is a linux command not windows
 
Old 12-03-2008, 08:39 AM   #15
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
Post your out output.. which would pretty similar to this below!!



[root@Wazirkutz ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
x.x.x.x * 255.255.248.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth1
default x.x.x.x. 0.0.0.0 UG 0 0 0 eth0
[root@Wazirkutz ~]# ping x.x.x.x
PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
^C
--- x.x.x.x ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 8551ms



cheers!!
 
  


Reply



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
can not ping linux server gb1 Linux - Networking 4 02-06-2008 05:15 AM
Cannot Ping Linux Root Server mad_mike018 Linux - Networking 3 03-22-2006 12:53 PM
cannot ping linux server by dns gsrichmo Linux - Networking 1 08-25-2005 05:25 PM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
Help: Can't ping my linux server ben282 Linux - Networking 3 11-01-2001 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration