5avlib的简单介绍

5avlib的简单介绍 第1张

create sub BondEthernet0 834

创建子接口,tag是834

set interface ip table BondEthernet0.834 1

将此接口设置在fib 1里

set interface ip address BondEthernet0.834 192.168.0.250/24

设置接口ip

set interface state BondEthernet0.834 up

up接口

set interface l2 bridge BondEthernet0.834 834

将此接口设置到bridge 834里

set ip arp GigabitEthernet2/6/0 192.168.2.2 00:0c:29:dc:96:f8

设置静态arp

ip route add 1.2.3.0/24 via GigabitEthernet2/6/0

添加路由

create vhost socket /tmp/sock2.sock server

创建vhost接口

l2fib add fa:16:3e:b0:a9:71 834 BondEthernet0.834

添加二层转发流表

create host-interface name vpp5a

创建veth口,name后参数名字必须

和Linux里创建的veth口名字对应

set dhcp proxy server 6.0.0.1

设置dhcp代理

set dhcp proxy server 6.0.0.1 add-option-82

携带client-facing interface FIB number 作为 DHCP option 82 的 circuit-ID.

并设置suboption 5 为 client-facing interface上的第一个ipv4地址

set dhcp option-82 address [delete] <interface> <ip4-address>

手动调整 suboption-5的ipv4地址

set interface ip source-check GigabitEthernet2/0/0

set interface ip source-check GigabitEthernet2/0/0 del

开启或关闭source RPF检查

set ip6 neighbor [del] <intfc> <ip6-address> <mac-address>

设置ipv6邻居

set dpdk interface descriptors TenGigabitEthernet6/0/0 tx/rx 1024

设置发送或是接收队列大小

set dpdk interface descriptors interface0/0/0 rx 1 tx 1024

设置此接口rx或是tx队列大小,intel人说2000-4000差距不大

trace add dpdk-input 8

跟踪dpdk接口数据包 (dpdk-input是节点的名字,想跟踪任何节点都可以)

trace add vhost-user-input 8

跟踪vhost接口数据包

trace add af-packet-input 8

跟踪veth接口数据包

show hardware-interfaces

查看接口mac

show vlib graph

查看node逻辑图

show threads

查看vpp线程

show l2fib

查看二层转发流表

show ip fib

查看路由表

show ip arp

查看arp

show affinity

查看主线程cpu亲和性

show version

查看vpp版本

show int

查看接口统计

show interfaces address

查看接口ip

show bridge-domain

查看bridge 接口情况

show dhcp option-82 addresses

显示dhcp option-82 suboption-5 ip地址

show pci

显示pci信息

show vxlan tunnel

显示vxlan隧道详细信息

show bond `or` show bond details

显示bond接口信息

show bridge-domain <index> details

显示某个桥的详细信息

show ip fib table <table-ID>

显示某条fib表的路由信息

show ip scan-neighbor

显示ip遍历邻居

ip scan-neighbor [ip4|ip6|both|disable] [interval <n-min>] [max-time <n-usec>] [max-update <n>] [delay <n-msec>] [stale <n-min>]

开启遍历邻居ip scan-neighbor

show ip6 neighbors

显示ipv6 邻居