代码拉取完成,页面将自动刷新
# Testing with net-tools and Docker
* Create Docker image
cd docker/
docker build -t net-tools .
* Setup network interfaces, IP addresses and routes
sudo ./net-setup.sh --config docker.conf start
* Run Docker image
Set the docker internal network name to the value $DOCKER_USER_INTERFACE
in docker.config above, default is 'net-tools0'. The bridge network that
docker creates will be printed on standard out, it's bridge interface
name will be br-XXXXXXXXXXXX. Check that the IPv4 and IPv6 addresses
given on the docker command line match the subnets in 'docker.conf'.
Interactively:
docker run --hostname=zephyr --name=net-tools \
--ip=192.0.2.2 --ip6=2001:db8::2 \
--rm -it --network=net-tools0 net-tools sh
exit with Ctrl-p ctrl-q to execute tests from the command line
Non-interactively
docker run --hostname=zephyr --name=net-tools \
--ip=192.0.2.2 --ip6=2001:db8::2 \
--rm -dt --network=net-tools0 net-tools sh
* Run Qemu / native-posix image
rm -rf build && mkdir build
cmake -GNinja -DBOARD=native_posix -B build
or
cmake -GNinja -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-e1000.conf \
-B build
ninja -C build run
* Execute tests like echo-client
docker container exec net-tools /net-tools/echo-client 2001:db8::1
docker container exec net-tools /net-tools/echo-client -t 2001:db8::1
docker container exec net-tools /net-tools/echo-client 192.0.2.1
docker container exec net-tools /net-tools/echo-client -t 192.0.2.1
* Remove the network setup:
sudo ./net-setup.sh --config docker.conf stop
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。