25 Авг 2016 г. 19:18 пользователь "Laine Stump" <laine@laine.org> написал:
>
> On 08/25/2016 05:42 AM, Vasiliy Tolstov wrote:
>>
>> 25 Авг 2016 г. 12:34 пользователь Vasiliy Tolstov <v.tolstov@selfip.ru> написал:
>> >
>> > 25 Авг 2016 г. 8:58 пользователь "Laine Stump" <laine@laine.org> написал:
>> > >
>> > > The linkstate setting of an <interface> is only meant to change the
>> > > online status reported to the guest system by the emulated network
>> > > device driver in qemu,
>> >
>> I need to set host side status of interface. Without this live migration with dinamic routing software (ospf with quagga or bird) bring packet drops. Because on dest interface in up state and kernel try to forward packets to it, but guest CPU is not running.
>
>
> That shouldn't be a problem, since the IPInfo isn't added to the tap device until immediately before the guest CPU is started on the destination (that's the purpose of qemuInterfaceStartDevice()).
>
>
>
>> Also host side status needed for easy blackhole traffic to guest ip.
>
>
> Is this something you need to do while the guest is already running? If not, then I think we don't need anything extra.
>
>
>
>> May be create inside the source link state attribute for host side link status? So it consistent with ip and route elements?
>
>
> If necessary, that might be the right solution, although I still think it's better to not set the tap device offline, in case it's connected to a bridge - we wouldn't want to trigger an STP forward delay. Maybe just delete (and later re-add) the IPInfo would be less disruptive? (Or it might be *more* disruptive, we'd have to try both).
>
>
Thanks for info.
Why not add ability to specify device state from host side? If attribute is empty think that device is up. This is reasonable default. I'm use link status when vm running, for example if we have ddos - I down tap and via ospf route deleted and traffic blackholed.