File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / mpd / doc / mpd28.html
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Nov 1 09:56:12 2016 UTC (7 years, 8 months ago) by misho
Branches: mpd, MAIN
CVS tags: v5_8p7, v5_8p1_cross, v5_8p1, v5_8, HEAD
mpd 5.8

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>