关闭

支持mpls的iproute2内容

337人阅读 评论(0) 收藏 举报
分类:

OS: centos66

iproute2 2.6.39

iproute2 mpls patch (来自sf.net Leu)

编译过程:

补丁-》编译

编译结果:

1[root@gdc1000 mpls]# ./mpls -help
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 set dev NAME labelspace NUMBER
       mpls labelspace set dev NAME labelspace -1
       mpls tunnel add nhlfe KEY
       mpls tunnel del dev NAME
       mpls tunnel get dev NAME

       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 | change
NUMBER := 0 .. 255
TYPE   := gen | atm | fr
VALUE  := 16 .. 1048575 | <VPI>/<VCI> | 16 .. 1023
LABEL  := TYPE VALUE
KEY    := 0 for add | previously returned key
NAME   := network device name (i.e. eth0)
PROTO  := ipv4 | ipv6
ADDR   := ipv6 or ipv4 address
NH     := nexthop NAME [none|packet|PROTO ADDR]
FWD    := forward KEY
PUSH   := push LABEL
INSTR  := 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> ... ]

[root@gdc1000 mpls]#


2 系统命令使用ip, 支持mpls的iproute2命令是./ip

从下面看,

多了mpls这个家族


OS:centos66

[root@gdc1000 ip]# ./ip help

Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] -batch filename
where  OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
                   tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |
                   netns }
       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                    -f[amily] { inet | inet6 | ipx | dnet | link | mpls } |
                    -l[oops] { maximum-addr-flush-attempts } |
                    -o[neline] | -t[imestamp] | -b[atch] [filename] |
                    -rc[vbuf] [size]}
[root@gdc1000 ip]# ip help
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] -batch filename
where  OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
                   tunnel | maddr | mroute | mrule | monitor | xfrm | token | netns }
       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                    -f[amily] { inet | inet6 | ipx | dnet | link } |
                    -o[neline] | -t[imestamp] | -b[atch] [filename] |
                    -rc[vbuf] [size]}
[root@gdc1000 ip]# ip -V
ip utility, iproute2-ss091226
[root@gdc1000 ip]# ./ip =v
Object "=v" is unknown, try "ip help".
[root@gdc1000 ip]# ./ip -V
ip utility, iproute2-ss111117

[root@gdc1000 ip]#

对比方来自

https://github.com/i-maravic/iproute2/tree/mpls-rc/examples


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:261826次
    • 积分:8587
    • 等级:
    • 排名:第2338名
    • 原创:616篇
    • 转载:52篇
    • 译文:4篇
    • 评论:40条
    文章分类
    最新评论