Ubuntuserver static IP address and DNS server set Ubuntu network parameters to be saved in the file/etc/network/interfaces. dhcp and dynamic IP address are used by default. Www.2cto.com: 1) edit/etc/network/interfaces1.1 )...
The ubuntu server static IP address and DNS server set the Ubuntu network parameters to be saved in the file/etc/network/interfaces. by default, dhcp and dynamic IP addresses are used to obtain the network parameters. Www.2cto.com: 1) edit/etc/network/interfaces1.1) block a dhcp line # The primary network interfaceauto eth0 # iface eth0 inet dhcp 1.2) add parameters related to static IP # The primary network interfaceiface eth0 inet staticaddress 192.168.1, 151 netmask 255.255.255.0gateway 192.168.1.1 www.2cto.com 2) edit/etc/resolv. conf, set dns. if you restart to restore, you need to modify
/Etc/resolvconf/resolv. conf. d/base file, with the same content as nameserver 192.168.1.1 # routing gateway nameserver 8.8.8.8 # google's dns server 3) execute the following two commands to enable the new settings $ sudo ifdown eth0 $ sudo ifup eth0
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.