centos7- virtual machine host interoperability static ip network settings VirtualBox virtual machine network settings (four ways)

     Due to the speed of the current development of the Internet, many of users, often as a server hardware configuration of a single server has been insufficient to support the business. Clusters, distributed architecture technology is becoming increasingly popular, as developers also need to acquire the relevant skills. I happen to have virtual box set up multiple virtual machines to simulate development environment. Then the first step is simply to achieve, interlinked virtual machines and virtual machine hosts and virtual machines, as well as and outside the network.

  (1), we first need to understand the difference between several network cards virtual machine :

    Reference  VirtualBox virtual machine network settings (four ways)  https://www.cnblogs.com/qianjinyan/p/8661668.html 

    Details of the 1, NAT network address translation mode (the NAT, the Address - Search.com the Network) 
          2, the Bridged Adapter bridge mode 
                                 3, Internal internal network model 
                                 4, Host-only Adapter host mode 

  (2), followed by the need to design programs according to their needs :

    Reference  VirtualBox virtual machine and the host virtual machine within the network interworking + static IP network configuration    http://xintq.net/2014/09/05/virtualbox/ 

    This article explains the basic steps to set up some kind of network card corresponding to the link is the host and virtual machines, virtual machines and virtual machines, or virtual machines and the external network. Very easy to understand. After reading this will know how hands.

  

  (3), copy the configuration file

    If the card is a virtual machine added later, then add the NIC ifconfig will not see content. You will only see a card number which content needs to set up their own, pay attention to the order and configuration information corresponding to the card set.

    Reference:  the CentOS. 7 bis dual card dual IP gateway configuration     https://www.linuxidc.com/Linux/2018-05/152427.htm

    I put this configuration a good ifconfig 

 

 

 After that is beginning to add new cards for your virtual machines in virtualbox enter cd / etc / sysconfig / network-scripts / see profile

 

 May be ifcfg-enp0s3, this time need to copy out a name to the top of the card number, for example, ifcfg-enp0s8 then edit modify modify.

 

  (4), provided centos card parameters:

    Reference: Centos7.5 configure the IP address https://blog.csdn.net/qq_24347541/article/details/88655659

    Details of the parameters set by note cards. Modify the restart after the completion of systemctl restart network card 

 

 

     

Guess you like

Origin www.cnblogs.com/kim-yang/p/12013645.html