The Bridge-nat of the network

Source: Internet
Author: User
Tags network function

CentOS7 virtual machines are installed in VMware WorkStation9 today. There are three ways to connect a virtual machine to a host network: Bridge mode, Nat mode, and host only mode.

KVM Virtual Machine Network configuration in two ways: Nat mode and bridge mode. The configuration principle and procedure of bridge mode. Bridge mode is suitable for virtualization of server hosts.

There are two ways to connect a KVM client network:
User Networking: A simple way for a virtual machine to access resources on a host, internet, or local network, but it cannot access the client from a network or other client, and it requires significant performance adjustments. Nat mode.
Virtual Bridge: This is more complicated than the user network, but the client and the Internet, the communication between the client and the host computer is easy to set up. Bridge Way.

Introduction to Linux Abstract network devices

Similar to disk devices, Linux users want to use the network function, can not be done by direct operation of hardware, but need to directly or indirectly operate a Linux for our abstraction of the device, both common Linux network equipment to complete. A common situation is that the system is equipped with a hardware network card, Linux in the system for it to generate a network device instance, such as eth0, the user needs to issue a command to eth0 to configure or use it. More hardware will bring more instances of the device, and virtual hardware will bring more instances of the device. With the development of network technology and virtualization technology, more advanced network devices have been added to Linux, which makes the situation more complicated. In the following sections, we will analyze the various types of Linux network device abstractions that are commonly used in virtualization technologies: Bridge, 802.1.Q VLAN device, VETH, TAP, and explain in detail how to use them with Route table, IP table in Linux Simply create a local virtual network.

If you have installed VLAN kernel modules and Administrative Tools Vconfig,tap/tun device management Tools Tunctl

[[email protected] ~]# Modprobe-l|grep VLAN
Kernel/drivers/net/macvlan.ko
Kernel/net/bridge/netfilter/ebt_vlan.ko

[Email protected] ~]# lsmod |grep VLAN
[Email protected] ~]# modprobe Ebt_vlan
[Email protected] ~]# lsmod |grep VLAN
Ebt_vlan 12911 0


The Vconfig program configures and adjusts 802.1q VLAN parameters.
This tool was deprecated in favor of "IP link" command.
This tool has been downgraded and replaced by the IP link command


Query VLAN device Condition: Cat/proc/net/vlan/[vlan device NAME]
Create VETH Device: IP link Add link [DEVICE NAME] Type VETH
Create a tap device: tunctl-p [tap device NAME]
Delete tap device: tunctl-d [tap device NAME]
Query all two-tier devices in the system, including VETH/TAP devices: IP link Show
Remove normal two-tier device: IP link Delete [device NAME] type [type]

The Bridge-nat of the network

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.