你只需要一个能运行openwrt的硬件,然后设置你设备的默认网关为openwrt设备即可。
$ docker import http://downloads.openwrt.org/attitude_adjustment/12.09/x86/generic/openwrt-x86-generic-rootfs.tar.gz openwrt-x86-generic-rootfs
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
openwrt-x86-generic-rootfs latest 2cebd16f086c 6 minutes ago 5.283 MB
$ docker run -i openwrt-x86-generic-rootfs -name openwrt /sbin/init
$ docker exec -it openwrt /bin/ash
ref: https://openwrt.org/docs/guide-user/virtualization/docker_openwrt_image
raspberry pi 3B :https://archive.openwrt.org/releases/21.02.2/targets/bcm27xx/bcm2710/openwrt-21.02.2-bcm27xx-bcm2710-rpi-3-ext4-factory.img.gz
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
https://firmware-selector.openwrt.org/?version=21.02.0&target=bcm27xx%2Fbcm2710&id=rpi-3
Linux下的USB可能有些问题,可能是缓冲区太大了。
@startuml
!include <office/Servers/application_server>
!include <office/Servers/database_server>
nwdiag {
network chinamobile {
router [address = "210.x.x.1", description="<&wifi*4>"];
other_routers [address = "x"];
}
network internal {
address = "192.168.1.0/24";
router [address = "192.168.1.1"];
rpi [address = "192.168.1.10", description="<&wifi*4>\n rpi"];
phone1 [description="<&phone*4>\n phone\n gw=192.168.1.10"];
phone2 [description="<&tablet*4>\n tablet\n gateway=192.168.1.10"];
pc [description="<$database_server>\n pc"];
macbook [description="<&laptop*4>\n laptop"];
}
}
@enduml