Point to Point Protocol (PPP) and Asynchronous Interfaces
Document revision 1.4 (01-Jun-2003)
This document applies to the MikroTik RouterOS V2.7
PPP (or Point-to-Point Protocol) provides a method for transmitting datagrams
over serial point-to-point links. Physically, it relies on com1 and com2
ports from standard PC hardware configurations. These appear as serial0 and
serial1 automatically.
You can add more serial ports to use the router for a modem pool using these
adapters:
MOXA (www.moxa.com) Smartio C104H 4-port PCI
multiport asynchronous board with maximum of 16 ports (4 cards)
MOXA (www.moxa.com) Smartio C168H 8-port PCI
multiport asynchronous board with maximum of 32 ports (4 cards)
Cyclades (www.cyclades.com) Cyclom-Y
Series PCI multiport asynchronous (serial) cards
Cyclades (www.cyclades.com) Cyclades-Z
Series PCI multiport asynchronous (serial) cards
TCL (www.thetcl.com) DataBooster 4 or 8
port High Speed Buffered PCI Communication Controllers
Packages required : ppp
License required : Any
Home menu level : /interface ppp-client, /interface ppp-server
Standards and Technologies : PPP (RFC-1661)
Hardware usage : not significant
Software
Package Installation and Upgrading
Device Driver Management
IP Addresses and Address Resolution Protocol (ARP)
Log Management
Authentication,
Authorization and Accounting
Submenu level : /port
name (name) - port name
used-by (read-only: target) - shows the user of the port. Only free ports
can be used in PPP setup
baud-rate (integer; default: 9600) - maximal data rate of the port
data-bits (7 | 8; default: 8) - number of bits per character transmitted
parity (none | even | odd; default: none) - character parity check method
stop-bits (1 | 2; default: 1) - number of stop bits after each character
transmitted
flow-control (none | hardware | xon-xoff; default: hardware) - flow control
method
Keep in mind that baud-rate, data-bits, parity, stop-bits
and flow-control parameters must be the same for both communicating sides.
[admin@MikroTik] > /port print
# NAME USED-BY BAUD-RATE
0 serial0 Serial Console 9600
1 databooster1 9600
2 databooster2 9600
3 databooster3 9600
4 databooster4 9600
5 databooster5 9600
6 databooster6 9600
7 databooster7 9600
8 databooster8 9600
9 cycladesA1 9600
10 cycladesA2 9600
11 cycladesA3 9600
12 cycladesA4 9600
13 cycladesA5 9600
14 cycladesA6 9600
15 cycladesA7 9600
16 cycladesA8 9600
[admin@MikroTik] > set 9 baud-rate=38400
[admin@MikroTik] >
Submenu level : /interface ppp-server
PPP server provide a remote connection service for users.
When dialing in, the users can be authenticated locally using the local user database in
the /user menu, or at the RADIUS server specified in the /ip ppp settings.
port (name; default: (unknown)) - serial port
authentication (multiple choice: mschap2,mschap1,chap,pap; default:
mschap2,mschap1,chap,pap) - authentication protocol
profile (name; default: default) - profile name used for the link
mtu (integer; default: 1500) - Maximum Transmit Unit. Maximum packet
size to be transmitted
mru (integer; default: 1500) - Maximum Receive Unit
null-modem (no | yes; default: no) - enable/disable null-modem mode (when
enabled, no modem initialization strings are sent)
modem-init (text; default: "") - modem initialization string. You may use
"s11=40" to improve dialling speed
ring-count (integer; default: 1) - number of rings to wait before
answering phone
name (text; default: ppp-inN) - interface name for reference
You can add a PPP server using the add command:
[admin@MikroTik] interface ppp-server> add name=test port=serial1
[admin@MikroTik] interface ppp-server> print
Flags: X - disabled, R - running
0 X name="test" mtu=1500 mru=1500 port=serial1
authentication=mschap2,chap,pap profile=default modem-init=""
ring-count=1 null-modem=no
[admin@MikroTik] interface ppp-server> enable 0
[admin@MikroTik] interface ppp-server> monitor test
status: "waiting for call..."
[admin@MikroTik] interface ppp-server>
Submenu level : /interface ppp-client
This section describes PPP clients configuration routines.
name (text; default: ppp-outN) - new interface name
port (name; default: (unknown)) - serial port
user (text; default: "") - P2P user name on the remote server to use for
dialout
password (text; default: "") - P2P user password on the remote server to
use for dialout
profile (name; default: default) - local profile to use for dialout
phone (integer; default: "") - phone number for dialout
tone-dial (yes | no; default: yes) - defines whether use tone dial or
pulse dial
mtu (integer; default: 1500) - Maximum Transmit Unit. Maximum packet
size to be transmitted
mru (integer; default: 1500) - Maximum Receive Unit
null-modem (no | yes; default: no) - enable/disable null-modem mode (when
enabled, no modem initialization strings are sent)
modem-init (text; default: "") - modem initialization string. You may use
"s11=40" to improve dialling speed
dial-on-demand (yes | no; default: no) - enable/disable dial on demand
add-default-route (yes | no; default: no) - add PPP remote address as a
default route
use-peer-dns (yes | no; default: no) - use DNS server settings from the
remote server
Additional client profiles must be configured on the server side for clients to
accomplish logon procedure. For more information see Related Documents section.
PPP client profiles must match at least partially (local-address and values
related to encryption should match) with corresponding remote server values.
You can add a PPP client using the add command:
[admin@MikroTik] interface ppp-client> add name=test user=test port=serial1 \
\... add-default-route=yes
[admin@MikroTik] interface ppp-client> print
Flags: X - disabled, R - running
0 X name="test" mtu=1500 mru=1500 port=serial1 user="test" password=""
profile=default phone="" tone-dial=yes modem-init="" null-modem=no
dial-on-demand=no add-default-route=yes use-peer-dns=no
[admin@MikroTik] interface ppp-client> enable 0
[admin@MikroTik] interface ppp-client> monitor test
[admin@MikroTik] interface ppp-client> monitor 0
status: "dialing out..."
[admin@MikroTik] interface ppp-client>
In this example we will consider the following network setup:
For a tupical server setup we need to add one user to the R1 and configure the PPP server.
[admin@MikroTik] ppp secret> add name=test password=test local-address=3.3.3.1 \
\... remote-address=3.3.3.2
[admin@MikroTik] ppp secret> print
Flags: X - disabled
0 name="test" service=any caller-id="" password="test" profile=default
local-address=3.3.3.1 remote-address=3.3.3.2 routes=""
[admin@MikroTik] ppp secret> /int ppp-server
[admin@MikroTik] interface ppp-server> add port=serial1 disabled=no
[admin@MikroTik] interface ppp-server> print
Flags: X - disabled, R - running
0 name="ppp-in1" mtu=1500 mru=1500 port=serial1
authentication=mschap2,mschap1,chap,pap profile=default modem-init=""
ring-count=1 null-modem=no
[admin@MikroTik] interface ppp-server>
Now we need to setup the client to connect to the server:
[admin@MikroTik] interface ppp-client> add port=serial1 user=test password=test \
\... phone=132
[admin@MikroTik] interface ppp-client> print
Flags: X - disabled, R - running
0 X name="ppp-out1" mtu=1500 mru=1500 port=serial1 user="test"
password="test" profile=default phone="132" tone-dial=yes
modem-init="" null-modem=no dial-on-demand=no add-default-route=no
use-peer-dns=no
[admin@MikroTik] interface ppp-client> enable 0
After a short duration of time the routers will be able to ping each other:
[admin@MikroTik] interface ppp-client> /ping 3.3.3.1
3.3.3.1 64 byte ping: ttl=64 time=43 ms
3.3.3.1 64 byte ping: ttl=64 time=11 ms
3.3.3.1 64 byte ping: ttl=64 time=12 ms
3.3.3.1 64 byte ping: ttl=64 time=11 ms
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 11/19.2/43 ms
[admin@MikroTik] interface ppp-client>
http://www.ietf.org/rfc/rfc2138.txt?number=2138
http://www.ietf.org/rfc/rfc2138.txt?number=2139
© Copyright 1999-2003, MikroTik