DBGvpp# show interface
Name Idx State Counter Count
local0 0 down
호스트에 vpp0라는 인터페이스가 생긴다.
Create Veth
ip netns add ns0 ip link add vpp0 type veth peer name vethns0 ip link set vethns0 netns ns0 ip netns exec ns0 ip link set lo up ip netns exec ns0 ip link set vethns0 up ip netns exec ns0 ip addr add 6.0.0.1/16 dev vethns0
ip link set vpp0 up
호스트에 vpp0라는 인터페이스가 생긴다.
Create Veth
ip netns add ns1 ip link add vpp1 type veth peer name vethns1 ip link set vethns1 netns ns1 ip netns exec ns1 ip link set lo up ip netns exec ns1 ip link set vethns1 up ip netns exec ns1 ip addr add 6.0.0.2/16 dev vethns1
ip link set vpp1 up
VPP 에서는 해당 interface를 자신의 int 로 만들수 있다.
명령어: create host-interface name <if_name>
DBGvpp# create host-interface name vpp0
host-vpp0
DBGvpp# show interface
Name Idx State Counter Count
host-vpp0 1 down
local0 0 down