LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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
  Search this Thread
Old 06-27-2013, 04:28 AM   #1
ManikantaVelaga
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Rep: Reputation: Disabled
I am not able to send data from one PC to another PC which are in LAN


Hello All,

i have 192.168.1.X network in my home.
router ip is :192.168.1.1.

I am trying to establish a connection between a TCP server and a TCP client which are running in two different machines. But it was not success.

Client side i am receiving error is:
"No route to host"

I am running the TCP server in 192.168.1.2 machine and
TCP client in 192.168.1.3 machine.

ping is working from both sides.

what could be the problem? please help me

Thanks
Manikanta Velaga
 
Old 06-27-2013, 05:45 AM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
What command did you use when you got the error message?


Cheers
 
Old 06-27-2013, 05:54 AM   #3
ManikantaVelaga
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Not commands, these TCP Server and TCP client are programs.

In TCP client program,
connect() call is failing and returning the error code:"No route to host"



Thanks &Regards
Manikanta Velaga
 
Old 06-27-2013, 07:01 AM   #4
ManikantaVelaga
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Do i need to add any route by using linux route command?
 
Old 06-27-2013, 07:22 AM   #5
ManikantaVelaga
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Hi Kimgiarakura,

I am not able read your reply, can you please reply in English?

Thanks
Manikanta Velaga
 
Old 06-28-2013, 04:36 PM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
what applications are you using, what distros are you running, what are the settings of SELinux and IPTables as well as their status?
 
Old 06-29-2013, 02:41 AM   #7
ManikantaVelaga
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Hi lleb,
Thanks for the reply.

I am using fedora linux on both the machines.
I am running simple TCP server program and simple TCP client program developed using C-langauage.
How can i see the IPTables status on both the machines? please let me know.

Thanks
Manikanta Velaga
 
Old 06-29-2013, 11:26 AM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by ManikantaVelaga View Post
Hi lleb,
Thanks for the reply.

I am using fedora linux on both the machines.
I am running simple TCP server program and simple TCP client program developed using C-langauage.
How can i see the IPTables status on both the machines? please let me know.

Thanks
Manikanta Velaga
what vs. of Fedora, there is a big difference between Fedora 14 and the most current Fedora 18/19.

You still have not told us what application you are running. a description is not the same thing as the name of the application. each application will function differently.

google is your friend for IPTables. the search would be howto IPTables Fedora <put the number here>
 
Old 07-09-2013, 08:49 AM   #9
M4nd4R
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Rep: Reputation: Disabled
Try Secure Shell and make sure that TCP ports # 22 on each of your machines are open.
 
Old 07-09-2013, 06:37 PM   #10
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
Quote:
Originally Posted by ManikantaVelaga View Post
Hi lleb,

I am running simple TCP server program and simple TCP client program developed using C-langauage.
What port are you using to communicate? Do you need to open the port on your firewall?

I don't want to second guess your abilities but the following website is something of a 101 guide (to me) regarding network programming. Perhaps you can try one of Beej's client/server programs and see whether they work

http://beej.us/guide/bgnet/

Cheers
 
Old 07-10-2013, 04:25 PM   #11
DutchGeek
Member
 
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Rep: Reputation: 10
Since the machines can ping each other, I would start with checking what port are you using in your program and see if it is being filtered by either of them. If it is, then open it. You need to check your Fedora documentation on how to do that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to send data to WAN Interface card at Data link Layer in linux environment krishna_karne Linux - Software 0 05-09-2008 04:01 AM
Postfix won't send send to outside LAN kotori Linux - Server 11 11-13-2006 06:16 AM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM
LAN interface on Gateway stops being able to send info to LAN intermittantly. BurnFEST Debian 2 11-01-2003 03:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:30 PM.

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