zoukankan      html  css  js  c++  java
  • xen4.1.2网桥配置

    在xen4.1之前,通过设置/etc/xen/xend-config.sxp中的(network-script network-bridge)可以让xend来自动设置网桥。但是xen4.1之后不建议这么做:

    When using the xl toolstack the host networking configuration is not configured by the toolstack but rather administrators are required to setup an appropriate network configuration using the tools provided by their host distribution.

    From Xen 4.1 onwards the xend toolstack will only reconfigure the host network stack if the network stack does not appear to have been configured already (e.g. no bridges currently exist). This change allows administrators who wish to configure the network stack themselves to do so by default while preserving the existing behaviour for those who do not.

    Other toolstack's requirements may differ. e.g. XCP contains its own mechanisms for configuring networking which should be used instead.

    It is recommended to use the xenbrN naming convention for maximum compatibility.

     
    As of the time of writing (Fedora 12), NetworkManager still does not support bridging, so it is necessary to use "classic" network initscripts for the bridge, and to explicitly mark them as independent from NetworkManager (the "NM_CONTROLLED=no" lines in the scripts below).
    If desired you can completely disable the NetworkManager by running the following commands:
    # chkconfig NetworkManager off
    # chkconfig network on
    # service NetworkManager stop
    # service network start
     
    手动设置网桥:
     
    刚开机时可以看到默认网桥为tmpbridge且没有将物理网卡添加到网桥上:
    # brctl show
    bridge name     bridge id               STP enabled     interfaces
    tmpbridge               8000.000000000000       no
     
    删除tmpbridge: brctl delbr tmpbridge
    添加一个新的网桥: brctl addbr xenbr0
     
    配置网络参数:
    # cat /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE="eth0"
    HWADDR="1C:6F:65:23:03:FE"
    BRIDGE=xenbr0
    ONBOOT="yes"
    # cat /etc/sysconfig/network-scripts/ifcfg-xenbr0
    DEVICE="xenbr0"
    TYPE=Bridge
    BOOTPROTO=dhcp
    ONBOOT="yes"
     
    重启网络: 
    # /etc/init.d/network restart
    Shutting down interface xenbr0:                            [  OK  ]
    Shutting down interface eth0:                              [  OK  ]
    Shutting down loopback interface:                          [  OK  ]
    Bringing up loopback interface:                            [  OK  ]
    Bringing up interface eth0:                                [  OK  ]
    Bringing up interface xenbr0: 
    Determining IP information for xenbr0... done.
                                                               [  OK  ]
  • 相关阅读:
    Exadata 上关于SAS盘的小秘密
    Python 全栈开发:python循环语句while
    Python 全栈开发:python条件语句if..else..
    Python 全栈开发:python基础
    Python 全栈开发:python初识
    计算机基础(简单了解)
    如何计算网络配置中广播域和冲突域的数目?
    使VS开发的程序在Win7系统运行时自动提升权限
    在程序中通过Process启动外部exe的方法及注意事项
    获取指定目录下多种格式的文件
  • 原文地址:https://www.cnblogs.com/feisky/p/2441290.html
Copyright © 2011-2022 走看看