michi-jung commented on PR #9396:
URL: https://github.com/apache/nuttx/pull/9396#issuecomment-1565912742

   > @michi-jung did you test with Linux? 
http://patrickst.blogspot.com/2011/11/tcpip-over-slip-on-gnulinux-ubuntu.html
   
   Hi @acassis, yes, only on Debian 11 (bullseye).  To setup a point-to-point 
connection the following was sufficient for me (as root or with an account with 
sufficient capabilities):
   
   ```
   slattach -L -s 115200 -p slip /dev/ttyUSB0 &
   ifconfig sl0 10.0.0.1 pointtopoint 10.0.0.2 up
   route add 10.0.0.2 dev sl0
   ```
   
   To enable access to the network access from you devices to the wider 
network, you have to enable ip forwarding and network address translation on 
the host:
   
   ```
   echo 1 > /proc/sys/net/ipv4/ip_forward
   iptables -t nat -A POSTROUTING -o enp0s31f6 -j MASQUERADE
   iptables -A FORWARD -i enp0s31f6 -o sl0 -m state --state RELATED,ESTABLISHED 
-j ACCEPT
   iptables -A FORWARD -i enp0s31f6 -o sl0 -m state --state RELATED,ESTABLISHED 
-j ACCEPT
   ```
   
   Since the MTU for SLIP is very small (296 bytes), IP packets from the 
internet will often be fragmented by the host before being forwarded to the 
device.  Thus, you should have IP defragmentation enabled in NuttX 
(`CONFIG_NET_IPFRAG=y`).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to