我在羣模式下使用碼頭1.12.1。碼頭羣--IP地址eth0顯示多個地址
當我運行下面的命令: docker network create --driver overlay --subnet 10.0.9.0/24 --opt encrypted services
然後 docker service create --name nginx nginx
比在運行容器執行的是命令ip address
(正確的節點上)的結果是
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 234: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1424 qdisc noqueue state UP group default link/ether 02:42:0a:00:09:03 brd ff:ff:ff:ff:ff:ff inet 10.0.9.3/24 scope global eth0 valid_lft forever preferred_lft forever inet 10.0.9.2/32 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::42:aff:fe00:903/64 scope link valid_lft forever preferred_lft forever 236: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:ac:12:00:03 brd ff:ff:ff:ff:ff:ff inet 172.18.0.3/16 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::42:acff:fe12:3/64 scope link valid_lft forever preferred_lft forever
燦請任何人解釋,爲什麼eth0在這種情況下有兩個ip地址10.0.9.3/24
和10.0.9.2/32
?
這會導致一個問題,因爲當我運行更多的實例時,有重疊的地址會中斷我的正在運行的服務。