摘要:Docker
,網(wǎng)橋
摄乒,Linux
悠反,路由
,網(wǎng)關(guān)
問題復(fù)現(xiàn)
網(wǎng)上這個(gè)問題出現(xiàn)的挺多的馍佑,我也總結(jié)一下斋否,因?yàn)槔锩嫔婕暗降木W(wǎng)絡(luò)基礎(chǔ)知識(shí)比較多的,正好我一直不懂這一塊拭荤,需要大補(bǔ)
問題:openvpn掛vpn連接遠(yuǎn)程主機(jī)茵臭,發(fā)現(xiàn)無法ping通遠(yuǎn)程主機(jī)IP:172.20.2.52,以前一直可以遠(yuǎn)程登錄
問題排查
先route
一波查看一下路由表舅世,看一下主機(jī)訪問172.20.2.52的路由路徑
root@ubuntu:/etc/openvpn# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default bogon 0.0.0.0 UG 600 0 0 wlp2s0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 br-3b2a750ddc03
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-e2cde023b4a7
172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-94d6396c6c12
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-3b2a750ddc03
192.168.43.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
發(fā)現(xiàn)和目標(biāo)IP 172.20.2.52相似的目標(biāo)網(wǎng)段為172.20.0.0
旦委,看后面的接口為br-3b2a750ddc03
奇徒,也即是說數(shù)據(jù)被轉(zhuǎn)發(fā)到這個(gè)接口下,這貌似是個(gè)docker創(chuàng)建的網(wǎng)橋社证,懷疑是docker網(wǎng)橋占用了172.20網(wǎng)段逼龟,查看以下docker網(wǎng)絡(luò)
root@ubuntu:/etc/openvpn# docker network ls
NETWORK ID NAME DRIVER SCOPE
22021490da82 bridge bridge local
e2cde023b4a7 harbor_harbor bridge local
e4aa16aea5df host host local
3b2a750ddc03 milvus bridge local
2d89edc384b1 none null local
94d6396c6c12 test_default bridge local
看到3b2a750ddc03為命名為milvus的docker網(wǎng)絡(luò),原來是milvus的容器創(chuàng)建的網(wǎng)橋追葡,進(jìn)一步檢查網(wǎng)絡(luò)內(nèi)部信息
root@ubuntu:/etc/openvpn# docker network inspect 3b2a750ddc03
可以看到所屬的容器id和容器名
"Containers": {
"22b638b8d2f05f3f8b17c62c63c00cd67ec60887fe20be19cc8f6bfb278c123b": {
"Name": "milvus-standalone",
"EndpointID": "e14a0676adba99908ab113a866650752e0e3ca21381d54ea43f6f4a33aca0fe0",
"MacAddress": "02:42:ac:19:00:04",
"IPv4Address": "172.20.0.4/16",
"IPv6Address": ""
},
"39ef60cd098c20efc62f6668375988786d1874a0f1711c15b947e46bd4da80be": {
"Name": "milvus-etcd",
"EndpointID": "34104d54ae9d3e4834fafb8d7c475d5690acff08955e7d08686999c78ccb220f",
"MacAddress": "02:42:ac:19:00:03",
"IPv4Address": "172.20.0.3/16",
"IPv6Address": ""
},
"d55dc8c8e4cce63ceb386e24ee05e27099826ec0c892aa77bb4998a99e9a67a6": {
"Name": "milvus-minio",
"EndpointID": "4eb0c415c175b7780a94ed72d09a574bad9797039a122a942bcac0e391186cfa",
"MacAddress": "02:42:ac:19:00:02",
"IPv4Address": "172.20.0.2/16",
"IPv6Address": ""
}
},
可見這個(gè)網(wǎng)絡(luò)接口下目標(biāo)主機(jī)只有172.20.0.2腺律,172.20.0.3,172.20.0.4三臺(tái)主機(jī)IP宜肉,以及172.20.0.1網(wǎng)關(guān)匀钧,因此ping 172.20.2.52根本ping不通。
milvus的三個(gè)容器虛擬IP以及網(wǎng)關(guān)服務(wù)占用了172.20網(wǎng)段谬返,openvpn創(chuàng)建的網(wǎng)段也是172.20.0.0之斯,因此在路由中產(chǎn)生網(wǎng)段沖突
,無法轉(zhuǎn)發(fā)到openvpn的對(duì)應(yīng)網(wǎng)絡(luò)接口遣铝,同理從172.17佑刷、18、19酿炸、20都是docker創(chuàng)建出來的網(wǎng)絡(luò)接口和網(wǎng)段瘫絮,如果有其他網(wǎng)絡(luò)服務(wù)處在相同網(wǎng)段可能導(dǎo)致無法路由到
解決方案
(1)路由表添加細(xì)路由
在路由尋址時(shí)會(huì)根據(jù)目標(biāo)IP在路由表中相同網(wǎng)絡(luò)ID(網(wǎng)段)的記錄,根據(jù)該記錄將數(shù)據(jù)轉(zhuǎn)發(fā)給下一個(gè)路由器填硕,如果路由表中存在多條相同網(wǎng)絡(luò)ID的記錄麦萤,根據(jù)最長匹配算則最吻合的一個(gè),因此增加一個(gè)172.20.2.0/24
的目標(biāo)網(wǎng)段即可扁眯,使用route add
進(jìn)行添加壮莹,添加目的地網(wǎng)段為172.20.2.0/24,網(wǎng)絡(luò)接口為tun0
root@ubuntu:/etc/openvpn# route add -net 172.20.2.0/24 dev tun0
tun0是openvpn創(chuàng)建的網(wǎng)絡(luò)接口姻檀,使用ifconfig查看
root@ubuntu:/etc/openvpn# ifconfig
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.0.1.65 netmask 255.255.255.255 destination 10.0.1.66
inet6 fe80::7778:a3ae:badc:d759 prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 48 (48.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
再看一下路由已經(jīng)成功添加了一條細(xì)路由
root@ubuntu:/etc/openvpn# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default bogon 0.0.0.0 UG 600 0 0 wlp2s0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 br-3b2a750ddc03
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-e2cde023b4a7
172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-94d6396c6c12
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-3b2a750ddc03
172.20.2.0 0.0.0.0 255.255.0.0 U 0 0 0 tun0
192.168.43.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
此時(shí)再ping 172.20.2.52已經(jīng)可以ping通
root@ubuntu:/etc/openvpn# ping 172.20.2.52
PING 172.20.2.52 (172.20.2.52) 56(84) bytes of data.
64 bytes from 172.20.2.52: icmp_seq=1 ttl=126 time=45.2 ms
64 bytes from 172.20.2.52: icmp_seq=2 ttl=126 time=43.1 ms
(2)刪除docker-compose網(wǎng)橋路由
另一種方法是找到docker網(wǎng)橋?qū)?yīng)的容器應(yīng)用之后直接刪除容器命满,則對(duì)應(yīng)的網(wǎng)絡(luò)接口和路由都會(huì)刪除,進(jìn)入milvus工程目錄使用docker-compose停止和刪除容器即可
root@ubuntu:~/docker/compose/milvus# docker-compose down
Removing milvus-standalone ... done
Removing milvus-minio ... done
Removing milvus-etcd ... done
Removing network milvus
查看route路由表172.20.0.0網(wǎng)段已經(jīng)消失施敢,ifconfig周荐,docker network ls都已經(jīng)查不到對(duì)應(yīng)的網(wǎng)絡(luò)接口,此時(shí)再重啟openvpn即可
(3)修改docker-compose.yml配置網(wǎng)絡(luò)
docker-compose默認(rèn)會(huì)給每個(gè)應(yīng)用從172.18.0.0依次往后匹配網(wǎng)段僵娃,只要容器沒有被刪除則一直占用網(wǎng)絡(luò),如果刪除后重啟則依次采用新的網(wǎng)段之前的不再使用腋妙,因此很容易造成路由沖突默怨,可以在單個(gè)docker-compose.yml文件中增加networks配置,設(shè)置網(wǎng)段為10.103.0.0/16
networks:
default:
name: milvus
ipam:
driver: default
config:
- subnet: 10.103.0.0/16
重啟docker-compose骤素,此時(shí)路由和docker網(wǎng)絡(luò)都切換為了10.103.0.0/16網(wǎng)段
root@ubuntu:~/docker/compose/milvus# docker network ls|grep milvus
4a772f696084 milvus bridge local
root@ubuntu:~/docker/compose/milvus# route |grep br-4a772f696084
10.103.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-4a772f696084
root@ubuntu:~/docker/compose/milvus# docker network inspect 4a772f696084
"Containers": {
"71248b9185a5279bfd6a1c67d2a318554217beb94b8f5c0d9f837fc8480911dc": {
"Name": "milvus-minio",
"EndpointID": "2c39a39329eca0389eb6204e64f67869dedd787ea17d067fc23c9dd0f179dafa",
"MacAddress": "02:42:0a:67:00:03",
"IPv4Address": "10.103.0.3/16",
"IPv6Address": ""
},
"78adbd5868226361033c74532ea57d4fcbb5ef13f81fdd4e4fec531c19a9b629": {
"Name": "milvus-standalone",
"EndpointID": "711bb663135135189852e1ba39ab7c58b2acf84f5a5bb53fca00425efd08a234",
"MacAddress": "02:42:0a:67:00:04",
"IPv4Address": "10.103.0.4/16",
"IPv6Address": ""
},
"9d221d4fb00ff8a1dd8d95e3ed8198f134f2177ccccbb32f393595a29e1d884b": {
"Name": "milvus-etcd",
"EndpointID": "79bc5d0ffacb5a124ee5a2452c33346c871f6564bc446c21ba59516d080cfd19",
"MacAddress": "02:42:0a:67:00:02",
"IPv4Address": "10.103.0.2/16",
"IPv6Address": ""
}
(4)修改docker全局配置文件
修改全局docker網(wǎng)絡(luò)配置匙睹,docker自動(dòng)分配的網(wǎng)段使用12.11.0.0/16愚屁,每個(gè)子網(wǎng)掩碼劃分為 255.255.255.0
root@ubuntu:~/docker/compose/milvus# cat /etc/docker/daemon.json
{
"insecure-registries": ["http://192.168.1.28:80"],
"default-address-pools" : [
{
"base" : "12.11.0.0/16",
"size" : 24
}
]
}
重啟docker
root@ubuntu:~/docker/compose/milvus# systemctl daemon-reload
root@ubuntu:~/docker/compose/milvus# systemctl restart docker
再重新啟動(dòng)docker-compose,項(xiàng)目切換為指定的網(wǎng)段
root@ubuntu:~/docker/compose/milvus# docker-compose up -d
Creating network "milvus" with the default driver
Creating milvus-etcd ... done
Creating milvus-minio ... done
Creating milvus-standalone ... done
root@ubuntu:~/docker/compose/milvus# docker network inspect
"Config": [
{
"Subnet": "12.11.2.0/24",
"Gateway": "12.11.2.1"
}
]
},
"ConfigOnly": false,
"Containers": {
"335d4fb5fb97e3daaf4246dd76c6a90809ac841c36c05360baeab2e20b0ef0a1": {
"Name": "milvus-standalone",
"EndpointID": "5c51dd328f3baa31183512b40872ae3e281b6a339c702ac6ccdda893320299df",
"MacAddress": "02:42:0c:0b:02:04",
"IPv4Address": "12.11.2.4/24",
"IPv6Address": ""
},
"7311706aaaa23143297632afcb482f0585afcf5de8abc3af33e737c29af2b659": {
"Name": "milvus-minio",
"EndpointID": "10068465e847919b212089d0057ea3b860ffc00df817768ebe1e7f7305e9180f",
"MacAddress": "02:42:0c:0b:02:03",
"IPv4Address": "12.11.2.3/24",
"IPv6Address": ""
},
"a3e69162650f63b12e491e44fc8268768bb6ef252cc80ccb9636cc7f621980da": {
"Name": "milvus-etcd",
"EndpointID": "610ebfc3e0f090edea8b1d076b5930ce25770e227d1db4071a26d21ee5715e50",
"MacAddress": "02:42:0c:0b:02:02",
"IPv4Address": "12.11.2.2/24",
"IPv6Address": ""
}
},
不僅是docker-compose痕檬,docker run啟動(dòng)的容器的虛擬IP也變更為指定的網(wǎng)段
相關(guān)知識(shí)
(1)網(wǎng)絡(luò)基礎(chǔ)知識(shí)(網(wǎng)關(guān)霎槐、路由器)
網(wǎng)關(guān)
:網(wǎng)關(guān)是一個(gè)邏輯概念,網(wǎng)關(guān)是一個(gè)結(jié)點(diǎn)梦谜,是一個(gè)網(wǎng)絡(luò)連接到另一個(gè)網(wǎng)絡(luò)的關(guān)口丘跌,實(shí)質(zhì)上是一個(gè)網(wǎng)絡(luò)通向其他網(wǎng)絡(luò)的IP地址。兩個(gè)不同網(wǎng)段的網(wǎng)絡(luò)結(jié)點(diǎn)之間通信需要使用網(wǎng)關(guān)唁桩,如果網(wǎng)絡(luò)A的主機(jī)發(fā)現(xiàn)目標(biāo)主機(jī)不在本地網(wǎng)絡(luò)中就會(huì)把數(shù)據(jù)包發(fā)送到A的網(wǎng)關(guān)闭树,再轉(zhuǎn)發(fā)給網(wǎng)絡(luò)B的網(wǎng)關(guān),再轉(zhuǎn)發(fā)給網(wǎng)絡(luò)B荒澡。
路由器
:路由器是物理設(shè)備报辱,路由器可以作為網(wǎng)關(guān)使用,通常指的網(wǎng)關(guān)就是路由器的IP单山。主機(jī)1.1要發(fā)送數(shù)據(jù)包給主機(jī)4.1碍现,因?yàn)镮P地址不再同一網(wǎng)段,主機(jī)會(huì)將數(shù)據(jù)包發(fā)送給本網(wǎng)段的網(wǎng)關(guān)路由器A米奸。路由器A接收到數(shù)據(jù)包昼接,查看數(shù)據(jù)包IP中的目標(biāo)IP地址,在查找自己的路由表躏升,數(shù)據(jù)包的目標(biāo)IP地址是4.1辩棒,屬于4.0網(wǎng)段,路由器A在路由表中查到4.0網(wǎng)段轉(zhuǎn)發(fā)的接口是SO接口膨疏。于是一睁,路由表A將數(shù)據(jù)包從SO接口轉(zhuǎn)發(fā)出去。到達(dá)了網(wǎng)關(guān)路由器B佃却,用同樣的轉(zhuǎn)發(fā)方法者吁,從EO口轉(zhuǎn)發(fā)出去,4.1主機(jī)接收發(fā)這個(gè)數(shù)據(jù)包饲帅。
(2)docker網(wǎng)橋模式
(3)docker-compose網(wǎng)絡(luò)模式
docker-compose中可以設(shè)置網(wǎng)絡(luò)复凳,如果不顯示設(shè)置網(wǎng)絡(luò)這些容器都會(huì)被加入app_default網(wǎng)絡(luò),比如工程目錄為test灶泵,則啟動(dòng)后的網(wǎng)絡(luò)名為test_default育八,使用docker network ls
可以查看網(wǎng)絡(luò)列表,docker network inspect <network id>
可以查看對(duì)應(yīng)網(wǎng)絡(luò)的配置赦邻。如果想要工程有特有的網(wǎng)段以及容器有特有的IP則需要在docker-compose.yml中設(shè)置自定義要網(wǎng)絡(luò)髓棋,例子如下
version: '3'
services:
mysql:
image: mysql
restart: always
volumes:
- ./mysql:/home
environment:
- MYSQL_ROOT_PASSWORD=gp123456
networks:
mynet1:
ipv4_address: 172.100.0.5
flask:
build: ./flask
volumes:
- ./flask:/home
links:
- mysql:mysql
environment:
- MYSQL_USER=xiaogp
- MYSQL_PASSWORD=gp123456
- MYSQL_DB=pira
ports:
- "5000:5000"
networks:
mynet1:
ipv4_address: 172.100.0.6
networks:
mynet1:
ipam:
config:
- subnet: 172.100.0.0/16
具體的寫法是在最下面設(shè)置一個(gè)工程全局的網(wǎng)絡(luò),并且在各個(gè)容器服務(wù)的最下面引用,在全局下使用subnet設(shè)置網(wǎng)段按声,各容器使用ipv4_address設(shè)置IP膳犹。重新啟動(dòng)后docker網(wǎng)絡(luò)已經(jīng)固定為172.100.0.0/16網(wǎng)段,各容器IP也改為自定義IP
root@ubuntu:~/docker/docker-compose/test_1# docker network inspect 393d21db53d0
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.100.0.0/16"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"b2a5571aadaca0e52812b2016967b20e79d02dea6d70c422c8746ee510256c64": {
"Name": "test_1_flask_1",
"EndpointID": "e9d73b5841b24d01fd03e74dbbb5b40e9c9b884b2497073fd1b482d08aa4c89c",
"MacAddress": "02:42:ac:64:00:06",
"IPv4Address": "172.100.0.6/16",
"IPv6Address": ""
},
"e57d400253c9e97c5f8816a1832e4c105329c72611b691d2d4bd0ce1e8626cb3": {
"Name": "test_1_mysql_1",
"EndpointID": "f306029d9ab4c67014cbfd665523735ed968cca984b62a0bb00946635ee82d27",
"MacAddress": "02:42:ac:64:00:05",
"IPv4Address": "172.100.0.5/16",
"IPv6Address": ""
}
},
(3)路由尋址規(guī)則
當(dāng)TCP/IP需要向某個(gè)IP地址發(fā)起通信時(shí)签则,它會(huì)對(duì)路由表進(jìn)行評(píng)估须床,以確定如何發(fā)送數(shù)據(jù)包。評(píng)估過程如下:
1.目的IP地址和路由表中每一個(gè)路由項(xiàng)的網(wǎng)絡(luò)掩碼進(jìn)行相與計(jì)算渐裂,如果相與后的結(jié)果匹配對(duì)應(yīng)路由項(xiàng)的網(wǎng)絡(luò)地址豺旬,則記錄下此路由項(xiàng)
2.當(dāng)計(jì)算完路由表中所有的路由項(xiàng)后,擇優(yōu)選擇其中一條路由規(guī)則
最長匹配路由
:TCP/IP選擇記錄下的路由項(xiàng)中的最長匹配路由(網(wǎng)絡(luò)掩碼中具有最多“1”位的路由項(xiàng))來和此目的IP地址進(jìn)行通信芯义。
最低躍點(diǎn)數(shù)
:如果存在多個(gè)最長匹配路由哈垢,那么選擇具有最低躍點(diǎn)數(shù)的路由項(xiàng)。
優(yōu)先級(jí)高低
:如果存在多個(gè)具有最低躍點(diǎn)數(shù)的最長匹配路由扛拨,那么:均根據(jù)最長匹配路由所對(duì)應(yīng)的網(wǎng)絡(luò)接口在網(wǎng)絡(luò)連接的高級(jí)設(shè)置中的綁定優(yōu)先級(jí)來決定(一般有線(eth0) > 無線 (wlan0) > 移動(dòng)信號(hào)(4G))
(4)Linux route路由操作
每一個(gè)linux系統(tǒng)中都具有IP路由表耘分,它存儲(chǔ)了本地計(jì)算機(jī)可以到達(dá)的網(wǎng)絡(luò)目的地址范圍和如何到達(dá)的路由信息,本地計(jì)算機(jī)上的任何TCP/IP通信都受到路由表的控制绑警,linux通過route 命令查看 Linux 內(nèi)核的路由表求泰。
字段 | 操作符 |
---|---|
Destination | 目標(biāo)網(wǎng)絡(luò)或目標(biāo)主機(jī)。Destination 為 default(0.0.0.0)時(shí)计盒,表示這個(gè)是默認(rèn)網(wǎng)關(guān)渴频,所有數(shù)據(jù)都發(fā)到這個(gè)網(wǎng)關(guān) |
Gateway | 網(wǎng)關(guān)地址,0.0.0.0 表示當(dāng)前記錄對(duì)應(yīng)的 Destination 跟本機(jī)在同一個(gè)網(wǎng)段北启,通信時(shí)不需要經(jīng)過網(wǎng)關(guān)卜朗。如果沒有就顯示星號(hào)(*) |
Genmask |
U : 該路由可以使用。H : 該路由是到一個(gè)主機(jī)G : 該路由是到一個(gè)網(wǎng)關(guān)(路由器)咕村。如果沒有設(shè)置該標(biāo)志场钉,說明目的地 是直接相連的R : 恢復(fù)動(dòng)態(tài)路由產(chǎn)生的表項(xiàng)D : 該路由是由改變路由(redirect)報(bào)文創(chuàng)建的M : 該路由已被改變路由報(bào)文修改! :這個(gè)路由將不會(huì)被接受。 |
Metric | 路由距離懈涛,到達(dá)指定網(wǎng)絡(luò)所需的中轉(zhuǎn)數(shù) |
Ref | 路由項(xiàng)引用次數(shù) |
Use | 此路由項(xiàng)被路由軟件查找的次數(shù) |
Iface | 網(wǎng)卡名字逛万,例如 eth0 |
(5)docker網(wǎng)絡(luò)操作
-
docker network ls
:查看docker網(wǎng)絡(luò)列表 -
docker network inspect <network id/name>
:查看某個(gè)docker網(wǎng)絡(luò)詳情 -
docker network rm
:刪除docker網(wǎng)絡(luò) -
docker network disconnect
:斷開docker網(wǎng)絡(luò) -
docker network prune
:清楚無用的網(wǎng)絡(luò)
使用案例:
(1)查看所有driver=bridge的docker網(wǎng)絡(luò)
root@ubuntu:~# docker network ls --filter driver=bridge
NETWORK ID NAME DRIVER SCOPE
33868f4f5f1c bridge bridge local
e2cde023b4a7 harbor_harbor bridge local
4fab000d4ed4 milvus bridge local
64634f55cf1b test_1_default bridge local
393d21db53d0 test_1_mynet1 bridge local
(2)刪除已經(jīng)無效的網(wǎng)絡(luò)
root@ubuntu:~# docker network rm 64634f55cf1b
64634f55cf1b
如果喲啊刪除正在使用的網(wǎng)絡(luò),需要先斷開連接再刪除網(wǎng)絡(luò)
docker network disconnect <network> <container>
# 先使用inspect查到網(wǎng)絡(luò)名和容器名
root@ubuntu:~# docker network disconnect test_1_mynet1 test_1_mysql_1
root@ubuntu:~# docker network ls
NETWORK ID NAME DRIVER SCOPE
33868f4f5f1c bridge bridge local
e2cde023b4a7 harbor_harbor bridge local
e4aa16aea5df host host local
4fab000d4ed4 milvus bridge local
2d89edc384b1 none null local
393d21db53d0 test_1_mynet1 bridge local
root@ubuntu:~# docker network rm test_1_mynet1
test_1_mynet1
(3)清理無效網(wǎng)絡(luò)批钠,想通過這種方法清除歷史曾經(jīng)使用過的網(wǎng)段宇植,但是沒有達(dá)到預(yù)期效果,以后再研究
root@ubuntu:~# docker network prune -f