NameDateSize

..13-Mar-2018195

.gitignoreH A D13-Mar-2018117

configure.acH A D13-Mar-2018446

LICENSEH A D13-Mar-201811.1 KiB

Makefile.amH A D23-Aug-2018502

README.mdH A D19-Jul-20183.3 KiB

router/H10-Jun-2019123

router.mkH A D13-Mar-2018315

README.md

1# A plugin to help accelerate IPv4 routing
2
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.
8
9More information can be found on the wiki page:
10- http://wiki.fd.io/view/VPP_Sandbox/router
11
12## Build/Install
13
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.
19
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'.
23
24```
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/
30```
31
32Now build everything and create a link to the plugin in vpp's plugin path.
33
34```
35$ cd build-root
36$ ./bootstrap.sh
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 \
39         /usr/lib/vpp_plugins/router.so
40```
41
42Once VPP is running and the plugin is loaded, data plane interfaces can
43be tapped.
44
45```
46$ vppctl enable tap-inject
47```
48
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.
54
55## Administrative
56
57### Current status
58
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).
62
63### Objective
64
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.
68
69### MPLS related enhancement to router plugin
70
71Some changes made to router plugin enable it to support mpls label encapsulation.
72
73To test this feature, first install router plugin using instructions
74in section "Build/Install", and then run following commands
75
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
80
81You should see labels in ip fib table.
82
83you can also run following commands
84
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
90
91You should see dst label and interface in mpls table.
92
93### Selinux
94
95Router plugin needs those rules to work under selinux enforcing mode:
96
97```
98allow vpp_t self:netlink_route_socket nlmsg_read;
99```
100
101### Main contributors
102
103Jeff Shaw - LF-ID:jbshaw, Chad Chengwei Wang - LF-ID:flinter (MPLS)
104