debain 配置IP和DNS
一、IP配置通过编辑/etc/network/interfaces文件实现IP配置。1. DHCPauto eth0iface eth0 inet dhcp2. 静态IPauto eth0iface eth0 inet staticaddress 192.168.32.100netmask 255.255.255.0
·
一、IP配置
通过编辑/etc/network/interfaces文件实现IP配置。
1. DHCP
auto eth0
iface eth0 inet dhcp
2. 静态IP
auto eth0
iface eth0 inet static
address 192.168.32.100
netmask 255.255.255.0
gateway 192.168.32.1
atuo eth0指定网卡,eth0为网卡名称,不同的机器可能不同,可以通过ifconfig命令查看:
具体address、netmask、gateway值根据实际情况来配置,或者咨询网络管理员。
二、 DSN配置
编辑/etc/resolv.conf文件
nameserver 114.114.114.114
nameserver 8.8.8.8更多推荐



所有评论(0)