Virtual Machine Ubuntu16.04 Server Set NAT mode to modify IP

Source: Internet
Author: User
Tags change settings

Every time to check the IP, each time is different, often we will choose "NAT mode", but the choice of time, the IP address will conflict, so we will modify our IP address to solve!!

One, simple way:

1. Toolbar ' edit '

2. Virtual Network Editor, select nat mode = = "Subnet IP cannot be modified

3. ' Change Settings '

"Subnet IP" to modify their favorite network segment, 192.168.xxx.xxx is best to change these two!

4. ' DHCP Settings '

Modify Start IP Address = = "You can say this is the IP address of your own virtual machine.

5.ifconfig Look! And then reboot to see if it's still this IP.

6. If this method is unsuccessful, try the following method, the landlord did not try the following way, feel too bored!

My local use of the Internet mode dial-up Internet, IP segment is a public network through the routing of LAN, network segment 182.18.1.*

The local connection contains the following:

One of the wireless network card, WMware Bridge is a custom LAN IP segment: 192.168.253.*;

Where the local connection, broadband connection 3 (dial-up Internet use, is generally automatic access to IP, if set fixed IP is likely IP conflict on the network, so this stuff can not be modified).

I want to connect my local and my virtual machines to the same network segment:

So I modified the IPV4 setting for local Area Connection:

Modify the virtual machine's network connection as: "Bridging Mode"

Set my virtual machine master/node1/node2/node3 to static IP:

master:192.168.1.100

Node1:192.168.1.101

node2:192.168.1.102

node3:192.168.1.103

I have these too many virtual machines are Ubuntu Server 14.04, how to set the static IP?

1) Modify the configuration file/etc/network/interfaces

sudo vim/etc/network/interfaces

Add the following content:
Auto eth0 #设置自动启动eth0接口
iface eth0 inet static #配置静态IP
address 192.168.1.100 #IP地址
netmask 255.255.255.0 #子网掩码
Gateway 192.168.1.1 #默认网关

2) Modify DNS

sudo vim/etc/resolve.conf

Add the following content:

nameserver 8.8.8.8

3) Restart the network for the configuration to take effect

sudo/etc/init.d/networking restart

4) See if the settings are successful

Ifconfig

Local IP test:

Local ping virtual on master (192.168.1.100)

When I am using PPPoE network, this way is not able to implement virtual machine online.

Virtual Machine Ubuntu16.04 Server Set NAT mode to modify IP

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.