IP

/etc/network/interfaces

[shell]
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# 你可以使用 man interfaces 查看帮助,interfaces(5)就是interfaces帮助文档的第5段,查看帮助只需要 man interfaces,不用输入段号

# 路由环回
# The loopback network interface
auto lo # 开机启动路由环回
iface lo inet loopback # 启用内部路由环回,将127.0.0.1指向本机

# 主网卡配置,网卡eth0,eth1,最后一个数字就是第几张网卡
# The primary network interface

auto eth0 # 开机自启动第一个网卡 eth0,否则需要手动 ifup eth0
#iface eth0 inet dhcp # dhcp自动获取ip
iface eth0 inet static # 手动设置固定ip
address 192.168.1.81 # ip
netmask 255.255.255.0 # 子网掩码
gateway 192.168.1.1 # 网关
[/shell]

DNS

/etc/resolv.conf

[shell]
# nameserver [ip]
nameserver 202.101.224.69
nameserver 61.131.253.68
[/shell]