Annotation of embedaddon/mpd/doc/mpd28.html, revision 1.1.1.2
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>Interface layer</TITLE>
6: </HEAD>
7: <BODY text="#000000" bgcolor="#ffffff">
8:
1.1.1.2 ! misho 9: <A HREF="mpd.html"><EM>Mpd 5.7 User Manual</EM></A>
1.1 misho 10: <b>:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A>
11: <b>:</b> <EM>Interface layer</EM><BR>
12: <b>Previous:</b> <A HREF="mpd27.html"><EM>IPv6CP layer</EM></A><BR>
13: <b>Next:</b> <A HREF="mpd29.html"><EM>Authentication, Authorization and Accounting (AAA)</EM></A>
14:
15:
16: <HR NOSHADE>
17: <H2><A NAME="28"></A>4.9. Interface layer<A NAME="interface"></A></H2>
18:
19: <p>This chapter describes commands that configure the interface layer.
20: All of these commands apply to the currently active bundle.</p>
21: <p>Note that while most of the time mpd is used for transmitting
22: IP traffic, it is designed to support other (currently unimplemented)
23: protocols such as AppleTalk, IPX, etc. This is why the Interface
24: layer (which is protocol independent) is distinct from the
25: <A HREF="mpd26.html#ipcp">ipcp</A> which is specific to IP.</p>
26: <p>
27: <dl>
28:
29: <dt><b><code>set iface name [ <em>name</em> ]</code></b><dd><p>This command changes interface name from default ngX to specified one.
30: If name argument is not specified, original ngX name is restored.
31: Note that inside Netgraph original ngX name is always used.</p>
32:
33: <dt><b><code>set iface description [ <em>description</em> ]</code></b><dd><p>This command changes interface description.</p>
1.1.1.2 ! misho 34: <p>Template may contain conversion specifications:</p>
! 35: <p>
! 36: <pre>
! 37: %% expands to single % sign;
! 38: %a for interface local address;
! 39: %A for peer local address;
! 40: %i for system interface index;
! 41: %I for interface name;
! 42: %l for name of bundle's first link
! 43: %M for peer MAC address of bundle's first link
! 44: %S for interface status (DoD/UP/DOWN)
! 45: %t for type of bundle's first link (pppoe, pptp, l2tp etc.)
! 46: %u for self auth name (or dash if self auth name not used)
! 47: %U for peer auth name (or dash if peer has not authenticated)
! 48: </pre>
! 49: </p>
1.1 misho 50:
51: <dt><b><code>set iface group [ <em>group</em> ]</code></b><dd><p>This command add interface to specific group.</p>
52:
53: <dt><b><code>set iface addrs [!]<em>local-ip</em> [!]<em>remote-ip</em></code></b><dd><p>This command is usually required when dial-on-demand is enabled.
54: Normally, mpd configures the interface with the IP addresses that
55: were negotiated when connecting the link. Since dial-on-demand
56: configures the interface before actually connecting, mpd has to be
57: told initial local and remote IP addresses to give the interface.
58: These addresses don't have to correspond to the ``real'' ones; in
59: fact, both addresses can be completely fictional. If and when
60: different addresses are negotiated later, mpd will automatically
61: renumber the interface and adjust the routes.</p>
62: <p>Also this command may be used to force specified addresses usage
63: instead of negotiated ones. It may be useful in some specific cases,
64: for example, to avoid routing loop with misconfigured PPTP server.
65: In such case '!' mark specifies IPs to be forced.</p>
66:
67: <dt><b><code>set iface route <em>address[/width]</em></code></b><dd><p>This command associates a route with the bundle. Whenever the
68: interface is configured up, all associated routes are added.
69: A route of <code><b>default</b></code> indicates the default route.
70: Otherwise, the route is a network address with optional netmask
71: width (e.g., <code><b>192.168.1.0/24</b></code>). If the netmask
72: width is omitted, a single host route is assumed (i.e., a width
73: of 32).</p>
74: <p>Routes are automatically removed when the interface is brought down.</p>
75:
76: <dt><b><code>set iface mtu <em>value</em></code></b><dd><p>This command sets an upper bound on the MTU that will be configured
77: on the interface when the bundle comes up.
78: This value is not used at all during link negotiation; there are
79: separate bundle and link commands for configuring that.
80: Even if a higher bundle MTU is negotiated, this limit will still apply.</p>
81: <p>This command is useful when you want to manually restrict the MTU
82: of the interface for other reasons, e.g., if you're also doing IPSec.</p>
83: <p>The default is 1500.</p>
84:
85: <dt><b><code>set iface idle <em>seconds</em></code></b><dd><p>Sets the idle timeout value for the bundle. If no incoming or
86: outgoing packets are transmitted for <code><em>seconds</em></code>
87: seconds, the connection is brought down. An idle timeout of
88: zero disables this feature.</p>
89: <p>When the idle timeout occurs, if the dial-on-demand option is
90: enabled, mpd goes back into dial-on-demand mode. Otherwise, the
91: interface is brought down and all associated routes removed.</p>
92: <p>The default is 0.</p>
93:
94: <dt><b><code>set iface session <em>seconds</em></code></b><dd><p>Sets the session timeout value for the bundle. An session timeout of
95: zero disables this feature.</p>
96: <p>The default is 0.</p>
97:
98: <dt><b><code>set iface up-script <em>script</em> </code></b><dd>
99: <dt><b><code>set iface down-script <em>script</em> </code></b><dd>
100: <p>Mpd can optionally run a user program every time one of network
101: protocols (IPCP/IPv6CP) at the interface is brought up or down.
102: The <code><b>up-script</b></code> is called like this:
103: <blockquote><code>
104: <code><em>script</em> <em>interface</em> <em>proto</em> <em>local-ip</em> <em>remote-ip</em> <em>authname</em> [ dns1 <em>server-ip</em> ] [ dns2 <em>server-ip</em> ]
105: <em>peer-address</em></code>
106: </code></blockquote>
107: </p>
108: <p>If up-script exit status is not 0, mpd will kill respective protocol.</p>
109: <p>The <code><b>down-script</b></code> is called like this:
110: <blockquote><code>
111: <code><em>script</em> <em>interface</em> <em>proto</em> <em>local-ip</em> <em>remote-ip</em> <em>authname</em> <em>peer-address</em></code>
112: </code></blockquote>
113: </p>
114:
115: <dt><b><code>set iface enable <em>option ...</em><br>
116: set iface disable <em>option ...</em></code></b><dd><p>Enable and disable the various interface layer options for the bundle.</p>
117:
118: </dl>
119: </p>
120:
121: <p>The options available at the interface layer are:</p>
122: <p>
123: <dl>
124:
125: <dt><b><code>on-demand</code></b><dd><p>This option causes the interface to operate in dial-on-demand mode,
126: allowing you to have a ``virtual full time'' connection.
127: An OPEN event causes the interface to be configured, but the actual
128: connection of the link is delayed until qualifying outgoing traffic
129: is detected. Moreover, after an idle timeout, the interface is not
130: brought down; further traffic will bring the link back up again.</p>
131: <p>The default is disable.</p>
132:
133: <dt><b><code>proxy-arp</code></b><dd><p>When this option is enabled, if after link negotiation the peer's
134: IP address is determined to lie on a local subnet, then mpd will
135: arrange for the local machine to install a proxy ARP entry for
136: the remote machine's IP address.</p>
137: <p>For example, suppose the local machine lies on a LAN with address
138: 192.168.1.10, and another machine will be connecting via mpd
139: and using the LAN address 192.168.1.20. Then these commands would
140: set up proxy ARP for the remote machine:
141: <blockquote><code>
142: <code>set iface enable proxy-arp<br>
143: set ipcp ranges 192.168.1.10/32 192.168.1.20/32</code>
144: </code></blockquote>
145: </p>
146: <p>The default is disable.</p>
147:
148: <dt><b><code>tcpmssfix</code></b><dd><p>This option causes mpd to adjust incoming and outgoing TCP SYN
149: segments so that the requested maximum segment size is not greater
150: than the amount allowed by the interface MTU.</p>
151: <p>This is necessary in many setups to avoid problems caused by routers
152: that drop ICMP Datagram Too Big messages. Without these messages,
153: the originating machine sends data, it passes the rogue router then
154: hits a machine that has an MTU that is not big enough for the data.
155: Because the IP Don't Fragment option is set, this machine sends an
156: ICMP Datagram Too Big message back to the originator and drops the
157: packet. The rogue router drops the ICMP message and the originator
158: never gets to discover that it must reduce the fragment size or drop
159: the IP Don't Fragment option from its outgoing data.</p>
160: <p>The code is based on tcpmssd wich was written by Ruslan Ermilov
161: <A href="mailto:<ru@FreeBSD.org>">mailto:<ru@FreeBSD.org></A>
162: based on work done by Patrick Bihan-Faou
163: <A href="mailto:<patrick@mindstep.com>">mailto:<patrick@mindstep.com></A>.</p>
164: <p>The default is disable.</p>
165:
166: <dt><b><code>tee</code></b><dd><p>If enabled, a ng_tee(4) node will be inserted
167: into the bundle graph, right after the interface node. The tee node
168: can be useful for debugging or traffic accounting.</p>
169: <p>The default is disable.</p>
170:
171: <dt><b><code>nat</code></b><dd><p>Enable NAT for this bundle.
172: See
173: <A HREF="mpd39.html#nat">nat</A> for more information.</p>
174: <p>The default is disable.</p>
175:
176: <dt><b><code>netflow-in</code></b><dd>
177: <dt><b><code>netflow-out</code></b><dd>
178: <dt><b><code>netflow-once</code></b><dd><p>If enabled, the bundle will participate in
179: NetFlow generation. See
180: <A HREF="mpd34.html#netflow">netflow</A>
181: for more information. The netflow-out option is like netflow-in, but
182: generates NetFlow data for outgoing packets instead of incoming.
183: If netflow-once enabled - packet will be accounted only once while
184: in kernel.</p>
185: <p>The default is disable.</p>
186:
187: <dt><b><code>ipacct</code></b><dd><p>If enabled, the bundle will participate in IP accounting with ng_ipacct node.
188: See
189: <A HREF="mpd35.html#ipacct">ipacct</A> for more information.</p>
190: <p>The default is disable.</p>
191:
192: </dl>
193: </p>
194: <HR NOSHADE>
1.1.1.2 ! misho 195: <A HREF="mpd.html"><EM>Mpd 5.7 User Manual</EM></A>
1.1 misho 196: <b>:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A>
197: <b>:</b> <EM>Interface layer</EM><BR>
198: <b>Previous:</b> <A HREF="mpd27.html"><EM>IPv6CP layer</EM></A><BR>
199: <b>Next:</b> <A HREF="mpd29.html"><EM>Authentication, Authorization and Accounting (AAA)</EM></A>
200:
201:
202:
203: </BODY>
204: </HTML>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>