Re: [libvirt] Network Configuration question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 09, 2009 at 04:51:34PM +0100, Remko Nolten wrote:
> Thanks for your response. I'm afraid this will not work since the ip- 
> addresses for the VM's have a /32 netmask and no default gateway which  
> is required when you create a interface using a bridge.
>
> This how it works in a (non-virtualized) system at our hosting  
> organization:
> For example, my server has one main ip-address, 10.255.255.0 on eth0,  
> and our hosting organization gives us 3 extra ip-addresses (so our range 
> is 10.255.255.0/30) which are routed to 10.255.255.0. On our server, we 
> can add the ip-addresses using:
>
> 	ip addr add 10.255.255.1/32 dev lo
> 	ip addr add 10.255.255.2/32 dev lo
> 	ip addr add 10.255.255.3/32 dev lo

This is not quite correct. The physical interface (eg. eth0 in the
case of linux) has an IP address in a different network (say, for
example, 192.168.0.1/24). The /32's are routed to this address. Since
the machine has a default route (eg. to 192.168.0.254), this works
fine.

Cheers,

Paul 'WEiRD' de Weerd

> So, our server gets the routed packages and will recognize them as one  
> of his own which enables us to add listeners to the ip-addresses like  
> Apache or a mail-server.
>
> In our case, we don't want the server to route the packages to the  
> loopback interface (so that services can listen to it), but we want the 
> server to route the traffic to the virtual machine. The more I think of 
> it, I suspect we need the "route" network option like this:
>
> <network>
> 	<name>local</name>
> 	<bridge name="virbr%d" />
> 	<forward mode="route" dev="eth0"/>
> 		<!-- dev is the device which is directly connected to the network and 
> has ip 10.255.255.0-->
> 	<ip address="10.255.255.0" netmask="255.255.255.4">
> 	  <dhcp>
> 	    <range start="10.255.255.1" end="10.255.255.3" />
> 	  </dhcp>
> 	</ip>
> </network>
>
> Is this correct?
>
> -- 
> Remko Nolten
> Tel: 		06-45600767
> E-mail: 	remko@xxxxxxxxx
>
>
>

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]