Ero sivun ”Virtuaalisen järjestelmän verkkosiltaus” versioiden välillä

Siirry navigaatioon Siirry hakuun
(verkkoluokkaan, ehkä muihinkin voisi)
Rivi 70: Rivi 70:


=== Luodaan uusi verkkoyhteys ”Bridge to LAN” ===
=== Luodaan uusi verkkoyhteys ”Bridge to LAN” ===
Ks. myös [http://libvirt.org/formatdomain.html#elementsNICSBridge]
Lainaukset brctl-manuaalista. Ks. myös [http://libvirt.org/formatdomain.html#elementsNICSBridge]


”This is the recommended config for general guest connectivity on hosts with static wired networking configs. Provides a bridge from the VM directly onto the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved.”
”This is the recommended config for general guest connectivity on hosts with static wired networking configs. Provides a bridge from the VM directly onto the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved.”


Tämä on br0, jolla on hallussa eth0.
Silta on br0, jolla on ”hallussaan” (enslaves) eth0.


The guest VM will have an associated tun device created with a name of vnetN, which can also be overridden with the <target> element. The tun device will be enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.  
”The guest VM will have an associated tun device created with a name of vnetN, which can also be overridden with the <target> element. The tun device will be enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.


Luotu bridge.xml ja sille UUID <tt>uuidgen</tt>:llä.
<tt>bridge.xml</tt>: määritellään silta br0 ja yhdistetään liikenne eth0 -> vnet0. UUID on luotu <tt>uuidgen</tt>:llä.


   <network>
   <network>
Rivi 100: Rivi 100:




Ladataan määritykset
Ladataan määritykset libvirtiin. Tämä luo automaattisesti sillan br0.


   $ virsh net-define bridge.xml
   $ virsh net-define bridge.xml
Rivi 112: Rivi 112:
   -----------------------------------------
   -----------------------------------------
   bridge              aktiivinen no
   bridge              aktiivinen no
  default              aktiivinen yes


Tämä luo automaattisesti sillan "br0".


”An ethernet bridge is a device commonly used to connect different networks of ethernets together, so that these ethernets will appear as one ethernet to the participants. Each of the ethernets being connected corresponds to one physical interface in the bridge.”
”An ethernet bridge is a device commonly used to connect different networks of ethernets together, so that these ethernets will appear as one ethernet to the participants. Each of the ethernets being connected corresponds to one physical interface in the bridge.”
Rivi 145: Rivi 143:
  192.168.1.0    *              255.255.255.0  U    0      0        0 br0
  192.168.1.0    *              255.255.255.0  U    0      0        0 br0
  192.168.0.0    *              255.255.255.0  U    0      0        0 eth1
  192.168.0.0    *              255.255.255.0  U    0      0        0 eth1
192.168.122.0  *              255.255.255.0  U    0      0        0 virbr0
  loopback        ariloulaleelay  255.0.0.0      UG    0      0        0 lo
  loopback        ariloulaleelay  255.0.0.0      UG    0      0        0 lo
  default        192.168.1.1    0.0.0.0        UG    0      0        0 br0
  default        192.168.1.1    0.0.0.0        UG    0      0        0 br0
15

muokkausta

Navigointivalikko