ubuntu網絡配置文件/etc/network/interfaces
此文件被ifup和ifdown使用
1、手動設置ip示例
auto eth0
iface eth0 inet static
address 192.168.18.22
network 255.255.255.0
gateway 192.168.18.1
2、DHCP分配IP
auto eth0
iface eth0 inet dhcp
ubuntu網絡配置文件/etc/network/interfaces
此文件被ifup和ifdown使用
1、手動設置ip示例
auto eth0
iface eth0 inet static
address 192.168.18.22
network 255.255.255.0
gateway 192.168.18.1
2、DHCP分配IP
auto eth0
iface eth0 inet dhcp