libvirt/docs/schemas
Gene Czarcinski ccff335f83 Support for static routes on a virtual bridge
network: static route support for <network>

This patch adds the <route> subelement of <network> to define a static
route.  the address and prefix (or netmask) attribute identify the
destination network, and the gateway attribute specifies the next hop
address (which must be directly reachable from the containing
<network>) which is to receive the packets destined for
"address/(prefix|netmask)".

These attributes are translated into an "ip route add" command that is
executed when the network is started. The command used is of the
following form:

  ip route add <address>/<prefix> via <gateway> \
               dev <virbr-bridge> proto static metric <metric>

Tests are done to validate that the input data are correct.  For
example, for a static route ip definition, the address must be a
network address and not a host address.  Additional checks are added
to ensure that the specified gateway is directly reachable via this
network (i.e. that the gateway IP address is in the same subnet as one
of the IP's defined for the network).

prefix='0' is supported for both family='ipv4' address='0.0.0.0'
netmask='0.0.0.0' or prefix='0', and for family='ipv6' address='::',
prefix=0', although care should be taken to not override a desired
system default route.

Anytime an attempt is made to define a static route which *exactly*
duplicates an existing static route (for example, address=::,
prefix=0, metric=1), the following error message will be sent to
syslog:

    RTNETLINK answers: File exists

This can be overridden by decreasing the metric value for the route
that should be preferred, or increasing the metric for the route that
shouldn't be preferred (and is thus in place only in anticipation that
the preferred route may be removed in the future).  Caution should be
used when manipulating route metrics, especially for a default route.

Note: The use of the command-line interface should be replaced by
direct use of libnl so that error conditions can be handled better.  But,
that is being left as an exercise for another day.

Signed-off-by: Gene Czarcinski <gene@czarc.net>
Signed-off-by: Laine Stump <laine@laine.org>
2013-05-13 16:14:40 -04:00
..
basictypes.rng qemu: Allow the disk wwn to have "0x" prefix 2013-04-17 23:05:56 +08:00
capability.rng capabilities: add NUMA memory information 2013-03-08 11:51:00 -07:00
domain.rng snapshot: update rng to support full domain in xml 2011-09-03 08:12:13 -06:00
domaincommon.rng Add 'nbd' as a valid filesystem driver type 2013-05-13 13:15:19 +01:00
domainsnapshot.rng Add support for storage format in FS <driver> 2013-05-13 13:15:19 +01:00
interface.rng xml: Clean up schemas to use shared data types instead of local 2012-03-08 15:31:54 +01:00
Makefile.am snapshot: update rng to support full domain in xml 2011-09-03 08:12:13 -06:00
network.rng Support for static routes on a virtual bridge 2013-05-13 16:14:40 -04:00
networkcommon.rng bandwidth: add new 'floor' attribute 2012-12-11 18:35:12 +01:00
nodedev.rng nodedev: Dump max vports and vports in use for HBA's XML 2013-03-25 20:46:05 +08:00
nwfilter.rng Correct invalid RNG schemas 2013-03-21 17:24:08 +01:00
secret.rng secret: add iscsi to possible usage types 2013-03-22 12:10:23 +08:00
storageencryption.rng rng: Have colorful *.rng with editor 2013-01-23 23:03:17 +08:00
storagepool.rng schemas: Move PortNumber and sourceinfoadapter to basictypes.rng 2013-04-09 22:34:02 +08:00
storagevol.rng doc/schema: disk storage volume formats 2013-03-20 21:48:05 +08:00