From 058f80a04fb24404c3f4396a45051fbc4ba05b62 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Tue, 17 Mar 2020 11:21:40 +0100 Subject: [HICN-551] Removed source code that uses acl - Removed punting from the sysrepo-plugin - Removed calls to the punting functions of binary api in the libhicnctrl - Added documentation in vpp-plugin.md and doxygen related to pg Change-Id: I8936156d51524797441ec49f0d5e801a1ad3643a Signed-off-by: Alberto Compagno --- docs/source/vpp-plugin.md | 107 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 15 deletions(-) (limited to 'docs/source/vpp-plugin.md') diff --git a/docs/source/vpp-plugin.md b/docs/source/vpp-plugin.md index 0200e38b7..f93479da8 100644 --- a/docs/source/vpp-plugin.md +++ b/docs/source/vpp-plugin.md @@ -255,8 +255,7 @@ hicn fib {{add | delete } prefix face } | set strategy src n_ifaces name lifetime intfc max_seq n_flows - :set if the underlying forwarder is configured as ip or hicn +hicn pgen client src n_ifaces name lifetime intfc max_seq n_flows :source address to use in the interests, i.e., the locator for routing the data packet back :set the number of ifaces (consumer faces) to emulate. If more than one, each interest is sent times, each of it with a different source address calculated from :prefix to use to generate hICN names @@ -269,24 +268,12 @@ hicn pgen client fwd src n_ifaces name life `hicn pgen server`: set an vpp forwarder as an hicn packet generator client. ```bash -hicn pgen server fwd name intfc size - :set if the underlying forwarder is configured as ip or hicn +hicn pgen server name intfc size :prefix to use to reply to interest :interface through which the forwarder receives interest :size of the data payload ``` -`hicn punting`: manipulates punting rules. - -```bash -hicn punting {add|delete} prefix intfc {type ip | type src_port dst_port } - :prefix to punt to the hICN plugin - :software interface where to apply the punting - :creates a punting rule for hICN packet encapsulated into a ip4/6|udp tunnel or for regular hicn packet - :source port of the udp4/6 tunnel - :destination port of the udp4/6 tunnel -``` - `hicn show`: show forwarder information. ```bash @@ -369,3 +356,93 @@ Then `ping_client` on the host where forwarder B is running: ```bash sudo ping_client -n b002::1 ``` + +### Example: packet generator + +The packet generator can be used to test the performace of the hICN plugin, as +well as a tool to inject packet in a forwarder or network for other test use +cases It is made of two entities, a client that inject interest into a vpp +forwarder and a server that replies to any interest with the corresponding +data. Both client and server can run on a vpp that is configured to forward +interest and data as if they were regular ip packet or exploiting the hICN +forwarding pipeline (through the hICN plugin). In the following examples we show +how to configure the packet generator in both cases. We use two forwarder A and +B as in the previous example. However, both the client and server packet +generator can run on the same vpp forwarder is needed. + + +#### IP Forwarding + +##### Forwarder A (client) + +```bash +sudo vppctl +vpp# set interface ip address TenGigabitEtherneta/0/0 2001::2/64 +vpp# set interface state TenGigabitEtherneta/0/0 up +vpp# ip route add b001::/64 via 2001::3 TenGigabitEtherneta/0/0 +vpp# hicn pgen client src 2001::2 name b001::1/64 intfc TenGigabitEtherneta/0/0 +vpp# exec /pg.conf +vpp# packet-generator enable-stream hicn-pg +``` + +Where the file pg.conf contains the description of the stream to generate +packets. In this case the stream sends 10 millions packets at a rate of 1Mpps + +```bash +packet-generator new { + name hicn-pg + limit 10000000 + size 74-74 + node hicnpg-interest + rate 1e6 + data { + TCP: 5001::2 -> 5001::1 + hex 0x000000000000000050020000000001f4 + } +} +``` + +##### Forwarder B (server) + +```bash +sudo vppctl +vpp# set interface ip address TenGigabitEtherneta/0/1 2001::3/64 +vpp# set interface state TenGigabitEtherneta/0/1 up +vpp# hicn pgen server name b001::1/64 intfc TenGigabitEtherneta/0/1 +``` + +#### hICN Forwarding + +##### Forwarder A (client) + +```bash +sudo vppctl +vpp# set interface ip address TenGigabitEtherneta/0/0 2001::2/64 +vpp# set interface state TenGigabitEtherneta/0/0 up +vpp# hicn face ip add remote 2001::3 intfc TenGigabitEtherneta/0/0 +vpp# hicn fib add prefix b001::/64 face 0 +vpp# create loopback interface +vpp# set interface state loop0 up +vpp# set interface ip address loop0 5002::1/64 +vpp# ip neighbor loop0 5002::2 de:ad:00:00:00:00 +vpp# hicn pgen client src 5001::2 name b001::1/64 intfc TenGigabitEtherneta/0/0 +vpp# exec /pg.conf +vpp# packet-generator enable-stream hicn-pg +``` + +The file pg.conf is the same showed in the previous example + +##### Forwarder B (server) + +```bash +sudo vppctl +vpp# set interface ip address TenGigabitEtherneta/0/1 2001::3/64 +vpp# set interface state TenGigabitEtherneta/0/1 up +vpp# create loopback interface +vpp# set interface state loop0 up +vpp# set interface ip address loop0 2002::1/64 +vpp# ip neighbor loop1 2002::2 de:ad:00:00:00:00 +vpp# hicn face ip add remote 2002::2 intfc loop0 +vpp# hicn fib add prefix b001::/64 face 0 +vpp# hicn pgen server name b001::1/64 intfc loop0 +``` -- cgit 1.2.3-korg