BT4 VM Internet access settings

Source: Internet
Author: User
Tags nameserver


Both bridging and NET are actually the same, but different gateways are different.
For direct bridging, the gateway is your router. (Excluding dial-up Internet access)
If it is NET, the gateway is a virtual gateway of VM.
1. Open/etc/resolv. conf directly.
Nameserver 202.202.32.33 # preferred DNS Server
Nameserver 61.128.128.68 # backup DNS Server
If your host uses a route to access the Internet, you are advised to directly bridge it. The DNS directly writes the DNS in your route, and the gateway can also.
If the host is an external network, we recommend that you use NET for the Virtual Machine and directly write the DNS to your VM gateway. You can view it in the VM editing-virtual network settings.
2. sudo/etc/init. d/networking restart # restart the network configuration.
--------------
The IP address of the VM configured above is automatically allocated.
If you do not want to automatically assign an IP address, you must define an IP address.
Add one more step.
Edit/etc/network/interfaces
You will see
Auto eth0
Iface eth0 inet dhcp
The first clause is to automatically load the network adapter eth0 when the system starts.
The second clause is used to obtain parameters and methods of IP addresses.
Eth0 indicates the network card.
Inet indicates ipv4 address (inet6 indicates ipv6)
Dhcp indicates dynamic retrieval (static indicates static ).
If we want to manually select static
Change
Auto eth0
Face eth0 inet static
Ddress 192.168.1.2
Etmask 255.255.255.0
Ateway 192.168.1.1
There are three more sentences. The three more sentences are our own IP addresses, subnet masks, and gateways.
Like ubuntu, I hope this title will bring traffic .......
Both bridging and NET are actually the same, but different gateways are different.
For direct bridging, the gateway is your router. (Excluding dial-up Internet access)
If it is NET, the gateway is a virtual gateway of VM.
1. Open/etc/resolv. conf directly.
Nameserver 202.202.32.33 # preferred DNS server nameserver 61.128.128.68 # backup DNS Server
If your host uses a route to access the Internet, you are advised to directly bridge it. The DNS directly writes the DNS in your route, and the gateway can also.
If the host is an external network, we recommend that you use NET for the Virtual Machine and directly write the DNS to your VM gateway. You can view it in the VM editing-virtual network settings.
2. sudo/etc/init. d/networking restart # restart the network configuration.
--------------
The IP address of the VM configured above is automatically allocated.
If you do not want to automatically assign an IP address, you must define an IP address.
Add one more step.
Edit/etc/network/interfaces and you will see
Auto eth0
Iface eth0 inet dhcp
The first clause is to automatically load the network adapter eth0 when the system starts.
The second clause is used to obtain parameters and methods of IP addresses.
Eth0 indicates the network card.
Inet indicates ipv4 address (inet6 indicates ipv6)
Dhcp indicates dynamic retrieval (static indicates static ).
If we want to manually select static
Change
Auto eth0
Face eth0 inet static

Ddress 192.168.1.2
Etmask 255.255.255.0

Ateway 192.168.1.1
There are three more sentences. The three more sentences are our own IP addresses, subnet masks, and gateways.

 

Related Article

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.