VirtualBox Virtual machine Linux CentOS 7 Net small note __linux

Source: Internet
Author: User
Objective

For a long time without Linux a sudden review of a face, a lot of things are forgotten, so this blog simple record in the VirtualBox virtual machine, Linux CentOS 7 How to set up to even the extranet. Previously wrote a blog record such a problem: VirtualBox dual network card to achieve the virtual machine Linux CentOS 7 Internet access and host visits, here is still using the mode of this dual network card division of labor, host-only network card to achieve the host exchange, through the NAT network cards connected to the net, The only point to note is that thegateway in the NAT Nic's configuration file is consistent with the host's gateway. Be consistent. Consistent. All right, important details are over. Set NAT Gateway

First look at the host gateway, you can see 192.168.0.254:

Next, locate the NAT gateway configuration file in the virtual machine, as shown in the following red-flagged file:

Then open the file, focus on the Gateway (Gatewat), you can see the same as our host gateway (if the inconsistency is modified to consistent):

Finally, enter the command to restart the Linux Network Service: Servicenetwork Restart

Finally check to see if you can ping the extranet:

Can see basically no problem, is the speed is not too good lead to a small number of packet loss, the same in the browser can also be normal access:

Finally, incidentally, some common file paths and commands are recorded to prevent me from having a look again after a long time. related path and command Memo Linux network profile path: CD etc/sysconfig/network-scripts/linux Network SERVICE Command:
Start: Service network start off: Service Network stop restart: Service network Restart View routing status: Route summary

Simply record a small problem and hope to help a friend with the same problem, the end.

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.