Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hypervisor:base:network [2015/03/04 22:38]
admin [Virtual Network Interfaces]
hypervisor:base:network [2015/03/04 22:45] (current)
admin [Beginners Network Configuration]
Line 25: Line 25:
  
 All supported VLAN configurations are equally applicable to pools and standalone hosts, and bonded and non-bonded configurations. All supported VLAN configurations are equally applicable to pools and standalone hosts, and bonded and non-bonded configurations.
- 
----- 
 ---- ----
 =====  Initial Networking Configuration ===== =====  Initial Networking Configuration =====
Line 50: Line 48:
  
 The PIF used for management operations is the only PIF ever configured with an IP address.\\ The PIF used for management operations is the only PIF ever configured with an IP address.\\
-<color grey>​**External networking for VMs is achieved by bridging PIFs to VIFs using the network object which acts as a virtual Ethernet switch.</​color>​+<color grey>​**External networking for VMs is achieved by bridging PIFs to VIFs using the network object which acts as a virtual Ethernet switch.**</​color>​
  
 +----
 ==== Paravirtualised Network Devices ==== ==== Paravirtualised Network Devices ====
 +----
  
 A paravirtualised network device consists of a pair of network devices. The first of these (the frontend) will reside in the guest domain while the second (the backend) will reside in the backend domain (typically Dom0). A similar pair of devices is created for each virtual network interface. A paravirtualised network device consists of a pair of network devices. The first of these (the frontend) will reside in the guest domain while the second (the backend) will reside in the backend domain (typically Dom0). A similar pair of devices is created for each virtual network interface.
Line 64: Line 64:
 {{ :​hypervisor:​base:​network:​basic.png?​direct&​200 |}} {{ :​hypervisor:​base:​network:​basic.png?​direct&​200 |}}
  
 +----
 ==== Emulated Network Devices ==== ==== Emulated Network Devices ====
 +----
  
 As well as PV network interface fully virtualised (HVM) guests can also be configured with one or more emulated network devices. These devices emulate a real piece of hardware and are useful when a guest OS does not have PV drivers available or when they are not yet available (i.e. during guest installation). As well as PV network interface fully virtualised (HVM) guests can also be configured with one or more emulated network devices. These devices emulate a real piece of hardware and are useful when a guest OS does not have PV drivers available or when they are not yet available (i.e. during guest installation).
Line 76: Line 78:
 If the DM runs in a stub domain then the device surfaces in domain 0 as a PV network device attached to the stub domain. The stub domain will take care of forwarding between the device emulator and this PV device. If the DM runs in a stub domain then the device surfaces in domain 0 as a PV network device attached to the stub domain. The stub domain will take care of forwarding between the device emulator and this PV device.
  
 +----
 ==== MAC addresses ==== ==== MAC addresses ====
 +----
  
 Virtualised network interfaces in domains are given Ethernet MAC addresses. By default most Xen toolstacks will select a random address, depending on the toolstack this will either be static for the entire life time of the guest (e.g. Libvirt, XAPI or xend managed domains) or will change each time the guest is started (e.g. XL or xend unmanaged domains). Virtualised network interfaces in domains are given Ethernet MAC addresses. By default most Xen toolstacks will select a random address, depending on the toolstack this will either be static for the entire life time of the guest (e.g. Libvirt, XAPI or xend managed domains) or will change each time the guest is started (e.g. XL or xend unmanaged domains).
Line 84: Line 88:
 In case yo have to set a MAC address yourself, refer to [[http://​wiki.xenproject.org/​wiki/​XenNetworking]] for indications on how to do that. In case yo have to set a MAC address yourself, refer to [[http://​wiki.xenproject.org/​wiki/​XenNetworking]] for indications on how to do that.
  
 +----
 ==== Bridging ==== ==== Bridging ====
 +----
  
 The default (and most common) Xen configuration uses bridging within the backend domain (typically domain 0) to allow all domains to appear on the network as individual hosts. The default (and most common) Xen configuration uses bridging within the backend domain (typically domain 0) to allow all domains to appear on the network as individual hosts.
Line 95: Line 101:
  
 {{ :​hypervisor:​base:​network:​network-bridge.png?​direct&​200 |}} {{ :​hypervisor:​base:​network:​network-bridge.png?​direct&​200 |}}
- +----
-=== Setting up bridged networking === +
- +
-The recommended method for configuring bridged networking is to use your distro supplied network configuration tools as described in [[http://​wiki.xenproject.org/​wiki/​Host_Configuration/​Networking|Host Configuration/​Networking]]. +
- +
-The XL toolstack will never modify the network configuration and expects that the administrator will have configured the host networking appropriately. +
- +
-=== Attaching virtual devices to the appropriate bridge === +
- +
-When a domU starts up the vif-bridge script is run which: +
- +
-    attaches vifDOMID.DEVID to the appropriate bridge +
-    brings vifDOMID.DEVID up.  +
- +
-With XL and xend the bridge to us for each VIF can be configured using the bridge configuration key. e.g. +
-<​code>​ +
-   vif=[ '​bridge=mybridge'​ ] +
-</​code>​ +
-or +
-<​code>​ +
-   vif=[ '​mac=00:​16:​3e:​01:​01:​01,​bridge=mybridge'​ ] +
-</​code>​ +
-or to create multiple interfaces attached to different bridges: +
-<​code>​ +
-   vif=[ '​mac=00:​16:​3e:​70:​01:​01,​bridge=br0',​ '​mac=00:​16:​3e:​70:​02:​01,​bridge=br1'​ ] +
-</​code>​ +
 ==== Open vSwitch ==== ==== Open vSwitch ====
 +----
  
 The Xen 4.3 release will feature initial integration of [[http://​www.openvswitch.org/​|Open vSwitch]] based networking. Conceptually this is similar to a bridged configuration but rather than placing each vif on a Linux bridge instead an Open vSwitch switch is used. Open vSwitch supports more advanced [[http://​en.wikipedia.org/​wiki/​Software-defined_networking|Software-defined Networking (SDN)]] features such as [[http://​www.openflow.org/​|OpenFlow]]. The Xen 4.3 release will feature initial integration of [[http://​www.openvswitch.org/​|Open vSwitch]] based networking. Conceptually this is similar to a bridged configuration but rather than placing each vif on a Linux bridge instead an Open vSwitch switch is used. Open vSwitch supports more advanced [[http://​en.wikipedia.org/​wiki/​Software-defined_networking|Software-defined Networking (SDN)]] features such as [[http://​www.openflow.org/​|OpenFlow]].
- 
-=== Setting up Open vSwitch networking === 
- 
-Set up openvswitch according to the [[http://​wiki.xenproject.org/​wiki/​Network_Configuration_Examples_(Xen_4.1%2B)|Host Networking Configuration Examples]]. 
- 
-If you want openvswitch to be the default, add the following line to your xl.conf file: 
-<​code>​ 
-vif.default.script="​vif-openvswitch"​ 
-</​code>​ 
-If you have given the openvswitch bridge a name other than xenbr0, you will need to update that default as well: 
-<​code>​ 
-vif.default.bridge="​ovsbr0"​ 
-</​code>​ 
-Alternately,​ you can specify the new script (and bridge, if necessary) in each config file by adding script=vif-openvswitch (and possiblybridge=ovsbr0) to the vifspec of individual vifs in config files. See xl-network-configuration.markdown for more information. 
- 
-=== Attaching virtual devices to the appropriate switch === 
- 
-Xen 4.3 ships with a vif-openvswitch hotplug script which behaves similarly to the vif-bridge script, except that it attaches the VIF to an openvswitch switch (named via the VIF's bridge parameter). 
- 
-In addition to naming the bridge the openvswitch hotplug script supports an extended syntax for the bridge option which allows for VLAN tagging and trunking. That syntax is: 
-<​code>​ 
-BRIDGE_NAME[.VLAN][:​TRUNK:​TRUNK] 
-</​code>​ 
-To add a vif to VLAN 102 on bridge xenbr0: 
-<​code>​ 
-vif = [ '​mac=00:​16:​3e:​01:​01:​01,​bridge=xenbr0.102'​ ] 
-</​code>​ 
-To add a vif to bridge xenbr1 trunked and receiving traffic for VLAN 101 and 202: 
-<​code>​ 
-vif = [ '​mac=00:​16:​3e:​01:​01:​01,​bridge=xenbr0:​101:​202'​ ] 
-</​code>​ 
  
  
-===== Beginners Network Configuration ===== 
  
 ==== Software Bridge ==== ==== Software Bridge ====