Basic:
1. Action: Run VPP
sudo vpp unix {cli-listen /run/vpp/cli-${name}.sock} api-segment { prefix ${name} }
2. Action: Using vppctl to send commands to vpp
sudo vppctl -s /run/vpp/cli-${name}.sock ${cmd}
3. Action: Using vppctl to start a vpp shell
sudo vppctl -s /run/vpp/cli-${name}.sock
4. Action: Show interface
sudo vppctl -s /run/vpp/cli-${name}.sock show interface
5. Action: Show hardware
sudo vppctl -s /run/vpp/cli-${name}.sock show hardware
Interface:
1. Action: Create vpp host-interface
sudo vppctl -s /run/vpp/cli-${name}.sock create host-interface name ${int-name}
2. Action: Create loopback interface
sudo vppctl -s /run/vpp/cli-${name}.sock create loopback interface
3. Action: Turn up the interface:
sudo vppctl -s /run/vpp/cli-${name}.sock set int state ${int-name} up
4. Action: Assign ip address
sudo vppctl -s /run/vpp/cli-${name}.sock set int ip address ${int-name} ${ip}
5. Action: Create the sub-interface
sudo vppctl -s /run/vpp/cli-${name}.sock create sub-interfaces ${int-name} ${sub-int-num}
Switch:
1. Action: show bridge-domain
sudo vppctl -s /run/vpp/cli-${name}.sock show bridge-domain
2. Action: Add interface to bridge domain
sudo vppctl -s /run/vpp/cli-${name}.sock set interface l2 bridge ${int-name} 1
3. Action: Show bridge domain
sudo vppctl -s /run/vpp/cli-${name}.sock show bridge-domain ${id} detail
4. Action: Show fib
sudo vppctl -s /run/vpp/cli-${name}.sock show l2fib verbose
5. Action: Show arp
sudo vppctl -s /run/vpp/cli-${name}.sock show ip arp
Route:
Action: Setup route
sudo vppctl -s /run/vpp/cli-${name}.sock ip route add ${ip} via ${ip}
Debug:
1. Action: Add trace
sudo vppctl -s /run/vpp/cli-${name}.sock trace add af-packet-input 10