Fedora Virtualization Guide - en to zh_TW translation catalogue (54 entries)

note: Tag: title
en: Pre-Red Hat Enterprise Linux 5.4 Xen networking
zh_TW: Red Hat Enterprise Linux 5.4 Xen 網路作業

note: Tag: para
en: This chapter covers special topics for networking and network configuration with the Xen hypervisor.
zh_TW: 本章節涵蓋了 Xen hypervisor 的網路作業，以及網路設定的相關特殊主題。

note: Tag: para
en: Most guest network configuration occurs during the guest initialization and installation process. To learn about configuring networking during the guest installation process, read the relevant sections of the installation process, <xref linkend="chap-Virtualization-Virtualized_guest_installation_overview"/>.
zh_TW: 大部分客座端的網路設定都會在客座端初始化和進行安裝程序時發生。欲取得更多有關於在客座端安裝程序進行時，執行網路作業設定的相關資訊，請參閱安裝程序的相關部份 <xref linkend="chap-Virtualization-Virtualized_guest_installation_overview"/>。

note: Tag: para
en: Network configuration is also covered in the tool specific reference chapters for <command>virsh</command> (<xref linkend="chap-Virtualization-Managing_guests_with_virsh"/>) and <command>virt-manager</command> (<xref linkend="chap-Virtualization-Managing_guests_with_the_Virtual_Machine_Manager_virt_manager"/>). Those chapters provide a detailed description of the networking configuration tasks using both tools.
zh_TW: 網路設定也涵蓋於 <command>virsh</command>（<xref linkend="chap-Virtualization-Managing_guests_with_virsh"/>）和 <command>virt-manager</command>（<xref linkend="chap-Virtualization-Managing_guests_with_the_Virtual_Machine_Manager_virt_manager"/>）工具的參照章節中。這些章節提供了使用這兩個工具來進行網路作業設定工作的詳細資訊。

note: Tag: title
en: <title>Tip</title>
zh_TW: <title>提示</title>

note: Tag: para
en: Using para-virtualized network drivers improves performance on fully virtualized Linux guests. <xref linkend="chap-Virtualization-Xen_Para_virtualized_Drivers"/> explains how to utilize para-virtualized network drivers.
zh_TW: 使用半虛擬化的網路驅動程式可提昇完整虛擬化的 Linux 客座端效能。<xref linkend="chap-Virtualization-Xen_Para_virtualized_Drivers"/> 這個章節解釋了如何利用半虛擬化的網路驅動程式。

note: Tag: title
en: Configuring multiple guest network bridges to use multiple Ethernet cards
zh_TW: 設定多重客座端網路橋接來使用多重乙太網路卡

note: Tag: para
en: Process to setup network bridges (with the Xen hypervisor):
zh_TW: 設定網路橋接的程序（搭配 Xen hypervisor）：

note: Tag: para
en: Configure another network interface using either the <command>system-config-network</command> application. Alternatively, create a new configuration file named <filename>ifcfg-ethX</filename> in the <filename>/etc/sysconfig/network-scripts/</filename> directory where <parameter>X</parameter> is any number not already in use. Below is an example configuration file for a second network interface called <computeroutput>eth1</computeroutput>
zh_TW: 請使用 <command>system-config-network</command> 應用程式來設定另一個網路介面卡。另外您亦可在 <filename>/etc/sysconfig/network-scripts/</filename> 目錄中建立一個名為 <filename>ifcfg-ethX</filename> 的新配置檔案，<parameter>X</parameter> 代表任何未被使用中的編號。下列為一個稱為 <computeroutput>eth1</computeroutput> 的第二網路介面卡的配置檔案範本：

note: Tag: para
en: Copy the file, <filename>/etc/xen/scripts/network-bridge</filename>, to <filename>/etc/xen/scripts/network-bridge.xen</filename>.
zh_TW: 請將 <filename>/etc/xen/scripts/network-bridge</filename> 檔案複製至 <filename>/etc/xen/scripts/network-bridge.xen</filename>。

note: Tag: para
en: Comment out any existing network scripts in <filename>/etc/xen/xend-config.sxp</filename> and add the line <parameter>(network-xen-multi-bridge)</parameter>.
zh_TW: 請將 <filename>/etc/xen/xend-config.sxp</filename> 中的任何現有網路 script 改為註解並新增 <parameter>(network-xen-multi-bridge)</parameter> 一行。

note: Tag: para
en: Create a custom script to create multiple network bridges. A sample scripts is below, this example script will create two Xen network bridges (xenbr0 and xenbr1) one will be attached to eth1 and the other one to eth0. If you want to create additional bridges just follow the example in the script and copy/paste the lines accordingly:
zh_TW: 請建立一個自訂的 script 來建立多重網路橋接。以下為一個 script 範本，此範例 script 將會建立兩個 Xen 網路橋接（xenbr0 和 xenbr1），一個會連至 eth1，另一個則會連至 eth0。若您希望建立額外的橋接，請按照 script 中的範例並複製/貼上相應的幾行即可：

note: Tag: title
en: For Red Hat Enterprise Linux 5.1 or newer
zh_TW: 適用於 Red Hat Enterprise Linux 5.1 或更新版本

note: Tag: para
en: This section describes manually adding network bridges. This procedure is not required or recommended for all versions of Red Hat Enterprise Linux newer than version 5.0. For newer versions use "<guilabel>Virtual Network</guilabel>" adapters when creating guests in <command>virt-manager</command>. NetworkManager works with virtual network devices by default in Red Hat Enterprise Linux 5.1 and newer.
zh_TW: 此部份描述了如何手動式地新增網路橋接值裝置。不建議（或不需要）在 Red Hat Enterprise Linux 5.0 或更新版本上進行這項程序。較新的版本在使用 <command>virt-manager</command> 來建立客座端時請使用「<guilabel>虛擬網路</guilabel>」卡。就預設值來說，在 Red Hat Enterprise Linux 5.1 或更新版本中，NetworkManager 可適用於虛擬網路裝置。

note: Tag: para
en: In <command>xm</command> configuration files, virtual network devices are labeled "<systemitem>vif</systemitem>".
zh_TW: 在 <command>xm</command> 配置檔案中，虛擬網路裝置會被標記為「<systemitem>vif</systemitem>」。

note: Tag: para
en: The challenge in running the Xen hypervisor on a laptop is that most laptops will connected to the network via wireless network or wired connections. Often these connections are switched multiple times a day. In such an environment, the system assumes it has access to the same interface all the time and it also can perform <command>ifup</command> or <command>ifdown</command> calls to the network interface it is using. In addition wireless network cards do not work well in a virtualization environment due to Xen&#39;s (default) bridged network usage.
zh_TW: 在一部手提電腦上執行 Xen hypervisor 上的一大挑戰，是大部分的手提電腦都會透過無線網路或接線的網路連至網路上。通常這些連線一天之內會切換數次。在此環境下，系統會假設它總是擁有相同介面卡的存取權限，並且也能針對於它所使用的網路介面卡執行 <command>ifup</command> 或 <command>ifdown</command>。此外，基於 Xen 的（預設）橋接網路使用量的緣故，無線網路卡在虛擬化環境下的運作並不佳。

note: Tag: para
en: This setup will also enable you to run Xen in offline mode when you have no active network connection on your laptop. The easiest solution to run Xen on a laptop is to follow the procedure outlined below:
zh_TW: 此設定也可讓您在手提電腦上沒有網路連線時，能夠透過離線模式執行 Xen。要在手提電腦上執行 Xen，最簡單方法就是依照下列所列出的程序進行：

note: Tag: para
en: You will be configuring a &#39;dummy&#39; network interface which will be used by Xen. In this example the interface is called <command>dummy0</command>. This will also allow you to use a hidden IP address space for your guests.
zh_TW: 設定會被 Xen 所使用的「虛擬」網路介面卡。在此範例中，該介面卡稱為 <command>dummy0</command>。這也能讓您針對於您的客座端使用隱藏式的 IP 位址空間。

note: Tag: para
en: You will need to use static IP address as DHCP will not listen on the dummy interface for DHCP requests. You can compile your own version of DHCP to listen on dummy interfaces, however you may want to look into using dnsmasq for DNS, DHCP and tftpboot services in a Xen environment. Setup and configuration are explained further down in this section/chapter.
zh_TW: 您將需要使用靜態 IP 位址，因為 DHCP 不會在虛擬介面卡上監聽 DHCP 請求。您可編譯您自己的 DHCP 版本來在虛擬介面卡上進行監聽，不過您也許會希望嘗試在 Xen 環境下使用 DNS 的 dnsmasq、DHCP 或是 tftpboot 服務。有關於設定與配置上的相關資訊之後會於本部份章節後段詳細解說。

note: Tag: para
en: You can also configure NAT and IP masquerading in order to enable access to the network from your guests.
zh_TW: 您也可設定網路位址轉譯（NAT，Network Address Translation）與 IP 偽冒（IP masquerading），來得到由客座端存取網路的權限。

note: Tag: title
en: Configuring a dummy network interface
zh_TW: 設定一個虛擬網路介面卡

note: Tag: para
en: Perform the following configuration steps on your host:
zh_TW: 請在您的主機上進行下列設定步驟：

note: Tag: para
en: create a dummy0 network interface and assign it a static IP address. In our example I selected 10.1.1.1 to avoid routing problems in our environment. To enable dummy device support add the following lines to <filename>/etc/modprobe.conf</filename>
zh_TW: 請建立一個 dummy0 網路介面卡並為它指派一組靜態 IP 位址。我們在範例中選擇了 10.1.1.1 來避免在我們的環境下產生路由問題。若要啟用虛擬裝置支援，請將下列幾行附加至 <filename>/etc/modprobe.conf</filename>

note: Tag: para
en: To configure networking for dummy0 edit/create <filename>/etc/sysconfig/network-scripts/ifcfg-dummy0</filename>:
zh_TW: 若要為 dummy0 設定網路作業，請編輯/建立 <filename>/etc/sysconfig/network-scripts/ifcfg-dummy0</filename>：

note: Tag: para
en: Bind <systemitem>xenbr0</systemitem> to <systemitem>dummy0</systemitem>, so you can use networking even when not connected to a physical network. Edit <filename>/etc/xen/xend-config.sxp</filename> to include the <computeroutput>netdev=dummy0</computeroutput> entry:
zh_TW: 請將 <systemitem>xenbr0</systemitem> 綁定至 <systemitem>dummy0</systemitem>，如此一來就算未連至一個實體網路，您也還是能夠使用網路作業。請編輯 <filename>/etc/xen/xend-config.sxp</filename> 並使其包含 <computeroutput>netdev=dummy0</computeroutput> 這個項目：

note: Tag: para
en: Open <filename>/etc/sysconfig/network</filename> in the guest and modify the default gateway to point to <systemitem>dummy0</systemitem>. If you are using a static IP, set the guest&#39;s IP address to exist on the same subnet as <systemitem>dummy0</systemitem>.
zh_TW: 請在客座端中開啟 <filename>/etc/sysconfig/network</filename> 並將預設閘道器修改為指向 <systemitem>dummy0</systemitem>。若您正在使用一組靜態的 IP，請將客座端的 IP 位址設成在與 <systemitem>dummy0</systemitem> 相同的子網路上。

note: Tag: para
en: Setting up NAT in the host will allow the guests access Internet, including with wireless, solving the Xen and wireless card issues. The script below will enable NAT based on the interface currently used for your network connection.
zh_TW: 設定主機中的 NAT 能讓客座端存取網路，這包括使用無線網路，並且可解決 Xen 的無線網路卡上的問題。以下 script 將會根據您網路連線目前所使用的介面卡來啟用 NAT。

note: Tag: title
en: Configuring NAT for virtualized guests
zh_TW: 為虛擬客座端設定 NAT

note: Tag: para
en: Network address translation (NAT) allows multiple network address to connect through a single IP address by intercepting packets and passing them to the private IP addresses. You can copy the following script to <filename>/etc/init.d/xenLaptopNAT</filename> and create a soft link to <filename>/etc/rc3.d/S99xenLaptopNAT</filename>. this automatically starts NAT at boot time.
zh_TW: 網路位址轉譯（NAT）能透過截取封包並將它們傳送至私密 IP 位址，來讓多重網路位址通過一個單獨的 IP 位址來進行連線。您可將下列 script 複製至 <filename>/etc/init.d/xenLaptopNAT</filename> 並建立一個連至 <filename>/etc/rc3.d/S99xenLaptopNAT</filename> 的捷徑。這會使 NAT 在開機時自動地啟動。

note: Tag: title
en: <application>NetworkManager</application> and wireless NAT
zh_TW: <application>NetworkManager</application> 與無線 NAT

note: Tag: para
en: The script below may not work well with wireless network or <application>NetworkManager</application> due to start up delays. In this case run the script manually once the machine has booted.
zh_TW: 基於啟動上的延遲，下列 script 不適合使用於無線網路或 <application>NetworkManager</application>。在此情況下，請在機器啟動時手動式地執行該 script 一遍。

note: Tag: title
en: Configuring dnsmasq for the DNS, DHCP and tftpboot services
zh_TW: 為 DNS、DHCP 和 tftpboot 服務設定 dnsmasq

note: Tag: para
en: One of the challenges in running virtualization on a laptop (or any other computer which is not connected by a single or stable network connection) is the change in network interfaces and availability. Using a dummy network interface helps to build a more stable environment but it also brings up new challenges in providing DHCP, DNS and tftpboot services to your virtual machines/guests. The default DHCP daemon shipped with Red Hat Enterprise Linux and Fedora Core will not listen on dummy interfaces, your DNS forwarded information may change as you connect to different networks and VPNs.
zh_TW: 在手提電腦（或任何其它未透過一個單獨或穩定網路連線的電腦）上執行虛擬化的一大挑戰，是網路介面卡會有所更動，使其可用性降低。使用一個虛擬網路介面卡可協助您建立一個更加穩定的環境，不過它也會產生一些在提供 DHCP、DNS 與 tftpboot 服務至您的虛擬機器/客座端上的問題。Red Hat Enterprise Linux 與 Fedora Core 中所提供的預設 DHCP daemon 不會在虛擬介面卡上進行監聽，您的 DNS 所轉發的資訊可能會隨著您連至不同的網路和 VPN 而改變。

note: Tag: para
en: One solution to the above challenges is to use dnsmasq which can provide all of the above service in a single package and will also allow you to control its service only being available to requests from your dummy interface. Below is a short write up on how to configure <command>dnsmasq</command> on a laptop running virtualization:
zh_TW: 以上問題的解決方法之一就是使用 dnsmasq，它能以一個單獨的套件來提供以上所有的服務，並且亦可讓您控制它的服務使其只能用於來自您虛擬介面卡的請求。以下為如何在一部執行虛擬化中的手提電腦上設定 <command>dnsmasq</command> 的簡短指南：

note: Tag: para
en: Get the latest version of dnsmasq from <ulink url="http://www.thekelleys.org.uk/dnsmasq/">here</ulink>.
zh_TW: 您可透過點選<ulink url="http://www.thekelleys.org.uk/dnsmasq/">此處</ulink>來取得最新版本的 dnsmasq。

note: Tag: para
en: Document for dnsmasq can be found <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">here</ulink>.
zh_TW: 您可透過點選 <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">此處</ulink>來取得 dnsmasq 的文件。

note: Tag: para
en: Copy the other files referenced below from <ulink url="http://et.redhat.com/~jmh/tools/xen/"></ulink> and grab the file <filename>dnsmasq.tgz</filename>. The tar archive includes the following files:
zh_TW: 請由 <ulink url="http://et.redhat.com/~jmh/tools/xen/"></ulink> 複製以下參照的其它檔案並取得 <filename>dnsmasq.tgz</filename> 檔案。這個 tar 壓縮檔包含著下列檔案：

note: Tag: para
en: <filename>nm-dnsmasq</filename> can be used as a dispatcher script for NetworkManager. It will be run every time NetworkManager detects a change in connectivity and force a restart/reload of dnsmasq. It should be copied to <filename>/etc/NetworkManager/dispatcher.d/nm-dnsmasq</filename>
zh_TW: <filename>nm-dnsmasq</filename> 可被用來作為 NetworkManager 的調度 script。每次當 NetworkManager 偵測到連接性上的變更時，它便會執行並且強制 dnsmasq 重新啟動/重新載入。它應被複製至 <filename>/etc/NetworkManager/dispatcher.d/nm-dnsmasq</filename>。

note: Tag: para
en: <filename>xenDNSmasq</filename> can be used as the main start up or shut down script for <filename>/etc/init.d/xenDNSmasq</filename>
zh_TW: <filename>xenDNSmasq</filename> 可被用來作為 <filename>/etc/init.d/xenDNSmasq</filename> 的主要啟動或關閉的 script。

note: Tag: para
en: <filename>dnsmasq.conf</filename> is a sample configuration file for <filename>/etc/dnsmasq.conf</filename>
zh_TW: <filename>dnsmasq.conf</filename> 為 <filename>/etc/dnsmasq.conf</filename> 的範例配置檔案。

note: Tag: para
en: <filename>dnsmasq</filename> is the binary image for <filename>/usr/local/sbin/dnsmasq</filename>
zh_TW: <filename>dnsmasq</filename> 為 <filename>/usr/local/sbin/dnsmasq</filename> 的 binary 映像檔。

note: Tag: para
en: Once you have unpacked and build dnsmasq (the default installation will be the binary into <filename>/usr/local/sbin/dnsmasq</filename>) you need to edit your dnsmasq configuration file. The file is located in <filename>/etc/dnsmaqs.conf</filename>
zh_TW: 當您解壓縮並建置了 dnsmasq（預設安裝為 <filename>/usr/local/sbin/dnsmasq</filename> 之中的 binary）之後，您將需要編輯您的 dnsmasq 配置檔案。該檔案位於 <filename>/etc/dnsmaqs.conf</filename> 之中。

note: Tag: para
en: Edit the configuration to suit your local needs and requirements. The following parameters are likely the ones you want to modify:
zh_TW: 請編輯配置使其配合您的本地需求。以下可能會是您所需要修改的參數：

note: Tag: para
en: The <computeroutput>interface</computeroutput> parameter allows <systemitem class="service">dnsmasq</systemitem> to listen for <systemitem class="service">DHCP</systemitem> and <systemitem class="service">DNS</systemitem> requests only on specified interfaces. This could be dummy interfaces but not your public interfaces as well as the local loopback interface. Add another <computeroutput>interface</computeroutput> line for more than one interface. <computeroutput>interface=dummy0</computeroutput> is an example which listens on the <systemitem>dummy0</systemitem> interface.
zh_TW: <computeroutput>interface</computeroutput> 這個參數能讓 <systemitem class="service">dnsmasq</systemitem> 在特定介面卡上監聽 <systemitem class="service">DHCP</systemitem> 與 <systemitem class="service">DNS</systemitem> 請求。這可能是虛擬介面卡而非您的公用介面卡或本地 loopback 介面卡。請在多於一個介面卡的情況下附加另一行 <computeroutput>interface</computeroutput>。<computeroutput>interface=dummy0</computeroutput> 就是一個在 <systemitem>dummy0</systemitem> 介面卡上進行監聽的範例。

note: Tag: para
en: <computeroutput>dhcp-range</computeroutput> to enable the integrated <systemitem class="service">DHCP</systemitem> server, you need to supply the range of addresses available for lease and optionally a lease time. If you have more than one network, you will need to repeat this for each network on which you want to supply <systemitem class="service">DHCP</systemitem> service. An example would be (for network 10.1.1.* and a lease time of 12hrs): <computeroutput>dhcp-range=10.1.1.10,10.1.1.50,255.255.255.0,12h</computeroutput>
zh_TW: <computeroutput>dhcp-range</computeroutput> 若要啟用整合的 <systemitem class="service">DHCP</systemitem> 伺服器，您必須提供可租借（lease）的位址範圍與/或租借時間。若您擁有超過一個網路的話，您將需要針對您所希望提供 <systemitem class="service">DHCP</systemitem> 服務的各個網路重複此步驟。其中一個範例為（網路 10.1.1.* 以及 12 小時的租借時間）：<computeroutput>dhcp-range=10.1.1.10,10.1.1.50,255.255.255.0,12h</computeroutput>。

note: Tag: para
en: <computeroutput>dhcp-option</computeroutput> to override the default route supplied by dnsmasq, which assumes the router is the same machine as the one running dnsmasq. An example would be <computeroutput>dhcp-option=3,10.1.1.1</computeroutput>
zh_TW: <computeroutput>dhcp-option</computeroutput> 可置換 dnsmasq 所提供的預設路由，這會假設路由器和執行 dnsmasq 的機器是相同的。例如：<computeroutput>dhcp-option=3,10.1.1.1</computeroutput>。

note: Tag: para
en: After configuring dnsmasq you can copy the script below as <filename>xenDNSmasq</filename> to <filename>/etc/init.d</filename>
zh_TW: 在設定了 dnsmasq 之後，您可將以下 script 複製為 <filename>xenDNSmasq</filename> 至 <filename>/etc/init.d</filename>。

note: Tag: para
en: If you want to automatically start dnsmasq during system boot you should register it using chkconfig(8):
zh_TW: 若您希望在系統啟動時自動地啟用 dnsmasq，您應使用 <command>chkconfig</command> 來註冊它：

note: Tag: para
en: Enable it for automatic start up:
zh_TW: 使它可自動啟動：

note: Tag: para
en: To configure <filename>dnsmasq</filename> to restart every time <application>NetworkManager</application> detects a change in connectivity you can use the supplied script <command>nm-dnsmasq</command>.
zh_TW: 若要將 <filename>dnsmasq</filename> 配置成每當 <application>NetworkManager</application> 偵測到連接性上的改變時，就會重新啟動的話，您可使用提供的 script：<command>nm-dnsmasq</command>。

note: Tag: para
en: Copy the <filename>nm-dnsmasq</filename> script to <filename>/etc/NetworkManager/dispatcher.d/</filename>
zh_TW: 請將 <filename>nm-dnsmasq</filename> script 複製至 <filename>/etc/NetworkManager/dispatcher.d/</filename>

note: Tag: para
en: The <application>NetworkManager</application> dispatcher will execute the script (in alphabetical order if you have other scripts in the same directory) every time there is a change in connectivity
zh_TW: 每當連接性上有變更時，<application>NetworkManager</application> 調度器便會（若相同目錄中還有其它 script 的話便會按照字母順序）執行 script

note: Tag: para
en: <filename>dnsmasq</filename> will also detect changes in your <filename>/etc/resolv.conf</filename> and automatically reload them (that is, if you start up a VPN session for example).
zh_TW: <filename>dnsmasq</filename> 也會偵測您 <filename>/etc/resolv.conf</filename> 中的變更並自動地（在您啟用了一個 VPN session 時）將它們重新載入。

note: Tag: para
en: Both the <filename>nm-dnsmasq</filename> and <filename>xenDNSmasq</filename> script will also set up NAT if you have your virtualized guests on a hidden network to allow them access to the public network.
zh_TW: 若您的虛擬機器位於一個隱藏的網路上，<filename>nm-dnsmasq</filename> 和 <filename>xenDNSmasq</filename> 這兩個 script 也會設定 NAT，以允許它們存取公共網路。
