DNS client 端設定 /etc/resolv.conf
nslookup 測試
網路介面設定 /etc/network/interfaces
#自動獲取網址----
auto eth0
iface eth0 inet dhcp
#設固定ip--------------
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.111
netmask 255.255.255.0
gateway 192.168.0.1
#第二張
iface eth1 inet static
............................
#擬裝置介面
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
iface eth0:0 inet dhcp
broadcast 及 network不確定,不填也無妨
/etc/init.d/networking restart #重新啟動網路介面
/etc/sysconfig/network
啟用停用系統的網路功能,在etc/sysconfig/network中設定:NETWORKING=yes/no
也可設hostname,如:hostname=home.test.net
在有些新版的ubutu找不到這檔案
沒有留言:
張貼留言