[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] PPP [was: Netifs routing]

From: Norberto R. de Goes Jr.
Subject: [lwip-users] PPP [was: Netifs routing]
Date: Wed, 9 Mar 2016 15:28:32 -0300

Hi, how are you?

I would like to understand what can be happening in my setup (attached figure). I have 03 VM´s (all with SO-Linux), just one with echo-server application, the others with echo-client app.

  -  eth0 and tty0 (pyshical netwoking and serial interfaces)
  -  running a server-echo app (lwip user). This app creates two netifs:
         >  netif-0:  connected to eth0 - ip:, mask:
         >  netif-1:  connected to serial (PPP protocol) - ip:, mask:
  - Then it binds to "IP_ADDR_ANY" address to receive packages (netconn_recv). 

  - pyshical network interface (eth0) connected to same subnetwork of "VM-lwip".

  - pyshical serial interface (PPP) connected to "VM-lwip"

I do not use TUN/TAP and brigde. The "access" components shown in the attached figure can receive/transmit data from/to eth and serial. That works fine, no problem.  

When I run the echo-client from VM-0 sending packets to IP associated to netif-0, all works fine, no problem.
But when I run the echo-client from VM-1(PPP stablished) sending packets to netif-1 IP adrress, the lwip processes the packages and put the reply packages to netif-0.

I have been investigating  and I think that the problem is associated to PPP netif netmask (ever Please, see the "get_mask" function  and "netif_add" call both codes in the "lwip/src/netif/ppp/ppp.c" file.
Thus, the "ip4_route" function does not match the appropriate netif, in this case the netif-1, and returns the default-netif (netif-0, associated to eth0). Then the outgoing packets are forwarding to eth and not to serial. When the client-echo is run in VM#0 the all works fine because the match happens.

Please, is it correct?

PS: Sergio R. Caprile tried to help me about this issue.
( http://lists.nongnu.org/archive/html/lwip-users/2016-02/msg00069.html )


Norberto R. de Goes Jr.
Tel.: +55 19 3705-4241 / Fax: +55 19 3705-6125

Attachment: setup_eth_ppp.jpg
Description: JPEG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]