VMware虛擬機器設定固定IP後不能上網的解決辦法

feelpurple發表於2016-05-20
VMware虛擬機器設定固定IP後,不能上網

[root@localhost 20160520]# wget
--2016-05-20 06:10:37--  
Resolving failed: Name or service not known.
wget: unable to resolve host address “”

檢視網路設定

[root@localhost 20160520]# system-config-network


虛擬機器網路卡使用的是NAT連線模式


解決辦法:
開啟虛擬機器的DHCP,並重啟網路



[root@localhost 20160520]# service network restart
Shutting down interface eth0:  Device state: 3 (disconnected)
                                                           [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/8
state: activated
Connection activated
                                                           [  OK  ]
Bringing up interface eth1:  Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/9
state: activated
Connection activated
                                                           [  OK  ]

虛擬機器的網路恢復正常

[root@localhost 20160520]# wget
--2016-05-20 06:23:39--  
Resolving 69.56.251.119, 2001:470:1f0f:297::2
Connecting to |69.56.251.119|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 41700 (41K) [application/x-gzip]
Saving to: “ipvsadm-1.26.tar.gz”

100%[===================================================================================================================>] 41,700       105K/s   in 0.4s 

2016-05-20 06:23:45 (105 KB/s) - “ipvsadm-1.26.tar.gz” saved [41700/41700]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2103997/,如需轉載,請註明出處,否則將追究法律責任。

相關文章