Debian中配置静态IP

vi /etc/network/interfaces

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
        address 10.10.10.251
        netmask 255.255.255.0
        gateway 10.10.10.253

/etc/resolv.conf里面设置DNS服务器,正常应该是gateway的地址

nameserver 10.10.10.253 #网关就是DNS服务器

最后reboot