PPP
Point-to-Point Protocol (PPP) in RouterOS mobile networking provides a method for establishing direct connections between two network nodes over serial interfaces, including cellular modems. While modern LTE interfaces typically use direct IP connectivity, PPP remains important for legacy modem support and specific use cases requiring PPP encapsulation.
Overview
Section titled “Overview”PPP in the mobile networking context serves two primary purposes:
- PPP Client: Connecting to cellular networks via modems that require PPP encapsulation (common with older 3G modems and certain LTE modems)
- PPP Server: Accepting incoming PPP connections over cellular for remote access scenarios
PPP provides features not available with direct IP interfaces, including:
- Authentication (PAP, CHAP, MS-CHAPv1, MS-CHAPv2)
- Link quality monitoring
- Dynamic IP address assignment
- Compression negotiation
- Error detection
PPP Client
Section titled “PPP Client”The PPP client creates outbound PPP connections through cellular modems. This mode is used when the cellular network requires PPP authentication or when the modem operates in PPP mode.
Interface Creation
Section titled “Interface Creation”Create a PPP client interface for a cellular modem that exposes a serial port:
/interface ppp-clientadd apn=internet dial-on-demand=no disabled=no port=usb1 \ name=ppp-out1 password=internet user=internetPPP Client Properties
Section titled “PPP Client Properties”| Property | Description | Default |
|---|---|---|
| add-default-route | Add default route to peer | no |
| allow | Allowed authentication methods | mschap2,mschap1,chap,pap |
| apn | Access Point Name for the cellular network | - |
| default-route-distance | Distance for auto-added default route | - |
| dial-on-demand | Connect only when traffic is generated | no |
| disabled | Enable/disable the interface | yes |
| port | Serial or modem port to use | - |
| max-mru | Maximum Receive Unit | 1500 |
| max-mtu | Maximum Transmission Unit | 1500 |
| mrru | Maximum Reconstructed Receive Unit | disabled |
| name | Interface name | - |
| password | Authentication password | - |
| profile | PPP profile to use | default |
| user | Authentication username | - |
Configuration Example
Section titled “Configuration Example”Basic PPP client for a modem on usb1:
/interface ppp-clientadd apn=internet authentication=chap port=usb1 name=ppp-out1 \ password=internet user=internet
/interface ppp-client enable ppp-out1
/interface ppp-client monitor ppp-out1Expected output:
status: connected dial-status: connected uptime: 2m23s service-name: internet ipaddress: 10.128.XXX.XXX dns-server: 10.128.XXX.XXX mtu: 1500 mru: 1500Adding Default Route
Section titled “Adding Default Route”Automatically add a default route when PPP connects:
/interface ppp-clientadd apn=internet add-default-route=yes default-route-distance=10 \ port=usb1 name=ppp-out1 password=internet user=internetDial-on-Demand
Section titled “Dial-on-Demand”Enable dial-on-demand to connect only when traffic requires it:
/interface ppp-clientadd apn=internet dial-on-demand=yes port=serial0 name=ppp-out1 \ password=internet user=internetWith dial-on-demand, the connection remains dormant until outbound traffic is generated, saving data usage.
PPP Server
Section titled “PPP Server”The PPP server accepts incoming PPP connections, enabling remote access scenarios where clients dial into the router over cellular networks.
Enabling PPP Server
Section titled “Enabling PPP Server”Configure the router to accept PPP connections:
/interface ppp-serveradd name=ppp-in1Server Properties
Section titled “Server Properties”| Property | Description | Default |
|---|---|---|
| authentication | Allowed authentication methods | pap,chap,mschap1,mschap2 |
| data-channel | Data channel number | 0 |
| max-mru | Maximum Receive Unit for clients | 1500 |
| max-mtu | Maximum Transmission Unit for clients | 1500 |
| modem-init | Modem initialization string | - |
| mrru | Maximum Reconstructed Receive Unit | disabled |
| name | Server name | - |
| null-modem | Enable null-modem mode | no |
| port | Serial port to listen on | - |
| profile | PPP profile for incoming connections | default |
| ring-count | Number of rings before answering | 1 |
User Authentication
Section titled “User Authentication”Configure user credentials for PPP server access:
/ppp secretadd name=remoteuser password=SecretPass123 profile=default remote-address=10.0.0.100
/ppp secretadd name=mobileuser password=MobilePass456 profile=default-encryption service=anyPPP Server Example
Section titled “PPP Server Example”Set up a PPP server for remote cellular access:
# Create PPP profile for remote users/ppp profileadd local-address=10.0.0.1 name=remote-pool remote-address=10.0.0.100-10.0.0.200 \ dns-server=8.8.8.8,8.8.4.4
# Add user credentials/ppp secretadd name=remoteuser password=SecurePass123 profile=remote-pool
# Enable PPP server on serial port/interface ppp-serveradd profile=remote-pool port=serial0 name=ppp-in1Monitoring and Troubleshooting
Section titled “Monitoring and Troubleshooting”Connection Status
Section titled “Connection Status”Monitor active PPP connections:
/interface ppp-client monitor ppp-out1Monitor active sessions:
/ppp active printDebug Logging
Section titled “Debug Logging”Enable PPP debugging to diagnose connection issues:
/system loggingadd topics=ppp action=memoryView PPP-related logs:
/log print where message~"ppp"Common Issues
Section titled “Common Issues”Connection refused:
# Verify APN is correct/interface ppp-client print
# Check authentication credentials/ppp secret printModem not responding:
# Reset the LTE interface/interface lte reset
# Check physical connection/system resource usb printAuthentication failures:
# Verify username and password/interface ppp-client set [find] password=correctpassword
# Check allowed authentication methods/interface ppp-client set [find] allow=mschap2,chapPPP Profiles
Section titled “PPP Profiles”PPP profiles define connection parameters for both client and server scenarios:
/ppp profileadd name=cellular-profile local-address=10.0.0.1 remote-address=pool1 \ dns-server=8.8.8.8 idle-timeout=30m use-encryption=requiredProfile Properties
Section titled “Profile Properties”| Property | Description |
|---|---|
| local-address | IP address for the router side of PPP |
| remote-address | IP address or pool for client |
| dns-server | DNS servers to assign to clients |
| idle-timeout | Disconnect after inactivity |
| use-encryption | Encryption requirement (yes, no, required, default) |
| rate-limit | Bandwidth limits (rx-rate/tx-rate) |
Related Topics
Section titled “Related Topics”- Mobile Networking - Main mobile networking documentation
- LTE/5G Interface - Direct LTE interface configuration
- PPP AAA - PPP authentication and accounting
- PPPoE - PPP over Ethernet for ISP connections