To configure the static address in Ubuntu, first set IPwww.2cto.com $ sudogedit/etc/network/interfacesautoloifaceloinetloopbackautoeth0ifaceeth0inetstaticaddress192.168.1.99netmask255.2...
Configure the static address in Ubuntu. first, set the IP address www.2cto.com $ sudo gedit/etc/network/interfacesauto loiface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.99netmask 255.255.255.0 gateway 192.168.1.1 to save. In this way, the IP address does not take effect immediately. Run $ sudo/etc/init. d/networking restart to ping the computer on the LAN. But cannot access the Internet because DNS is not set. The DNS information is saved in/etc/resolv. conf. once changed, it takes effect immediately. Here is the DNS server configuration $ sudo gedit/etc/resolv. conf nameserver 192.168.2.43nameserver 192.168.2.6 save and close, now you can access the Internet. Attached Nic settings related commands: View Nic information: ifconfig ------------------------------------------- according to the above steps, only the configuration of the Linux system. I have enabled the IP address allocation function for my vro, so I need to take another step. Assign the IP address 192.168.1.99 to the MAC address of the VM and set it to a static IP address. Then restart the route. everything is OK.
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