Set the dynamic or static IP address of the NIC in Ubuntu

Source: Internet
Author: User

Ubuntu sets the dynamic or static IP address of the NIC Ubuntu 10.10. The nic of the vmwarevm uses NAT. By default, the IP address is automatically obtained by DHCP. but if port forwarding/ ing is required, the IP address must be fixed. In the VM: 1, Terminal 2, edit the network configuration file: sudo gedit/etc/network/interfaces 2.1. Modify the DHCP configuration as follows (the default Nic is eth0) auto eth0 iface eth0 inet dhcp 2.2. Modify the static IP Address Configuration as follows (the default Nic is eth0) auto eth0 iface eth0 inet staticaddress 192.168.122.123gateway 192.168.122.2netmask 255.255.255.0 3. Restart the network service: sudo/etc/init. d/networking restart if the domain name cannot be resolved after configuration, You need to configure DNSA, sudo gedit/etc/resolv. conf B, nameserver 192.168.122.2 # The Virtual Machine is forwarded by the host, so set it to the host. However, if you use a cable TV Set the Internet access mode to the DNS of the other party.

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.