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

Re: [libvirt] [PATCHv3] Support for static routes on a virtual bridge

On 04/11/2013 08:11 AM, Gene Czarcinski wrote:
This patch adds support for adding a static route for
a network.  The "gateway" sub-element specifies
the gateway's IP address.  Both IPv4 and IPv6
static routes are supported although it is
expected that this functionality will have
more use with IPv6.

This updates add the <route> element to define a
static route.  The gateway= subelement species the
gateway address which is to receive the packets
forwarded to the network specified on the
<route> definition.

Tests are done to validate that the input definitions 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
has a network defined on this bridge.

Whan a static route is added to a bridge, there is a slight
possibility that the gateway address will be incorrect.  If
this is handled as an error, that bridge becomes unusable and
can only be recovered by rebooting.  If the error is
ignored, then that network can be destroyed and the network
definition file edited to correct the problem.  Unfortunately,
the error message only appears in syslog.  However, with
the checks performed when the network definition file is parsed,
it is unlikely that this condition will ever occur.

The command used is of the following form:

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

I am trying to finalize an update for virt-manager which will support static routes but I need to know the final form of the definition. Is the following [as implemented in this patch] OK?

<route family='ipv6' address='fd00:beef:27:4::' prefix ='64' gateway='fd00:beef:10:7::1:2' />


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