Set KVM (Virtual Machine) to access the Internet through the bridge in rhel5.4

Source: Internet
Author: User

Log on to the system as root and create a bridge configuration file

# Cd/etc/sysconfig/network-scripts/

# Cp ifcfg-eth0 ifcfg-br0

# Vi ifcfg-br0

An example of a bridge script configuration file is as follows:

Device = br0

Bootproto = none

Onboot = Yes

Ipaddr = 192.168.0.10

Netmask = 255.255.255.0

Gateway = 192.168.0.1

Type = Bridge

Peerdns = Yes

Modify the NIC configuration file

An example of the NIC configuration file is as follows:

Device = eth0

Bootproto = none

Hwaddr = 00: 50: 8d: B7: Cf: 9d

Ipv6init = Yes

Ipv6_autoconf = Yes

Onboot = Yes

Dhcp_hostname = ora.haoqi.cn

Ipaddr = 192.168.0.10

Netmask = 255.255.255.0

Gateway = 192.168.0.1

Type = Ethernet

Peerdns = Yes

Userctl = No

Bridge = br0

Mtu= 9000

Restart the network service

Set KVM (Virtual Machine) to access the Internet through the bridge in rhel5.4

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.