Författare:
Per Stenebo
Per Stenebo
Skapad:
2015-07-31 19:04:35
2015-07-31 19:04:35
Ändrad:
2017-12-26 06:27:51
2017-12-26 06:27:51
PPP
Point-to-Point Protocol
| wikipedia | pppd man page | tldp -ppp direct serial | tldp -manual ppp connection | Connect the Raspberry Pi to network using UART | Increase baudrate and other tweakings |
IP-network over serial connection with PPP
Install ppp on both klient and server: sudo apt-get install ppp
Connect client to server with a serial connection. Example for Raspberry Pi here (USB on the server end).
Disable system stdin/stdout on the used tty.
ppp options can be given in:
- As temporary settings with command line options (like below)
- As per-connection settings in a file like /etc/ppp/peers/filename
The filename can then be used with sudo pon filename and sudo poff filename - As global setting in the file /etc/ppp/options
Server
Enable IPv4 forward: sudo nano /etc/sysctl.conf
Uncomment the line: net.ipv4.ip_forward=1
Test:
sudo stty -F /dev/ttyUSB0 raw sudo pppd /dev/ttyUSB0 115200 192.168.0.200:192.168.0.201 proxyarp local noauth debug nodetach dump nocrtscts passive persist maxfail 0 holdoff 1
Permanent:
sudo nano /etc/rc.local pppd /dev/ttyUSB0 115200 192.168.0.100:192.168.0.101 proxyarp local noauth nocrtscts passive persist maxfail 0 holdoff 1 >> /tmp/ppp_listen.out 2>&1
Klient
Test:
stty -F /dev/ttyAMA0 raw sudo pppd /dev/ttyAMA0 115200 192.168.0.101:192.168.0.100 noauth local debug dump defaultroute usepeerdns nocrtscts
Permanent:
sudo nano /etc/rc.local pppd /dev/ttyAMA0 115200 192.168.0.101:192.168.0.100 noauth local defaultroute usepeerdns nocrtscts >> /tmp/ppp_connect.out 2>&1