其他分享
首页 > 其他分享> > VPP中VRF

VPP中VRF

作者:互联网

一、创建删除以及端口绑定vrf表 

vpp# ip table ?
ip table                                 ip table [add|del] <table-id>
vpp# ip6 table ?
  ip6 table                                ip6 table [add|del] <table-id>
ip6 table add 100	//ip6接口VRF表100
//将eth1网卡绑定到vrf100上面
set interface ip6 table eth1 100		//当作主干路由出口,将该端口绑定到主vrf 0

重点:需要在端口绑定完VRF之后,再设置IP地址。ip参数是设置ipv4的vrf,ip6参数是设置ipv6的vrf,两种ip形式分别拥有默认ID为0的vrf,并相互不重叠。

 

二、显示VRF

显示指定vrf表或所有表

vpp# show ip fib ?
  show ip fib                              show ip fib [summary] [table <table-id>] [index <fib-id>] [<ip4-addr>[/<mask>]] [mtrie] [detail]

vpp#show ip fib table 100
ipv4-VRF:100, fib_index:1, flow hash:[src dst sport dport proto ] locks:[src:CLI:3, ]
0.0.0.0/0
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:9 buckets:1 uRPF:7 to:[0:0]]
    [0] [@0]: dpo-drop ip4
0.0.0.0/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:10 buckets:1 uRPF:8 to:[0:0]]
    [0] [@0]: dpo-drop ip4
224.0.0.0/4
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:12 buckets:1 uRPF:10 to:[0:0]]
    [0] [@0]: dpo-drop ip4
240.0.0.0/4
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:11 buckets:1 uRPF:9 to:[0:0]]
    [0] [@0]: dpo-drop ip4
255.255.255.255/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:11 to:[0:0]]
    [0] [@0]: dpo-drop ip4

显示所有vrf总览

vpp# show ip fib summary
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] locks:[src:plugin-hi:2, src:default-route:1, ]
    Prefix length         Count
                   0               1
                   4               2
                  32               2
ipv4-VRF:100, fib_index:1, flow hash:[src dst sport dport proto ] locks:[src:CLI:3, ]
    Prefix length         Count
                   0               1
                   4               2
                  32               2

 

Turbock 发布了41 篇原创文章 · 获赞 12 · 访问量 1万+ 私信 关注

标签:index,VPP,ip,fib,VRF,ip4,dpo,table
来源: https://blog.csdn.net/turbock/article/details/104197407