1、dhcp自動擷取
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
設定生效:
sudo /etc/init.d/networking restart
或
sudo dhclient eth0
2、靜态IP位址
iface eth0 inet static
address 192.168.3.90
netmask 255.255.255.0
gateway 192.168.3.1
3、虛拟IP位址
添加: