Ubuntu如何設定靜態IP

2021-08-14 02:10:27 字數 636 閱讀 4443

ubuntu網路配置在這個檔案中

/etc/network/inte***ce

下面是我機器的inte***ce

auto lo

iface lo inet loopback

auto em1

iface em1 inet dhcp

lo是本地回環的配置

em1是本地網路節點,當前設定的是dhcp聯網方式,下面設定成靜態聯網。

auto em1

iface em1 inet static

address 192.168.81.222

gateway 192.168.81.1

netmask 255.255.255.0

network 192.168.81.0

broadcast 192.168.81.255

設定成靜態

192.168.81.222

然後重啟,或者是重啟網路部分

sudo /etc/init.d/network restart

ubuntu設定靜態ip

ubuntu10.04設定靜態ip 2010 12 20 09 39 step1 設定ip vi etc network inte ces 檔案內容修改為 auto eth0 iface eth0 inet static address 192.168.1.2 gateway 192.168.1.1...

ubuntu設定靜態ip

ubuntu設定靜態ip 找到檔案並作如下修改 sudo vi etc network inte ces修改如下部分 auto eth0 iface eth0 inet static address 192.168.0.117 gateway 192.168.0.1 這個位址你要確認下 閘道器是不是...

ubuntu設定靜態ip

當dhcp伺服器出問題的時候,不能自動分配ip,就需要我們手動設定靜態ip 1 vim etc network inte ces 個人不是很習慣用vim,可以換成gedit就和記事本一樣操作啦 2 修改檔案內容如下 我的不叫eth0,是enp2s0,輸入ifconfig看第乙個 auto eth0 ...