Debian设置静态IP和多IP

iface ens33 inet static 
#static表示使用固定ip,dhcp表述使用动态ip

address 192.168.1.100 
#设置ip地址 【为ipconfig中地址一致,最后一位端口改前ping一下确定端口没人用】

netmask 255.255.255.0 
#设置子网掩码

gateway 192.168.1.1 
#设置网关

nameserver 8.8.8.8
nameserver 119.29.29.29

auto ens33:1
iface ens33:1 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
nameserver 8.8.8.8
nameserver 119.29.29.29

保存后重启网卡或者重启系统

配置DNS

vim /etc/resolv.conf

nameserver 8.8.8.8
nameserver 119.29.29.29
sanradar
sanradar
文章: 97

2 评论

  1. hey there and thank you for your info – I’ve certainly picked up something new from
    right here. I did however expertise some technical issues using this website, since I experienced to
    reload the website lots of times previous to I could
    get it to load correctly. I had been wondering if your hosting is OK?
    Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your high-quality score if advertising and marketing with Adwords.
    Well I’m adding this RSS to my email and can look out for
    much more of your respective exciting content. Ensure that you update this again very
    soon.. Escape rooms hub

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注