<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"/usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd">
<refentry id="nexp-ip">
  <refentryinfo>
    <date>22 October 2007</date>
  </refentryinfo>

  <refmeta>
    <refentrytitle>nexp-mpls</refentrytitle>

    <manvolnum>5</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>nexp-mpls</refname>

    <refpurpose>Network Expect support for Multi-Protocol Label Switching
    (MPLS) labeled protocol data units</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <para>PDU definition:</para>

    <cmdsynopsis>
       

      <command>mpls</command>(<arg choice="opt">
      <option>label</option>=<replaceable
      class="option">num</replaceable>,</arg>
      <arg choice="opt"><option>ttl</option>=<replaceable
      class="option">num</replaceable>,</arg>
      <arg choice="opt">
        <option>experimental</option>,
      </arg>
      <arg choice="opt">
        <option>stack</option>
      </arg> )</cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>PDU Definition</title>

    <para>The following parameters allow you to define the different parts of
    a MPLS labeled protocol data unit (PDU) in <command>Network
    Expect</command>:</para>

    <variablelist>
      <varlistentry>
        <term><option>label</option> =
        <replaceable>NUMSPEC</replaceable></term>

        <listitem>
          <para>The MPLS label to be used in the PDU. The label is stored in a
          20 bit field, with values 0 to 15 being reserved by section 2.1 of
          RFC 3032. Default: 0.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>ttl</option> = <replaceable>NUMSPEC</replaceable></term>

        <listitem>
          <para>The Time to Live value of the MPLS label. Per section 2.4 of
          RFC 3032, only the top most label is relevant to packet forwarding.
          Default: 0. </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>experimental</option><replaceable></replaceable></term>

        <listitem>
          <para>When included in the PDU definition, the least significant of
          the three MPLS Experimental bits is set to 1. Default: All three
          bits are set to 0.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>stack</option><replaceable></replaceable></term>

        <listitem>
          <para>Sets the MPLS Bottom of Stack bit to 1. In order for an MPLS
          packet to be valid, exactly one MPLS label must have this bit
          set.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>PDU Decoding</title>

    <para>The current version of <command>Network Expect</command> does not
    support the decoding of received MPLS PDUs into the Tcl array variable
    mpls.</para>
  </refsect1>

  <refsect1>
    <title>Examples</title>

    <orderedlist>
      <listitem>
        <para>A simple MPLS labeled ethernet frame:</para>

        <programlisting>
ether()/mpls(label = 100, stack)
	</programlisting>
      </listitem>

      <listitem>
        <para>An MPLS labeled ethernet frame containing three labels:</para>

        <programlisting>
ether()/mpls(label = 20)/mpls(label = 30)/mpls(label = 40, stack)
	</programlisting>
      </listitem>

      <listitem>
        <para>An MPLS over IP packet with an MPLS TTL of 100:</para>

        <programlisting>
ip(dst = www.netexpect.org, proto = 137) / \
mpls(label = 20, stack, ttl = 100)
	</programlisting>
      </listitem>

      <listitem>
        <para>An MPLS over GRE packet containing an IP datagram:</para>

        <programlisting>
ip(dst = www.netexpect.org)/gre()/mpls(label = 30, stack) / \
ip(src = 10.1.1.1, dst = 10.2.2.2)
	</programlisting>
      </listitem>
    </orderedlist>
  </refsect1>

  <refsect1>
    <title>VERSION</title>

    <para>This man page is correct for version 1.0 of <command>Network
    Expect</command>.</para>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>

    <para>nexp<manvolnum>1</manvolnum>, nexp-numspec<manvolnum>1</manvolnum>,
    RFC 3032, RFC 4023</para>
  </refsect1>

  <refsect1>
    <title>AUTHOR</title>

    <para>MPLS support for <command>Network Expect</command> was written by
    Eloy Paris &lt;peloy@netexpect.org&gt;.</para>

    <para>This man page was written by Tim Sammut
    &lt;tsammut@cisco.com&gt;.</para>
  </refsect1>
</refentry>
