[En-Nut-Discussion] TCP connection to fixe IP

ennut at thezachariasgroup.com ennut at thezachariasgroup.com
Mon Oct 12 23:47:44 CEST 2009


   Gilles,
   I see multiple problems.
1.) You will only have connectivity between 
192.168.xxx.yyy addresses on a local network 
because these are local IP addresses.
They will not go out of the local network onto 
the internet with these 192.168 based addresses. 
Your router will convert these 192.168 based IP addresses
to an IP Address and port number that is actually 
accessible from the internet. The router won't 
even try to convert a destination address
starting with 192.168 to an internet address.

2.) Assuming the subnet mask is 255.255.255.0, your "not good" example shows a
device IP of 192.168.1.1 with a gateway of 
192.168.0.254. These are not compatible.

To communicate with a distant PC, one of the 
devices need to have a fixed IP Address that is not a local address.
The other unit then must connect to the PC with the fixed IP Address.

   Zack



At 05:12 PM 10/12/2009, you wrote:
>Bonjour Ole,
>
>1) As I said in my previous Email, the code works correctly in a local
>network BUT with respect of the IP range.
>Example:
>
>GOOD: device IP = 192.168.0.1     and   gateway IP = 192.168.0.254
>
>NOT GOOD : device IP = 192.168.1.1     and   gateway IP = 192.168.0.254
>
>In that case, the gateway IP is force to 0.0.0.0 by NutOS
>
>How can I bypass the 0.0.0.0 change ?
>
>2) I have redo some test between my ARM9 and a distant PC to be able to give
>you more details about this type of connection. Actually, the error received
>is : Time out
>Firewall have check and seems correct.
>No TCPIP message can be send out to an external IP
>
>Best regards
>Gilles
>
>-----Original Message-----
>From: Ole Reinhardt [mailto:ole.reinhardt at embedded-it.de]
>Sent: lundi 5 octobre 2009 09:55
>To: gilles at palmcom.fr; Ethernut User Chat (English)
>Subject: Re: [En-Nut-Discussion] TCP connection to fixe IP
>
>Hi Gilles,
>
> > I have developed a piece of code to establish a dialog between my ARM9
>board
> > and a PC in 2 different location.(2 different IP fix addresses)
> > When the PC establish the TCP link ,  the ARM9 receive and respond to the
> > TCP frame correctly.
> > If I try to establish the TCP dialog starting from the ARM9, it fails on
>the
> > NutTcpConnect(sock1,dest_addr, PortSend)
> > All is good if I stay inside my office network.
>
>Are you sure there is neither a masquerading (NAT) nor any other kind of
>firewall between the pc and your board? Have you correctly set your
>gateways on both entities?
>
>Have you checked the error code after the failed connect with
>NutTcpError()? It might give you a hint what is going wrong.
>
>Regards,
>
>Ole Reinhardt
>
>--
>  _____________________________________________________________
>|                                                             |
>| Embedded-IT                                                 |
>|                                                             |
>| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
>| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
>| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
>| Germany              Web:         http://www.embedded-it.de |
>|_____________________________________________________________|
>
>
>_______________________________________________
>http://lists.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list