[Ovirt-devel] Explicit global network modelling

Daniel P. Berrange berrange at redhat.com
Thu Oct 23 18:01:43 UTC 2008

The network configuration UI discussions have all focused around
the idea of configuring NICs on machines. I've been thinking that
this is really not the right model. You have some kind of physical
topology which is known, and has certain properties like network
address and prefix, and vlan.  A host has one or more NICs, each
of which is connected to a network.

So if we can model a network as a global entity in its own right,
we can simplify configuration of host interfaces, so simply a 
matter of association, and optionally defining an address.

* Network
    - addr config      eg, none, static vs dhcp
    - network address  eg,
    - prefix           eg,  /24
    - usage            eg, storage, management, guest
    - vlan number      eg, 43
    - vlan network     eg, name of host network

* Interface
    - name              eg eth1
    - mac               eg 00:11:22:33:44:55
    - addr config       eg, static vs dhcp vs none

With the association being:

           1     n           n    1
  Network  <-----> Interface <----> Node

So if you have say

   * Network: 
      - 'admin lan'
      - dhcp
      - usage: management
   * Network
      - 'guest lan'
      - dhcp
      - usage: guest

Now, you come to configure a new host with two NICs 'eth0' and 'eth1.
In this particular scenario all the admin would need todo is pick off
the 'admin lan' network for 'eth0', and 'guest lan' for eth1. Job done.
No need to specify any addressing, because the network properties already
tell us it is a DHCP based LAN. Also, since eth1 is associated with a 
guest traffic only lan, there is no need for IP config on eth1 in the 
host. All we need do is put eth1 in a bridge. 

Also note we don't need to ask the admin whether eth1 should be bridged
or not. We know for a fact that it must be bridged, because it is a guest
traffic network. Likewise we know that a admin network does not need a
bridge. If a network was designated for both mgmt and guest usage, then
we would need a bridge and IP address config.

Now an alternate example with VLANs...

   * Network:
      - 'office lan'
      -	none addr config
      - usage: none

   * Network:
      - 'admin lan'
      -	dhcp
      - usage: management
      - vlan: 43
      - vlan host: office lan
   * Network
      -	'guest	lan'
      - dhcp
      -	usage: guest
      - vlan: 72
      - vlan host: office lan

Now, come to configure a host with two devices eth0 and eth1. The admin
tells us that both eth0 and eth1 are connected to 'office lan'. With this,
we know that eth0 and eth1 should be bonded since they're on same lan, 
so we merely need ask what kind of bonding is desired.  Since we see
that there are two VLAN networks associated with 'office lan', we also
know that we have to create two VLAN devices on the host, and that one
of those VLAN devices must be put in a bridge. Again no need to ask the
admin about VLAN creation on the host

So this kind of modelling can make our UI for setting up host networking
much clearer / simpler, avoiding lots of redundant questions. Also, by
having an explicit   'network <-> interface <-> host' assoication, we
can trivally determine whether it is possible to migrate between two 
hosts from a network topology POV - its merely checking one DB relation

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the ovirt-devel mailing list