centos7連不上網(wǎng)絡(luò)

centos7連不上網(wǎng)絡(luò)

1、找到nat設(shè)置,查看子網(wǎng)ip、子網(wǎng)掩碼、網(wǎng)關(guān)

centos7連不上網(wǎng)絡(luò)

centos7連不上網(wǎng)絡(luò)

2、進入這個目錄,找到網(wǎng)絡(luò)配置文件

cd?/etc/sysconfig.network-scripts/

centos7連不上網(wǎng)絡(luò)

?3、進入文件進行相關(guān)配置?

注意:網(wǎng)關(guān)、子網(wǎng)掩碼都要要和NAT配置里一致;網(wǎng)關(guān)、IP地址要和子網(wǎng)ip在一個網(wǎng)段(就是ip的前三段數(shù)字,例如:192.168.152.xx)

vi?ifcfg-ens33

centos7連不上網(wǎng)絡(luò)

4、重啟網(wǎng)絡(luò)

service?network?restart

5、測試是否能ping通

ping?www.baidu.com

centos7連不上網(wǎng)絡(luò)

相關(guān)教程推薦:centos教程

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點贊11 分享