KVM uses NAT to surf the internet

Source: Internet
Author: User

The host system installs KVM and Virbr0 is automatically added by default:

[Email protected] ~]# Brctl Show

Bridge nameBridge IDSTP enabledinterfaces

Virbr08000.525400b33643Yesvirbr0-nic


[Email protected] ~]# ifconfig

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/0E/wKiom1TF6XaRfWF_AAD-EqKilw4758.jpg "title=" Viebr0.png "alt=" Wkiom1tf6xarfwf_aad-eqkilw4758.jpg "/>




When booting up, set the guest virtual machine to NAT mode:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/0E/wKiom1TF6SSgkz2hAAFQEjEVaW8681.jpg "title=" Nat.png "alt=" Wkiom1tf6ssgkz2haafqejevaw8681.jpg "/>



View the guest's IP and test connectivity:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/0B/wKioL1TF6taBfP-0AAQ4D6RpW-o582.jpg "title=" 1.png " alt= "Wkiol1tf6tabfp-0aaq4d6rpw-o582.jpg"/>


Test whether guest can surf the Internet, get DNS resolution, prove to be able to surf the Internet:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/0B/wKioL1TF7LHCBtcdAAB-HWbNwkU689.jpg "title=" 2.png " alt= "Wkiol1tf7lhcbtcdaab-hwbnwku689.jpg"/>




Log in to guest using win7,ssh:


C:\users\administrator>route-p Add 192.168.122.0 Mask 255.255.255.0 192.168.150

.147

#注意win7要能与guest的宿主系统通信, here I test the environment is Workstation,guest host system and Win7 with the network segment "192.168.150.0", the real environment depends on the situation, is generally used communication gateway.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/0B/wKioL1TF7HeSvzpOAAJBOYB5264114.jpg "title=" 3.png " alt= "Wkiol1tf7hesvzpoaajboyb5264114.jpg"/>

This article is from the "Dragon Love Xue qi" blog, please make sure to keep this source http://dragon123.blog.51cto.com/9152073/1608473

KVM uses NAT to surf the internet

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.