我已将两个并行网络适配器分配给桥接网络。
控制机 10.171.102.162 主机 10.171.102.161
我无法从控制端 ping 或 ssh 到主机,这两个主机都是 ubuntu 的并行实例
日志
parallels@parallels-vm:~$ ansible -m ping all
10.251.55.13 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.251.55.13 port 22: Connection refused\r\n",
"unreachable": true
}
parallels@parallels-vm:~$ ^C
parallels@parallels-vm:~$ ping ^C
parallels@parallels-vm:~$ ping 10.251.55.13
PING 10.251.55.13 (10.251.55.13) 56(84) bytes of data.
从控制机进行 ifconfig
parallels@parallels-vm:~$ ifconfig
enp0s5 Link encap:Ethernet HWaddr 00:1c:42:9a:09:73
inet addr:**10.171.102.162** Bcast:10.171.102.255 Mask:255.255.255.0
inet6 addr: fe80::c1e2:6bd6:234b:1ea6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6650 errors:0 dropped:339 overruns:0 frame:0
TX packets:449 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:745003 (745.0 KB) TX bytes:43829 (43.8 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:196 errors:0 dropped:0 overruns:0 frame:0
TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14551 (14.5 KB) TX bytes:14551 (14.5 KB)
从主机进行 ifconfig
enp0s5 Link encap:Ethernet HWaddr 00:1c:42:b6:2e:e6
inet addr:10.171.102.161 Bcast:10.171.102.255 Mask:255.255.255.0
inet6 addr: fe80::5fa6:2a6b:a1a9:fbbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:963997 errors:0 dropped:40266 overruns:0 frame:0
TX packets:220780 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:464186542 (464.1 MB) TX bytes:21117153 (21.1 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:37873 errors:0 dropped:0 overruns:0 frame:0
TX packets:37873 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2971041 (2.9 MB) TX bytes:2971041 (2.9 MB)
答案1
重新开始机器或重新开始网卡获取新的ip地址。