Annotation of embedaddon/mpd/doc/mpd16.html, revision 1.1.1.4
1.1 misho 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2: <HTML>
3: <HEAD>
4: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
5: <TITLE>Mpd command line interface</TITLE>
6: </HEAD>
7: <BODY text="#000000" bgcolor="#ffffff">
8:
1.1.1.4 ! misho 9: <A HREF="mpd.html"><EM>Mpd 5.9 User Manual</EM></A>
1.1 misho 10: <b>:</b> <A HREF="mpd9.html"><EM>Running Mpd</EM></A>
11: <b>:</b> <EM>Mpd command line interface</EM><BR>
12: <b>Previous:</b> <A HREF="mpd15.html"><EM><code>mpd.script</code></EM></A><BR>
13: <b>Next:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A>
14:
15:
16: <HR NOSHADE>
17: <H2><A NAME="16"></A>3.3. Mpd command line interface<A NAME="cli"></A></H2>
18: <p>Mpd provides to user a command line interface on stdin and
19: TCP port. Here mpd commands can be entered to
20: configure the various layers and check
21: the status of the defined bundles and links.
22: The commands available at the command line interface
23: are exactly the same ones available in the
24: <code>mpd.conf</code> config file.</p>
25: <p>At any given time, there is always exists an <em>active context</em>
26: shich includes active link, bundle and repeater. These name are
27: shown in the prompt. Here is an example of running mpd
28: with a configuration in <code>mpd.conf</code> that defines
29: a bundle <code>myisp</code> containing two links <code>modem1</code>
30: and <code>modem2</code>:
31: <blockquote><code>
32: <pre>
33: $ mpd config1
34: Multi-link PPP daemon for FreeBSD
35:
36: process 26177 started, version 5.0 (root@orphanage.alkar.net 13:16 22-Sep-2007)
37: [modem1]
38: </pre>
39: </code></blockquote>
40:
41: By that time, mpd has already read in and executed all
42: the commands associated with the configuration
43: <code>config1</code>, which defines the bundle <code>myisp</code>.</p>
44: <p>To control mpd runtime you also can connect to mpd's Telnet console.
45: <blockquote><code>
46: <pre>
47: > telnet 0 5005
48: Trying 0.0.0.0...
49: Connected to 0.
50: Escape character is '^]'.
51: Multi-link PPP daemon for FreeBSD
52:
53: Username: Admin
54: Password:
55: Mpd pid 1419, version 5.0a1 (root@orphanage.alkar.net 13:16 22-Sep-2007)
56:
57: [modem1]
58: </pre>
59: </code></blockquote>
60: </p>
61: <p>The prompt <code>[modem1]</code> shows the currently active
62: link (<code>modem1</code>). Any link specific commands issued
63: at this point will apply to <code>modem1</code>.</p>
64: <p>To change the active link, bundle or repeater, use the
65: <code>link</code>, <code>bundle</code> or <code>repeater</code> command:
66: <blockquote><code>
67: <pre>
68: [modem1] link modem2
69: [modem2]
70: </pre>
71: </code></blockquote>
72:
73: Now any commands entered apply to <code>myisp</code> or
74: <code>modem2</code>, as appropriate. This technique works
75: the same way in <code>mpd.conf</code>. Also, if changing
76: the link requires changing bundles as well, mpd will do
77: that too.</p>
78: <p>The available commands are described in the next chapter.
79: When mpd is running, the <code>help</code> can be used to
80: get more information on a specific command:
81: <blockquote><code>
82: <pre>
83: [modem2] help show
84: Commands available under "show":
85: bundle : Bundle status repeater : Repeater status
86: ccp : CCP status ecp : ECP status
87: eap : EAP status events : Current events
88: ipcp : IPCP status ipv6cp : IPV6CP status
89: iface : Interface status routes : IP routing table
90: layers : Layers to open/close device : Physical device status
91: link : Link status auth : Auth status
92: radius : RADIUS status lcp : LCP status
93: nat : NAT status mem : Memory map
94: console : Console status web : Web status
95: global : Global settings types : Supported device types
96: version : Version string summary : Daemon status summary
97: [modem2]
98: </pre>
99: </code></blockquote>
100: </p>
101: <p>Mpd allows you to use only a prefix of a command, as long as the
102: command is unambigous:
103: <blockquote><code>
104: <pre>
105: [modem2] b
106: Defined bundles:
107: Bundle Links
108: ------ -----
109: myisp modem2[DOWN]
110: [modem2] s
111: s: ambiguous command
112: </pre>
113: </code></blockquote>
114: </p>
115:
116:
117:
118: <HR NOSHADE>
1.1.1.4 ! misho 119: <A HREF="mpd.html"><EM>Mpd 5.9 User Manual</EM></A>
1.1 misho 120: <b>:</b> <A HREF="mpd9.html"><EM>Running Mpd</EM></A>
121: <b>:</b> <EM>Mpd command line interface</EM><BR>
122: <b>Previous:</b> <A HREF="mpd15.html"><EM><code>mpd.script</code></EM></A><BR>
123: <b>Next:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A>
124:
125:
126:
127: </BODY>
128: </HTML>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>