ESP8266 Developer Zone The Official ESP8266 Forum 2018-08-06T20:52:20+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=960 2018-08-06T20:52:20+08:00 2018-08-06T20:52:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=22564#p22564 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> do you have an implementation example?

Statistics: Posted by DanieliCy — Mon Aug 06, 2018 8:52 pm


]]>
2017-09-25T18:41:44+08:00 2017-09-25T18:41:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=16014#p16014 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> I have a project from college that is to implement a mesh network using NodeMCU's. I was advised to look up your project, because it may help me. I have a root node, which will be connected to a sensor and I need to pass this information through all the node to reach its destination. I tried to implement it, but I'm having problems with ESP running as SoftAP and Station at the same time. Do you think it could you help me?

Statistics: Posted by fabiana.ferreira — Mon Sep 25, 2017 6:41 pm


]]>
2017-01-22T17:17:33+08:00 2017-01-22T17:17:33+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=11169#p11169 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]>
Have just pushed a version of the lib to https://github.com/martin-ger/esp-open-lwip. A little bit cleaner and with a header for the NAPT API.

Statistics: Posted by martin_g — Sun Jan 22, 2017 5:17 pm


]]>
2017-01-18T15:02:59+08:00 2017-01-18T15:02:59+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=11127#p11127 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> I tried your binaries, is very nice
Now,I want to try to port it to ESP32, can i use nat change of ip.c in "https://github.com/martin-ger/esp-open-lwip/tree/nat" to get it?

Statistics: Posted by daiyinger — Wed Jan 18, 2017 3:02 pm


]]>
2016-12-09T07:54:36+08:00 2016-12-09T07:54:36+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=10849#p10849 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> https://github.com/martin-ger/esp-open-lwip/tree/nat.

Added a full functional WiFi repeater (correctly: a WiFI NAT Router) at https://github.com/martin-ger/esp_wifi_repeater.

It is a proof of concept implementation of a WiFi NAT router on the esp8266. It can be used as range extender for an existing WiFi network. The esp acts as STA and as soft-AP and transparently forwards any IP traffic through it. As it uses NAT no routing entries are required neither on the network side nor on the connected stations. Stations are configured via DHCP in the 192.168.4.0/24 net and receive their DNS responder address from the existing WiFi network.

Statistics: Posted by martin_g — Fri Dec 09, 2016 7:54 am


]]>
2016-12-05T03:46:28+08:00 2016-12-05T03:46:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=10772#p10772 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]>
Now I have a WiFi-Repeater running on an esp8266, actually an ESP-01.
I had some issues with the IP and TCP-checksums for modified packets in the uploaded version. Finally fixed it with the orgiginal code from RFC 1631. Also updated the DHCP server to distribute DNS server addresses other than the own AP address.

Now it connects as STA with my home WiFi and offers its own SSID as AP to other devices. Works as guest-WiFi or as range extender. Throughput ist just fine even with a laptop or a smartphone as client. I am just connected via it.

If anybody ist interested, ask me. Will clean it up and post it here.

Statistics: Posted by martin_g — Mon Dec 05, 2016 3:46 am


]]>
2016-10-12T21:33:49+08:00 2016-10-12T21:33:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=10132#p10132 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]>
Network outline:
Image

The patch:
https://github.com/NeoCat/esp8266-Ardui ... d3f178bcbe

Statistics: Posted by neocat — Wed Oct 12, 2016 9:33 pm


]]>
2015-08-20T15:48:59+08:00 2015-08-20T15:48:59+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3327#p3327 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> Statistics: Posted by eriksl — Thu Aug 20, 2015 3:48 pm


]]>
2015-08-20T15:16:41+08:00 2015-08-20T15:16:41+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3326#p3326 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> maybe I will have to implement something to transfer packets between station and softap. I still wonder what IP_FORWARD of lwip does :?

Statistics: Posted by ajay.bhargav — Thu Aug 20, 2015 3:16 pm


]]>
2015-08-20T01:05:45+08:00 2015-08-20T01:05:45+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3320#p3320 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> - route packets between a STA connected to the ESP's SOFT-AP and the internet (or some other box) connected via the ESP's STA and your standard AP then you're looking for routing and the ESP does have two interfaces with separate IPs for the two functions (SOFT-AP and STA)
- route packets between multiple STAs connected to the ESP's SOFT-AP then you're looking neither for routing nor bridging but layer-2 forwarding of packets at the SOFT-AP level

Statistics: Posted by tve — Thu Aug 20, 2015 1:05 am


]]>
2015-08-19T18:12:05+08:00 2015-08-19T18:12:05+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3319#p3319 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]>
What you're looking for is really client isolation (or correctly: disabling it).

Espressif will have to make that available.

Statistics: Posted by eriksl — Wed Aug 19, 2015 6:12 pm


]]>
2015-08-19T00:24:46+08:00 2015-08-19T00:24:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3297#p3297 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]>
eriksl wrote:
I don't understand what you're trying to do with routing. For routing you need two LAYER 3 interfaces. The esp8266 has only one. Out of the box it can't use multiple SSIDs nor VLAN tags, so???

Aren't you confusing routing with bridging? An access point usually can be configured to enable or disable it ("client isolation").

You're right I am confused. I actually do not want routing it is a wrong word to use here.
PC (192.168.0.2) <-> (192.168.0.3) ESP1 in STA+AP (192.168.4.1) <> (192.168.4.2)ESP2
So basically I just my pc to see device (ESP2) on the other end of ESP1. I should be able to ping 192.168.4.2 from 192.168.0.2 .. something...
So I should say NAT or Bridge? NAT seems more appropriate here? I have a doubts can SOFTAP and STATION be considered as two wifi interfaces?

Sorry for asking too many questions... :roll:

Statistics: Posted by ajay.bhargav — Wed Aug 19, 2015 12:24 am


]]>
2015-08-18T19:43:24+08:00 2015-08-18T19:43:24+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3293#p3293 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]>
Aren't you confusing routing with bridging? An access point usually can be configured to enable or disable it ("client isolation").

Statistics: Posted by eriksl — Tue Aug 18, 2015 7:43 pm


]]>
2015-08-18T18:27:47+08:00 2015-08-18T18:27:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3291#p3291 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> Open source LWIP for esp_iot_sdk_v1.3.0

and enabled IP_FORWARD which as per lwip suppose to make stack to route packet between networks.

Code:

/**                                                                             
 * IP_FORWARD==1: Enables the ability to forward IP packets across network       
 * interfaces. If you are going to run lwIP on a device with only one network   
 * interface, define this to 0.                                                 
 */


I am assuming we are having two different interfaces STATION_IF and SOFTAP_IF. I am not sure if thats true... It would be really great if espressif can have a simple routing feature. Has anyone else tried doing this?

Statistics: Posted by ajay.bhargav — Tue Aug 18, 2015 6:27 pm


]]>
2015-08-18T16:09:17+08:00 2015-08-18T16:09:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3288#p3288 <![CDATA[Re: ESP8266 lwip IP_FORWARD/routing]]> Statistics: Posted by eriksl — Tue Aug 18, 2015 4:09 pm


]]>
2015-08-18T05:39:56+08:00 2015-08-18T05:39:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=960&p=3277#p3277 <![CDATA[ESP8266 lwip IP_FORWARD/routing]]> Thank you so much for this...
Now my setup is like this:
pc<->router<->(sta)esp(ap)<->esp2(sta)
I want to ping esp2 from my pc. I enabled IP_FORWARD in lwipopts.h and rebuild sdk. esp2 connects to esp (also connected to router). But I am not able to ping esp2 from PC. So my question is it possible for esp8266 to forward ip packets between station and AP interfaces? Has anyone tried it? It will be a really helpful thing to implement if we want to use esp as a gateway to internet or something similar.

Please let me know if anyone else is trying something similar.

Regards,
Ricky

Statistics: Posted by ajay.bhargav — Tue Aug 18, 2015 5:39 am


]]>