[bug #54914] lwIP-> connection failed from different network

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
URL:
  <https://savannah.nongnu.org/bugs/?54914>

                 Summary: lwIP-> connection failed from different network
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ajsndd
            Submitted on: Mon 29 Oct 2018 09:39:45 PM UTC
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 1.4.1

    _______________________________________________________

Details:

Hi,

I am facing issues in two different type IP address.
Not able to connect from my host device to embedded device if I am configuring
as below.

device IP: 10.236.155.30
      SBM: 255.255.255.224
      GW : 10.236.155.1


PC IP    : 10.236.26.180
   SBM   : 255.255.255.192
   GW    : 10.236.26.129


But it is working when I change PC IP to 10.236.155.24

Kindly help this



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 29 Oct 2018 09:39:45 PM UTC  Name: NCS_ISSUE.png  Size: 312KiB   By:
ajsndd

<http://savannah.nongnu.org/bugs/download.php?file_id=45324>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Update of bug #54914 (project lwip):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #1:

So, it doesn't work with a broken configuration, what do you expect ?

10.236.155.30 is not within 10.236.26.128/26, it can't work.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Follow-up Comment #2, bug #54914 (project lwip):

Hi,

With same configuration another one ETHERNET to SERIAL MODULE is working. If I
am using that module then our device is working.

Our client want to use the same network configurations.
Please find the attached image for client requirement.
Please help

(file #45325)
    _______________________________________________________

Additional Item Attachment:

File name: client netowrk config details.png Size:45 KB


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Follow-up Comment #3, bug #54914 (project lwip):

Hi,

Do have any settings change for this network access?

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Follow-up Comment #4, bug #54914 (project lwip):

I'd say your gateways are not working correctly.

Since 10.236.155.30 and 10.236.26.180 are not in the same subnet according to
you netmask, lwIP and the PC should be trying to communicate via the gateways
(10.236.155.1 and 10.236.26.129). If you have a network tap or a managed
switch with monitoring port, try to capture the traffic of the embedded device
and check if it contacts the gateway. On the PC, wireshark will tell you
whether the PC contacts the gateway. I'm 99% sure they both do and there is
something wrong with your gateways.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Follow-up Comment #5, bug #54914 (project lwip):

I don't think this is a broken IP config. The two hosts should just communicat
via gateways. This should just work. You're probably doing something wrong.

I can only repeat what I wrote in the last bug entry you submitted: this is
not a bug in lwIP but somewhere in your code.

PLEASE DONT OPEN YET ANOTHER BUG: if you have more questions, please use the
lwip-users mailing list for discussion!

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Follow-up Comment #6, bug #54914 (project lwip):

Based on the NCS_ISSUE.png attached file, there are only two devices in one
Ethernet segment, the board running lwIP and a PC, no gateway. Unless the
network diagram is totally wrong it can't work :-)

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #54914] lwIP-> connection failed from different network

madhu
Follow-up Comment #7, bug #54914 (project lwip):

Hmm, ok, if it's really like that, it can't work...

Now I'm confused :-/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: [bug #54914] lwIP-> connection failed from different network

AJEESH SAHADEVAN
Hi

Attached router configurations also.

On Wed, Oct 31, 2018 at 2:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

The situation recreated , 
Now we are using one CISCO router.

1. LAPTOP is connected to CISCO router WAN port and  and lwIP device connected to LAN port of the router.

NCS(lwIP device) details
10.236.155.24
255.255.255.224
10.236.155.1

LAPTOP
10.236.26.180
255.255.255.192
10.236.26.129

In the above situation another one ethernet to serial module is working. But lwIP device not working.


2. LAPTOP is connected to CISCO router LAN port and  and lwIP device connected to WAN port of the router.
   Now the lwIP device is working fine

On Wed, Oct 31, 2018 at 1:46 AM Simon Goldschmidt <[hidden email]> wrote:
Follow-up Comment #7, bug #54914 (project lwip):

Hmm, ok, if it's really like that, it can't work...

Now I'm confused :-/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel

router conf1.png (202K) Download Attachment
router conf2.png (214K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [bug #54914] lwIP-> connection failed from different network

AJEESH SAHADEVAN
Hi,

More details attached


On Wed, Oct 31, 2018 at 11:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi

Attached router configurations also.

On Wed, Oct 31, 2018 at 2:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

The situation recreated , 
Now we are using one CISCO router.

1. LAPTOP is connected to CISCO router WAN port and  and lwIP device connected to LAN port of the router.

NCS(lwIP device) details
10.236.155.24
255.255.255.224
10.236.155.1

LAPTOP
10.236.26.180
255.255.255.192
10.236.26.129

In the above situation another one ethernet to serial module is working. But lwIP device not working.


2. LAPTOP is connected to CISCO router LAN port and  and lwIP device connected to WAN port of the router.
   Now the lwIP device is working fine

On Wed, Oct 31, 2018 at 1:46 AM Simon Goldschmidt <[hidden email]> wrote:
Follow-up Comment #7, bug #54914 (project lwip):

Hmm, ok, if it's really like that, it can't work...

Now I'm confused :-/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel

network issue in lwIP stack enabled device..pdf (405K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [bug #54914] lwIP-> connection failed from different network

Jens Nielsen
You're still on the wrong list, send your request to the lwip-users list instead (including a Wireshark trace on the LAN side showing the ping sent to lwip with no response)

On 2018-10-31 20:33, AJEESH SAHADEVAN wrote:
Hi,

More details attached


On Wed, Oct 31, 2018 at 11:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi

Attached router configurations also.

On Wed, Oct 31, 2018 at 2:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

The situation recreated , 
Now we are using one CISCO router.

1. LAPTOP is connected to CISCO router WAN port and  and lwIP device connected to LAN port of the router.

NCS(lwIP device) details
10.236.155.24
255.255.255.224
10.236.155.1

LAPTOP
10.236.26.180
255.255.255.192
10.236.26.129

In the above situation another one ethernet to serial module is working. But lwIP device not working.


2. LAPTOP is connected to CISCO router LAN port and  and lwIP device connected to WAN port of the router.
   Now the lwIP device is working fine

On Wed, Oct 31, 2018 at 1:46 AM Simon Goldschmidt <[hidden email]> wrote:
Follow-up Comment #7, bug #54914 (project lwip):

Hmm, ok, if it's really like that, it can't work...

Now I'm confused :-/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: [bug #54914] lwIP-> connection failed from different network

AJEESH SAHADEVAN
In reply to this post by AJEESH SAHADEVAN
Hi,

The issue has been resolved by upgrading new lwiP stack. But did some tweak in ip_route function to achieve.

    /* is the netif up, does it have a link and a valid address? */
    if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
      /* network mask matches? */
return netif;
   #ifdef __NETMASK_COMPARE__  
 if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
        /* return netif on which to forward IP packet */
        return netif;
      }
#endif

Could you please suggest any better way for this ?

On Thu, Nov 1, 2018 at 1:03 AM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

More details attached


On Wed, Oct 31, 2018 at 11:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi

Attached router configurations also.

On Wed, Oct 31, 2018 at 2:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

The situation recreated , 
Now we are using one CISCO router.

1. LAPTOP is connected to CISCO router WAN port and  and lwIP device connected to LAN port of the router.

NCS(lwIP device) details
10.236.155.24
255.255.255.224
10.236.155.1

LAPTOP
10.236.26.180
255.255.255.192
10.236.26.129

In the above situation another one ethernet to serial module is working. But lwIP device not working.


2. LAPTOP is connected to CISCO router LAN port and  and lwIP device connected to WAN port of the router.
   Now the lwIP device is working fine

On Wed, Oct 31, 2018 at 1:46 AM Simon Goldschmidt <[hidden email]> wrote:
Follow-up Comment #7, bug #54914 (project lwip):

Hmm, ok, if it's really like that, it can't work...

Now I'm confused :-/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: [bug #54914] lwIP-> connection failed from different network

goldsimon@gmx.de
Have you read Jens' reply??? (wrong list etc.)

Simon


On 04.11.2018 10:26, AJEESH SAHADEVAN wrote:
Hi,

The issue has been resolved by upgrading new lwiP stack. But did some tweak in ip_route function to achieve.

    /* is the netif up, does it have a link and a valid address? */
    if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
      /* network mask matches? */
return netif;
   #ifdef __NETMASK_COMPARE__  
 if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
        /* return netif on which to forward IP packet */
        return netif;
      }
#endif

Could you please suggest any better way for this ?

On Thu, Nov 1, 2018 at 1:03 AM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

More details attached


On Wed, Oct 31, 2018 at 11:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi

Attached router configurations also.

On Wed, Oct 31, 2018 at 2:00 PM AJEESH SAHADEVAN <[hidden email]> wrote:
Hi,

The situation recreated , 
Now we are using one CISCO router.

1. LAPTOP is connected to CISCO router WAN port and  and lwIP device connected to LAN port of the router.

NCS(lwIP device) details
10.236.155.24
255.255.255.224
10.236.155.1

LAPTOP
10.236.26.180
255.255.255.192
10.236.26.129

In the above situation another one ethernet to serial module is working. But lwIP device not working.


2. LAPTOP is connected to CISCO router LAN port and  and lwIP device connected to WAN port of the router.
   Now the lwIP device is working fine

On Wed, Oct 31, 2018 at 1:46 AM Simon Goldschmidt <[hidden email]> wrote:
Follow-up Comment #7, bug #54914 (project lwip):

Hmm, ok, if it's really like that, it can't work...

Now I'm confused :-/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54914>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel