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#
DBGvpp# show hardware-interface Name Idx Link Hardware UnknownEthernet5/0/0 1 up UnknownEthernet5/0/0 Link speed: 40 Gbps Ethernet address 44:a1:91:a4:9b:eb ### UNKNOWN ### carrier up full duplex mtu 9206 flags: admin-up pmd maybe-multiseg rx-ip4-cksum Devargs: rx: queues 1 (max 16), desc 1024 (min 128 max 4096 align 1) tx: queues 1 (max 16), desc 1024 (min 128 max 4096 align 1) pci: device 19e5:0200 subsystem 19e5:d139 address 0000:05:00.00 numa 0 max rx packet len: 9622 promiscuous: unicast off all-multicast on vlan offload: strip off filter off qinq off rx offload avail: vlan-strip ipv4-cksum udp-cksum tcp-cksum tcp-lro vlan-filter jumbo-frame scatter rss-hash rx offload active: ipv4-cksum jumbo-frame scatter tx offload avail: vlan-insert ipv4-cksum udp-cksum tcp-cksum sctp-cksum tcp-tso outer-ipv4-cksum multi-segs tx offload active: multi-segs rss avail: ipv4-frag ipv4-tcp ipv4-udp ipv4 ipv6-tcp-ex ipv6-udp-ex ipv6-frag ipv6-tcp ipv6-udp ipv6-ex ipv6 rss active: none tx burst function: hinic_xmit_pkts rx burst function: hinic_recv_pkts tx frames ok 6 tx bytes ok 252 rx frames ok 379601 rx bytes ok 49764225 -- more -- (1-30/82)