Ubuntu 16 04網路配置

2021-07-15 03:53:44 字數 637 閱讀 9233

安裝完ubuntu 16.04後,配置靜態網路:

vim /etc/network/inte***ces
auto eth0

iface eth0 inet static

address x.x.x.x

netmask x.x.x.x

gateway x.x.x.x

配置完成,重啟網路服務:

/etc/init.d/networking restart
啟動後,發現只有lo,檢視日誌,發現沒有找到eth0裝置。

原來ubuntu 16.04網絡卡不再採用eth0命名,這和rhel系列一樣,此時需要檢視真正的網絡卡名稱是神馬:

cd /proc/sys/net/ipv4/conf
在該目錄下可以看到,除了lo,還有ens160,所以網絡卡名稱為ens160,而不是傳統的eth0,因此需要將上面inte***ces檔案中名稱修改。

最後,配置dns:

vim /etc/resolve.conf
nameserver 223.5.5.5

Ubuntu16 04 網路配置

安裝ubuntu作業系統之後,為了通過xshell連線主機,或者連線其他主機。需要進行如下網路配置和ssh服務配置。sudo vi etc network inte ces,在其中找到對應網絡卡進行修改 輸入以下內容 auto ens33 iface ens33 inet static 靜態ip,不...

Ubuntu16 04網路配置

ubuntu16.04網路配置 一 設定網路 1 windows 開啟cmd 輸入 ipconfig all 可以看到 修改為靜態ip 二 ubuntu修改網路為靜態ip 設定虛擬機器為橋接模式 1.開啟ubuntu的 etc network inte ces sudo gedit etc netw...

Vmware下Ubuntu16 04網路配置

1.編輯配置檔案 sudo vi etc network inte ces 2.修改配置檔案中引數值,以自身情況填寫 auto eth0 iface eth0 inet static address 192.168.123.34 靜態的ip位址 netmask 255.255.255.0 子網掩碼 ...