首页 > 其他 > 详细

VPP + vxlan

时间:2020-04-21 19:51:50      阅读:185      评论:0      收藏:0      [点我收藏+]

 

DBGvpp# show int
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count     
UnknownEthernet5/0/0              1     down         9000/0/0/0     
local0                            0     down          0/0/0/0       
DBGvpp# set int state UnknownEthernet5/0/0 up                    
DBGvpp# show int                             
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count     
UnknownEthernet5/0/0              1      up          9000/0/0/0     rx packets                   184
                                                                    rx bytes                   27071
                                                                    drops                        184
                                                                    ip6                            2
local0                            0     down          0/0/0/0
DBGvpp# set int ip addr  UnknownEthernet5/0/0 192.168.1.229/24
DBGvpp# vppctl create vxlan tunnel src 192.168.1.229  dst 192.168.1.82 vni 10 
unknown input `vppctl create vxlan tunnel src...DBGvpp#  create vxlan tunnel src 192.168.1.229  dst 192.168.1.82 vni 10      
vxlan_tunnel0
//将vxlan 10的master设置为 inx 1 <
UnknownEthernet5/0/0> 的设备
DBGvpp#
set int l2 bridge vxlan_tunnel0 1

DBGvpp# show int
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count     
UnknownEthernet5/0/0              1      up          9000/0/0/0     rx packets                 27407
                                                                    rx bytes                 3519075
                                                                    tx packets                     1
                                                                    tx bytes                      42
                                                                    drops                      27326
                                                                    punt                          81
                                                                    ip4                          134
                                                                    ip6                          251
                                                                    rx-miss                    12129
local0                            0     down          0/0/0/0       
vxlan_tunnel0                     2      up           0/0/0/0       
DBGvpp# show bridge 1 detail
  BD-ID   Index   BSN  Age(min)  Learning  U-Forwrd   UU-Flood   Flooding  ARP-Term  arp-ufwd   BVI-Intf 
    1       1      0     off        on        on       flood        on       off       off        N/A    

           Interface           If-idx ISN  SHG  BVI  TxFlood        VLAN-Tag-Rewrite       
         vxlan_tunnel0           2     1    0    -      *                 none             
DBGvpp# 
DBGvpp# set int state vxlan_tunnel0 up

 

DBGvpp# create host-interface name ns1   
create host-interface: Invalid interface name
DBGvpp#
添加ns1

[root@localhost vpp]# ip netns add ns1
[root@localhost vpp]# ip netns list
ns1

还是报错

DBGvpp# create host-interface name ns1
create host-interface: Invalid interface name
DBGvpp#


添加veth
ip link add name ns1_tap type veth peer ns1_veth

 

技术分享图片

 

 

ns1_tap是master namespace中的设备

DBGvpp# create host-interface name ns1_tap host-ns1_tap DBGvpp#

 

DBGvpp# show int                                                                        
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count     
UnknownEthernet5/0/0              1      up          9000/0/0/0     rx packets                 92498
                                                                    rx bytes                11958913
                                                                    tx packets                     1
                                                                    tx bytes                      42
                                                                    drops                      92223
                                                                    punt                         275
                                                                    ip4                          492
                                                                    ip6                          857
                                                                    rx-miss                    41687
host-ns1_tap                      3     down         9000/0/0/0     
local0                            0     down          0/0/0/0       
vxlan_tunnel0                     2      up           0/0/0/0       
DBGvpp# set int state host-ns1_tap up
DBGvpp# set int l2 bridge host-ns1_tap 1
DBGvpp# show int addr
UnknownEthernet5/0/0 (up):
  L3 192.168.1.229/24
host-ns1_tap (up):
  L2 bridge bd-id 1 idx 1 shg 0  
local0 (dn):
vxlan_tunnel0 (up):
  L2 bridge bd-id 1 idx 1 shg 0  
DBGvpp# 

 

VPP + vxlan

原文:https://www.cnblogs.com/dream397/p/12747136.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!