mpd.script
After connecting to the telnet port,
mpd presents a command line interface.
Here mpd commands can be entered to
configure the various layers and check
the status of the defined bundles and links.
The commands available at the command line interface
are exactly the same ones available in the
mpd.conf
and mpd.links
config files.
At any given time, there is always an active bundle
and an active link within that bundle. These are
shown in the prompt. Here is an example of running mpd
with a configuration in mpd.conf
that defines
a bundle myisp
containing two links modem1
and modem2
:
$ mpd config1
Multi-link PPP for FreeBSD, by Archie L. Cobbs.
Based on iij-ppp, by Toshiharu OHNO.
mpd: pid 1419, version 4.0 (root@fish.alkar.net 15:29 15-Dec-2006)
[myisp] ppp node is "mpd771-myisp"
[myisp] using interface ng0
By that time, mpd has already read in and executed all
the commands associated with the configuration
config1
,
which defines the bundle myisp
. When the bundle
is created mpd logs a message showing the name of the
associated netgraph ng_ppp(4)
node and system interface
(mpd will automatically select one if not
explicitly told which one to use). In this case
mpd771-myisp
is the netgraph node and ng0
is the interface.
To control mpd runtime you can connect to mpd's Telnet console.
> telnet 0 5005
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Multi-link PPP for FreeBSD, by Archie L. Cobbs.
Based on iij-ppp, by Toshiharu OHNO.
Username: Admin
Password:
mpd: pid 1419, version 4.0 (root@fish.alkar.net 15:29 15-Dec-2006)
[modem1]
The prompt [modem1]
shows the currently active link (modem1
).
Any bundle specific commands issued
at this point will apply to myisp
. Similarly,
any link specific commands will apply to modem1
.
To change the active link or bundle, use the link
or bundle
command:
[modem1] link modem2
[modem2]
Now any commands entered apply to myisp
or
modem2
, as appropriate. This technique works
the same way in mpd.conf
. Also, if changing
the link requires changing bundles as well, mpd will do
that too.
The available commands are described in the next chapter.
When mpd is running the help
can be used to
get more information on a specific command:
[modem2] help show
Commands available under "show":
bundle : Bundle status ccp : CCP status
ecp : ECP status eap : EAP status
events : Current events ipcp : IPCP status
ipv6cp : IPV6CP status iface : Interface status
routes : IP routing table layers : Layers to open/close
phys : Physical device status link : Link status
auth : Auth status radius : RADIUS status
lcp : LCP status mem : Memory map
mp : Multi-link status console : Console status
globals : Global settings types : Supported device types
version : Version string
[modem2]
Mpd allows you to use only a prefix of a command, as long as the command is unambigous:
[modem2] b
Defined bundles:
Bundle Links
------ -----
myisp modem2[DOWN]
[modem2] s
s: ambiguous command
mpd.script