首先開啟ubuntu的網路配置檔案
sudo vi /etc/network/interfaces
新增下面的內容:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.100.198 netmask 225.225.225.0 gateway 192.168.100.1
配置DNS:
vi /etc/resolv.conf
nameserver 192.168.100.1
首先開啟ubuntu的網路配置檔案
sudo vi /etc/network/interfaces
新增下面的內容:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.100.198 netmask 225.225.225.0 gateway 192.168.100.1
配置DNS:
vi /etc/resolv.conf
nameserver 192.168.100.1