LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   I am not able to send data from one PC to another PC which are in LAN (https://www.linuxquestions.org/questions/linux-networking-3/i-am-not-able-to-send-data-from-one-pc-to-another-pc-which-are-in-lan-4175467561/)

ManikantaVelaga 06-27-2013 04:28 AM

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

gdejonge 06-27-2013 05:45 AM

What command did you use when you got the error message?


Cheers

ManikantaVelaga 06-27-2013 05:54 AM

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

ManikantaVelaga 06-27-2013 07:01 AM

Do i need to add any route by using linux route command?

ManikantaVelaga 06-27-2013 07:22 AM

Hi Kimgiarakura,

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

Thanks
Manikanta Velaga

lleb 06-28-2013 04:36 PM

what applications are you using, what distros are you running, what are the settings of SELinux and IPTables as well as their status?

ManikantaVelaga 06-29-2013 02:41 AM

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

lleb 06-29-2013 11:26 AM

Quote:

Originally Posted by ManikantaVelaga (Post 4980641)
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>

M4nd4R 07-09-2013 08:49 AM

Try Secure Shell and make sure that TCP ports # 22 on each of your machines are open.

timl 07-09-2013 06:37 PM

Quote:

Originally Posted by ManikantaVelaga (Post 4980641)
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

DutchGeek 07-10-2013 04:25 PM

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.


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