RedHatLinuxKVM Virtual Machine bridging

Source: Internet
Author: User
RedHatLinuxKVM VM bridging configuration bridge access mode. 1. Create a Bridge in the/etc/sysconfig/network-scripts directory, create a ifcfg-br0 file with the type set to Bridge: Example: DEVICE = br0BOOTPROTO = staticBROADCAST = 192.168.110.255IPADDR = 192.168.110.205NETMASK = 2

RedHat Linux KVM Virtual Machine bridging

Configure bridge Internet access

1. Create a bridge

In the/etc/sysconfig/network-scripts directory, create a ifcfg-br0 file whose type is set to Bridge:

Example:

DEVICE = br0
BOOTPROTO = static
BROADCAST = 192.168.110.255
IPADDR = 192.168.110.205
NETMASK = 255.255.255.0
NETWORK = 192.168.110.0
ONBOOT = yes
GATEWAY = 192.168.110.1
TYPE = Bridge

2. Bridge the physical interface to the bridge
Modify eth0 content (this server uses eth0 to access the Internet), remove its IP information, and add "BRIDGE = br0" to BRIDGE it to br0; if it is a dual or multi-nic, modify as follows:

DEVICE = eth0
# BOOTPROTO = static
# BROADCAST = 192.168.110.255
HWADDR = 00: 30: 48: F1: 7C: 3A
# IPADDR = 192.168.110.205
# NETMASK = 255.255.255.0
# NETWORK = 192.168.110.0
ONBOOT = yes
# GATEWAY = 192.168.110.1
# TYPE = Ethernet
BRIDGE = br0

3. Restart the network service of the Physical Machine

[Root @ virt ~] # Service network restart
Closing interface br0: [OK]
Closing interface eth0: [OK]
Disable the loop interface: [OK]
Pop-up loop interface: [OK]
Pop-up page eth0: [OK]
Br0: [OK]

4. view the current bridging status

[Root @ virt ~] # Brctl show

5. Bridge the virtual machine interface to the bridge

Brctl delif virbr0 vnet0

Brctl addif br0 vnet0

[Root @ virt ~] # Brctl show
Bridge name bridge id STP enabled interfaces
Br0 8000.003048f17c3a no eth0
Vnet0
Virbr0 8000.000000000000 yes

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

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.