亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2021 | 回復(fù): 2
打印 上一主題 下一主題

fedora10 KVM 橋接問題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2009-02-07 22:01 |只看該作者 |倒序?yàn)g覽
Using bridged networking with Virt-manager                                       
         
      Friday, September 19, 2008 - 08:08 Haydn Solomon
  
  
   
In
previous posts you can find instructions on how to configure bridged
networking when managing your kvm guests by command line. However for
many users experimenting with kvm, the virt-manager GUI tool is the
preferred method of managing kvm guests in which case bridged
networking configuration might pose a challenge. If you fall into the
camp of users who prefer virt-manager and have ever wondered how to
configure bridged networking , you’ll be able to use bridged networking
with virt-manager after reading this post.



1.        Configure your bridge
Your libvirt installation will provide default bridges for use with
xen, qemu and other types of domains. For qemu/kvm, the default bridge
should be called vnet0 and you can verify this by issuing the following
command on your system.
# brctl show
bridge name     bridge id               STP enabled     interfaces
pan0            8000.000000000000       no
virbr0          8000.000000000000       yes
vnet0           8000.000000000000       yes
Th
first thing you need to do is add a network script for your vnet0
bridge. On Fedora this script will be located under
/etc/sysconfig/network-scripts/ but may differ for other linux
distributions. So go ahead and create a new script at
/etc/sysconfig/network-scripts/ifcfg-vnet0 as root user and edit the
contents so that it looks like the following.
DEVICE=vnet0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
This completes set up of your vnet0 bridge.

2.        Add your physical interface to the bridge
The next step is to add the physical interface that your kvm guest
will be sharing to the vnet0 bridge configured above. For this post,
we’ll assume that you’ll be using eth0 so to add eth0 to vnet0 bridge,
issue the following command.
# brctl addif vnet0 eth0  
You can verify that your eth0 was added to the vnet0 bridge
issuing the brctl show command. Your output should look similar to the
following.
# brctl show
bridge name     bridge id               STP enabled     interfaces
pan0            8000.000000000000       no
virbr0          8000.000000000000       yes
vnet0           8000.0019b97ec863       yes             eth0
Now
you need to configure your network script for eth0. You will already
have a script for eth0, but you’ll need to modify it by adding one line
as BRIDGE=vnet0 so that it looks similar to the following script.
# Broadcom Corporation BCM4401-B0 100Base-TX
DEVICE=eth0
BRIDGE=vnet0
BOOTPROTO=dhcp
HWADDR=00:19:b9:7e:c8:63
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
NM_CONTROLLED=no



3.        Restart your network services
In order for all the network script modifications to take effect,
you need to restart your network services. Your command may differ
slightly but for most linux distributions the following command will
restart your network services.
# /etc/rc.d/init.d/network restart
Shutting down interface vnet0:  [  OK  ]
Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  [  OK  ]
Bringing up interface vnet0:  
Determining IP information for vnet0... done.
[  OK  ]
My
experience is that the dhcp on the bridge device usually takes a little
longer than the other scripts so don’t worry if the line that says
“determining ip information for vnet0” sits there for a min or two.
Once this script completes, you’re finished with your system network
configurations. Now, onto actually using bridged networking with
virt-manager.

4.        Configure Bridged Networking in Virt-Manager
Now comes the easy part. Configure your kvm guest in virt-manager as
you normally would. When you get to the part that asks about your
network type, choose to share with a physical device and you will be
able to select the eth0 on bridge vnet0. Below is a screenshot of what
you should see. You don’t need to specify a specific mac address unless
you need to for some kind of static mapping.



Boot up your kvm guest which will be now connected to your local
network. Your brctl show command will now show your kvm guest network
added to your vnet0 bridge. Below is a sample output.
# brctl show
bridge name     bridge id               STP enabled     interfaces
pan0            8000.000000000000       no
virbr0          8000.000000000000       yes
vnet0           8000.0019b97ec863       yes             eth0
                                                        vnet1

Summary
Bridged networking with virt-manager is simpler than
configuring bridged networking
when managing kvm guests with command line since you don’t have to
worry about things like qemu network scripts and generating random mac
addresses. Virt-manager takes care of these things behind the scenes.
What will be nice to see someday would be GUI tools for managing the
bridges which would make the procedure even simpler.
               
               
               

本文來自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u/32175/showart_1817880.html

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2009-05-15 16:27 |只看該作者
好文~~

論壇徽章:
381
CU十二周年紀(jì)念徽章
日期:2014-01-04 22:46:58CU大;照
日期:2013-03-13 15:32:35CU大;照
日期:2013-03-13 15:38:15CU大;照
日期:2013-03-13 15:38:52CU大;照
日期:2013-03-14 14:08:55CU大;照
日期:2013-04-17 11:17:19CU大;照
日期:2013-04-17 11:17:32CU大;照
日期:2013-04-17 11:17:37CU大;照
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大;照
日期:2013-04-17 11:17:52CU大;照
日期:2013-04-17 11:17:56
3 [報(bào)告]
發(fā)表于 2009-05-15 16:31 |只看該作者
不錯(cuò),收藏先
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP