#sudo vim /etc/network/interface
# The loopback network interface
auto lo
iface lo inet loopback
#define eth0 use dhcp to obtain ip address
auto eth0
iface eth0 inet dhcp
#define eth0 use static ip address
auth eth0
iface eth0 inet static
address 10.1.1.100 #define ip address
netmask 255.255.255.0 #define netmask
gateway 10.1.1.1 #define gateway
ex: don't forget setting dns server in /etc/resove.conf
#sudo /etc/init.d/network restart (restart network daemon)
沒有留言:
張貼留言