diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-08-09 23:19:13 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-08-18 21:17:29 +0200 |
commit | bda79ba401afbfacfb4f01a4694186de8c87478e (patch) | |
tree | 436f35f5d97ea4271b8c68f4dd9b200b362da034 /README.md | |
parent | b516d151b186835c554e7521b685b41971aabb0d (diff) | |
download | passt-bda79ba401afbfacfb4f01a4694186de8c87478e.tar passt-bda79ba401afbfacfb4f01a4694186de8c87478e.tar.gz passt-bda79ba401afbfacfb4f01a4694186de8c87478e.tar.bz2 passt-bda79ba401afbfacfb4f01a4694186de8c87478e.tar.lz passt-bda79ba401afbfacfb4f01a4694186de8c87478e.tar.xz passt-bda79ba401afbfacfb4f01a4694186de8c87478e.tar.zst passt-bda79ba401afbfacfb4f01a4694186de8c87478e.zip |
doc: Rewrite demo script
The original demo script was written when pasta wasn't a thing yet,
so it needed to run as root, set up a veth pair, and configure
addresses and routes by itself.
Now pasta can do all that for us, and become part of the demo as
well.
Further, extend it to start qemu, optionally preparing a basic demo
image with mbuto (https://mbuto.sh), and execute one logical step at
a time, for clarity.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 29 |
1 files changed, 13 insertions, 16 deletions
@@ -541,25 +541,11 @@ See also the [test logs](/builds/latest/test/). man ./passt.1 -* run the demo script, that creates a network namespace called `passt`, sets up - sets up a _veth_ pair and and addresses, together with NAT for IPv4 and NDP - proxying for IPv6, then starts _passt_ in the network namespace: +* run the demo script, that detaches user and network namespaces, configures the + new network namespace using `pasta`, starts `passt` and, optionally, `qemu`: doc/demo.sh -* from the same network namespace, start qemu. At the moment, qemu doesn't - support UNIX domain sockets for the `socket` back-end. Two alternatives: - - * use the _qrap_ wrapper, which maps a tap socket descriptor to _passt_'s - UNIX domain socket, for example: - - ip netns exec passt ./qrap 5 qemu-system-x86_64 ... -net socket,fd=5 -net nic,model=virtio ... - - * or patch qemu with [this patch](/passt/tree/qemu/0001-net-Allow-also-UNIX-domain-sockets-to-be-used-as-net.patch) - and start it like this: - - qemu-system-x86_64 ... -net socket,connect=/tmp/passt.socket -net nic,model=virtio - * alternatively, you can use libvirt, with [this patch](/passt/tree/libvirt/0001-conf-Introduce-support-for-UNIX-domain-socket-as-qem.patch), to start qemu (with the patch mentioned above), with this kind of network interface configuration: @@ -613,6 +599,17 @@ See also the [test logs](/builds/latest/test/). dhclient -6 + * alternatively, start pasta as: + + ./pasta --config-net + + to let pasta configure networking in the namespace by itself, using + `netlink` + + * ...or run the demo script: + + doc/demo.sh + * and that's it, you should now have TCP connections, UDP, and ICMP/ICMPv6 echo working from/to the namespace for IPv4 and IPv6 |