⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.examples

📁 一个可以实现MPLS实验的linux源代码.你不仅可以实现单层标签的转发,还可以实现2个标签的实验,很好的.
💻 EXAMPLES
字号:
------------------------1. Basic 'mpls' usage------------------------This utility can be used to manually create LSPs from the command line.It is also a great example of how to use the IOCTLS calls.Command line usage:Usage: mpls ilm CMD label LABEL labelspace NUMBER [proto PROTO | instructions INSTR]       mpls nhlfe CMD key KEY [mtu MTU propagate_ttl | instructions INSTR]       mpls xc CMD ilm_label LABEL ilm_labelspace NUMBER nhlfe_key KEY       mpls labelspace CMD dev NAME labelspace NUMBER       mpls ilm show [label LABEL labelspace NUMBER]       mpls nhlfe show [key KEY]       mpls xc show [ilm_label LABEL ilm_labelspace NUMBER]       mpls labelspace show [dev NAME]       mpls monitor ...Where:CMD    := add | del | changeNUMBER := 0 .. 255TYPE   := gen | atm | frVALUE  := 16 .. 1048575 | <VPI>/<VCI> | 16 .. 1023LABEL  := TYPE VALUEKEY    := 0 for add | previously returned keyNAME   := network device name (i.e. eth0)PROTO  := ipv4 | ipv6ADDR   := ipv6 or ipv4 addressNH     := nexthop NAME [none|packet|PROTO ADDR]FWD    := forward KEYPUSH   := push LABELINSTR  := NH | PUSH | pop | deliver | peek | FWD |          set-dscp <DSCP> | set-exp <EXP> |          set-tcindex <TCINDEX> | set-rx-if <NAME>          forward <KEY> | expfwd <EXP> <KEY> ... |          exp2tc <EXP> <TCINDEX> ... | exp2ds <EXP> <DSCP> ... |          nffwd <MASK> [ <NFMARK> <KEY> ... ] |          nf2exp <MASK> [ <NFMARK> <EXP> ... ] |          tc2exp <MASK> [ <TCINDEX> <EXP> ... ] |          ds2exp <MASK> [ <DSCP> <EXP> ... ] |          dsfwd <MASK> [ <DSCP> <KEY> ... ]Create an NHLFE with generic label 16 that send packetsout eth0 to the next hop LSR/LER 128.104.17.130.Establish an NHLFE------------------mpls nhlfe add key 0 instructions push gen 16 nexthop eth0 ipv4 128.104.17.130                 |        |        |    |   |   |      |    |         |                 |        |        |    |   |   |      |    |         |                 |        |        |    |   |   |      |    |         |                 |        |        |    |   |   |      |    |         |                 |        |        |    |   |   |      |    |  addr of next hop                 |        |        |    |   |   |      |    |                 |        |        |    |   |   |      |    following info                 |        |        |    |   |   |      |    is ipv4 addr of                 |        |        |    |   |   |      |    nexthop                 |        |        |    |   |   |      |                 |        |        |    |   |   |      out going interface                 |        |        |    |   |   |                 |        |        |    |   |   set the next hop info                 |        |        |    |   |                 |        |        |    |   label                 |        |        |    |                 |        |        |    generic label                 |        |        |                 |        |        push a label                 |        |                 |        specify the intructions associated with this NHLFE                 |                 specify a key of 0 when creating a new NHLFE(the key created for this NHFE is printed, alternativly you can look up the key value in the output of 'mpls nhlfe show'Delete the NHLFE----------------mpls nhlfe delete key <key>Interface eth0 uses label space 0---------------------------------mpls labelspace set dev eth0 labelspace 0                 |       |              |                 |       |    label space                 |       |                 |       interface name                 |                 modify interface label space(if you change the label space to -1, you disable MPLS processing on the interface)Establish ILM label 34 in label space 0---------------------------------------mpls ilm add label gen 34 labelspace 0                    |   |            |                    |   |  label space                    |   |                    |   label                    |                    generic label(if you change the 'add' to 'delete' you will delete the entry)Establish a label switch path-----------------------------mpls xc add ilm_label gen 34 ilm_labelspace 0 nhlfe_key <key>Delete a label switch path --------------------------mpls xc delete ilm_label gen 34 ilm_labelspace 0 nhlfe_key <key>Binding a FEC to an outgoing labels (mapping traffic to an LSP)---------------------------------------------------------------Use a patched version of iproute2 (read ../patches/README.iproute2)See http://mpls-linux.sf.net/ under 'Links to Examples' for more'mpls' usage examples.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -