站內搜尋

Tuesday, August 21, 2018

[Linux] Ubuntu 16.04 內網 Server IP 設定

$sudo su -
#vim /etc/network/interfaces

註解掉dhcp 然後往下加內容

#iface eth0 inet dhcp
iface eth0 inet static 
address 172.31.40.99 
netmask 255.255.192.0 
gateway 172.31.0.254 
dns-nameservers 172.31.0.10 172.31.0.20 
network 172.31.0.0

存檔後重開 IP就設定好了

No comments:

Post a Comment