Debian modified IP Address

Source: Internet
Author: User

1. Set IP address, gateway
Nano/etc/network/interfaces/etc/network/interfacesbak #备份原有配置文件

Nano/etc/network/interfaces #编辑网网卡配置文件

Auto Lo
Auto Eth0 #开机自动连接网络
Iface Lo inet Loopback
Allow-hotplug eth0
Iface eth0 inet Static #static表示使用固定ip, DHCP representations use dynamic IP

Address 192.168.21.166 #设置ip地址
netmask 255.255.255.0 #设置子网掩码
gateway192.168.21.2 #设置网关

Ctrl+o #保存配置
Ctrl+x #退出

2. Set up DNS
Cp/etc/resolv.conf/etc/resolv.confbak #备份原有dns配置文件
Nano/etc/resolv.conf #编辑配置文件
NameServer 8.8.8.8 #设置首选dns
NameServer 8.8.4.4 #设置备用dns
Ctrl+o #保存配置
Ctrl+x #退出

Debian modified IP Address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.