Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the Internet access methods and related configuration methods of ubuntu virtual machines?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the ways to access the Internet and related configurations of ubuntu virtual machines". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "ubuntu virtual machine Internet access and related configuration methods there are" it!

Nat mode (virtual machine and host are not on the same network segment)

NAT:Network address translate is a technology that translates internal private addresses into public network addresses. NAT technology is applied to internet gateways and routers. For example, if 192.168.0.123 is to access internet, its packets have to pass through a gateway or router, and the gateway or router has an ip address that can access internet. Such gateways and routers are required to send and receive packets. Make changes to the IP protocol layer data of the packet (that is, NAT) so that hosts on the private network segment can successfully access the internet. This technology solves the problem of scarcity of IP addresses.

The same is true of VMWare's NAT, which forges a network card with software between the host and the virtual machine, which is in the same address range as the ip of the virtual machine. At the same time, NAT is carried out between the network card and the network interface of the host. Every packet sent by the virtual machine passes through the virtual network card, then NAT, and then sent out by the interface of the host.

The virtual network card in Nat mode is VMnet8.

Settings on the host machine

Host IP GW DNS

VMnet8

IP (automatically acquired after setting the network segment)

GW must belong to the same network segment as ip

DNS: same as host DNS

Virtual machine

IP: virtual machine ip and virtual network card ip same network segment

GW: same as virtual network card gw

DNS: same DNS

Second bridge Bridge (virtual machine and host ip on the same network segment)

"Bridge Bridge" is a host, this machine has two network cards, one in two local area networks, at the same time on the "bridge", running programs, so that all packets in LAN A flow into B intact, and vice versa. In this way, LAN An and B are seamlessly connected in the link layer. When bridging, the VMWare network card and the physical network card should be in the same IP network segment, of course, to ensure that the two Lans are free of conflicting IP.

The same is true of VMWare's bridge, except that a network card originally used as hardware is now virtual by VMWare software! When bridging is used, VMWare will bridge a virtual network card with a real physical network card, so that all packets sent to the physical network card will go to the VMWare virtual machine, and the packets sent by VMWare will be sent from the other end of the physical network card through the bridge.

Therefore, if the physical network card can access the Internet, then there is no problem with the bridged soft network card. This is the principle of bridging the Internet, which is equivalent to treating the virtual machine as a physical machine in the local area network.

Three mainframe mode

In the host mode, the real environment and the virtual environment are separated; in this mode, all virtual systems can communicate with each other, but the virtual system and the real network are separated. The virtual system and the host machine system can communicate with each other, which is equivalent to the interconnection of the two machines through a twisted pair. But in this way, there is no address translation service, so the virtual machine can only be accessed to the host, and the security factor is very high.

Knowledge supplement of network connection

1.NAT Network Address Translation network address translation

A static address: a clear one-to-one conversion between a private address and a public address. (1 to 1)

B dynamic address translation: the NAT converter has a public network address pool, which can dynamically assign an unused public network address to internal addresses for communication, forming a temporary mapping relationship. (many to many)

C port address translation: translates multiple private addresses into a corresponding public network address. (many to 1)

2.DHCP

DHCP Dynamic Host Configuration Protocol, dynamic host configuration protocol

Is a local area network protocol that automatically assigns IP addresses to internal networks or network providers. DHCP has three ports UDP67,68 as service ports for Server and Client. 546 is used for DHCPv6 and is used for double-click hot backup.

At this point, I believe you have a deeper understanding of the "ubuntu virtual machine Internet access and related configuration methods", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report