Difference between revisions of "VPP/HostStack/TestProxy"
Florin.coras (Talk | contribs) |
Florin.coras (Talk | contribs) |
||
Line 19: | Line 19: | ||
$ wget http://6.0.1.1/test-content | $ wget http://6.0.1.1/test-content | ||
− | Note that this assumes that a file named "test-content" exists in the folder wherefrom the SimpleHTTPServer was started. | + | Note that this assumes that a file named "test-content" exists in the folder wherefrom the <code>SimpleHTTPServer</code> was started. |
Revision as of 02:01, 11 June 2018
This is a test application that acts as a transport layer proxy. Note that is has only been tested with a TCP transport.
One simple way to test the application is to add a tap interface to vpp, start a python SimpleHTTPServer
that listens for connections incoming on the tap interface and, finally, a client that connects via a second vpp interface to the proxied content. The second interface can be a dpdk interface or another tap interface. In the example below, we use a dpdk interface.
Start vpp with a dpdk interface and add a tap interface:
# set int ip address <dpdk-interface> 6.0.1.1/24 # set int state <dpdk-interface> up # create tap host-ip4-addr 6.0.2.2/24 # set int ip addr tap0 6.0.2.1/24 # set int state tap0 up
Start the proxy app on the host:
# test proxy server server-uri tcp://0.0.0.0/80 client-uri tcp://6.0.2.2/80
From a different host with connectivity to the dpdk-interface
:
$ wget http://6.0.1.1/test-content
Note that this assumes that a file named "test-content" exists in the folder wherefrom the SimpleHTTPServer
was started.