Set the dynamic or static IP address of the NIC in Ubuntu
Source: Internet
Author: User
Ubuntu sets the dynamic or static network adapter address Ubuntu10.10. the network adapter of vmwarevm uses NAT. by default, DHCP automatically obtains the IP address. but if port forwarding/ ING is required, the IP address must be fixed. In the VM: 1, Terminal 2, edit the network configuration file: sudogedit/etc/netw... 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.
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