Settings of KVM bridges in centos

Source: Internet
Author: User

Create a new ifcfg-br0 file:

Device = br0
Type = Bridge
Bootproto = static
Broadcast = 10.1.0000255
Ipaddr = 10.1.29.3
Netmask = 255.255.0.0
Network = 10.1.0.0
Onboot = Yes

 

Then modify the configuration file of the corresponding Nic, Which is eth1:

# RealTek semiconduco., Ltd. RTL-8169 Gigabit Ethernet
Device = eth1
# Bootproto = none
# Broadcast = 10.1.0000255
Hwaddr = D8: 5D: 4C: 74: EE: E8
# Ipaddr = 10.1.29.3
# Netmask = 255.255.0.0
# Network = 10.1.0.0
Onboot = Yes
# Type = Ethernet
# Userctl = No
# Ipv6init = No
# Peerdns = Yes
Bridge = br0

We can see that the original Nic configuration only retains the device name, hardware address, onboot option, and the newly added bridge = br0.

 

Then restart the network:

/Etc/init. d/network restart or service network restart

 

After the gateway is added to br0 in the experiment, the gateway in/etc/sysconfig/network disappears. After the operation is successful, you can use Route-N to view the route and find that all the packets are routed from br0.

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.