我可以从 ubuntu 虚拟机 ping 通 windows,但是当我从 windows 主机 ping 通 ubuntu 时,我收到了无法访问的错误消息。
从 ubuntu 到 windows
root@arihant:/home/pavan# ping windows
PING windows (192.168.2.9) 56(84) bytes of data.
64 bytes from windows (192.168.2.9): icmp_seq=1 ttl=128 time=0.545 ms
root@arihant:/home/pavan# ping google.com
PING google.com (216.58.196.110) 56(84) bytes of data.
64 bytes from maa03s19-in-f110.1e100.net (216.58.196.110): icmp_seq=1 ttl=128 time=11.1 ms
无法从 Windows ping 通 Ubuntu
C:\Users\user>ping 10.0.0.1
Pinging 10.0.0.1 with 32 bytes of data:
Request timed out.
IP 配置详细信息
root@arihant:/home/pavan# nmcli device show
GENERAL.DEVICE: ens33
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:0C:29:7C:F0:EA
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: Static Connection
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/3
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 10.0.0.1/24
IP4.GATEWAY: 192.168.8.2
IP4.ROUTE[1]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]: 192.168.8.2
IP6.ADDRESS[1]: fe80::bd50:764f:15f:9554/64
IP6.GATEWAY:
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY:
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY:
但是当我将 IP 配置保留为自动时,我能够双向 ping 通
IP 配置详细信息
root@arihant:/home/pavan# nmcli device show
GENERAL.DEVICE: ens33
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:0C:29:7C:F0:EA
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: Auto
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.8.132/24
IP4.GATEWAY: 192.168.8.2
IP4.ROUTE[1]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]: 192.168.8.2
IP4.DOMAIN[1]: localdomain
**IP4.WINS[1]: 192.168.8.2**
IP6.ADDRESS[1]: fe80::d18a:fae3:2a3e:b46f/64
IP6.GATEWAY:
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY:
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY:
请告诉我如何在静态 IP 上配置 IP4.WINS[1]