1# A plugin to help accelerate IPv4 routing
3This repository provides a plugin to hook up data plane interfaces, via
4tap interfaces, to a host operating system. The host operating system
5can run a route daemon referencing the tap interface(s) as if they were
6the data plane interfaces. IPv4 packet forwarding decisions are taken
7in the data path, while control traffic is sent to and handled by the host.
9More information can be found on the wiki page:
14The router is implemented as a plugin to inject, e.g. arp, icmp4, traffic
15from data plane devices. To use it, you must build the plugin and put it
16in VPPs runtime plugin directory. The plugin depends on vpp and the netlink
17repository from the vppsb project. This README assumes familiarity with the
18build environment for both projects.
20Build vpp, netlink, and router all at once by creating symbolic links in the
21top level vpp directory to the netlink and router directories as well as
22symbolic links to the respective .mk files in 'build-data/packages'.
25$ cd /git/vpp
26$ ln -sf /git/vppsb/netlink
27$ ln -sf /git/vppsb/router
28$ ln -sf ../../netlink/netlink.mk build-data/packages/
29$ ln -sf ../../router/router.mk build-data/packages/
32Now build everything and create a link to the plugin in vpp's plugin path.
35$ cd build-root
37$ make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install
38$ ln -sf /git/vpp/build-root/install-vpp_debug-native/router/lib64/router.so.0.0.0 \
42Once VPP is running and the plugin is loaded, data plane interfaces can
46$ vppctl enable tap-inject
49The host operating system should see a tap named 'vpp0' with the same hardware
50address as 'TenGigabitEthernet2/0/0'. Adding an IPv4 interface address to 'vpp0'
51should cause the address to be added to the data plane interface as well. If
52the address is a network address, a route should be added to the data
53plane's default fib.
57### Current status
59Currently the router plugin handles ARP, locally destined ICMPv4 and OSPF
60traffic. It supports the classifier directing packets from an ip4-table to
61the 'tap-inject-neighbor' node (for handling multicast OSPF and IGMP).
65The objective of this project is to continue to build out better integration
66with host operating system and for providing a basis to enable completely
67or partially unmodified applications to take advantage of a fast datapath.
69### MPLS related enhancement to router plugin
71Some changes made to router plugin enable it to support mpls label encapsulation.
73To test this feature, first install router plugin using instructions
74in section "Build/Install", and then run following commands
76$vppctl enable tap-inject
77$ifconfig vpp0 <IP> up
78$ip route add <IP> encap mpls <LABELS> via <IP> dev vpp0
79$vppctl show ip fib
81You should see labels in ip fib table.
83you can also run following commands
85$vppctl enable tap-inject
86$vppctl mpls table add 0
87$vppctl set int mpls <INTERFACE> enable
88$ip -f mpls route add 333 dev vpp0
89$vppctl show mpls fib
91You should see dst label and interface in mpls table.
95Router plugin needs those rules to work under selinux enforcing mode:
98allow vpp_t self:netlink_route_socket nlmsg_read;
101### Main contributors
103Jeff Shaw - LF-ID:jbshaw, Chad Chengwei Wang - LF-ID:flinter (MPLS)