mirror of
https://github.com/vyos/vyos-documentation.git
synced 2025-10-26 08:41:46 +01:00
Merge pull request #939 from sever-sever/T1237-failover-route
T1237: Add protocol failover route
This commit is contained in:
commit
9c4a3e3ae1
103
docs/configuration/protocols/failover.rst
Normal file
103
docs/configuration/protocols/failover.rst
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
.. _routing-static:
|
||||||
|
|
||||||
|
########
|
||||||
|
Failover
|
||||||
|
########
|
||||||
|
|
||||||
|
Failover routes are manually configured routes, but they install
|
||||||
|
to the routing table if the health-check target is alive.
|
||||||
|
If the target is not alive the route is removed from the routing table
|
||||||
|
until the target will be available.
|
||||||
|
|
||||||
|
***************
|
||||||
|
Failover Routes
|
||||||
|
***************
|
||||||
|
|
||||||
|
.. cfgcmd:: set protocols failover route <subnet> next-hop <address> check
|
||||||
|
target <target-address>
|
||||||
|
|
||||||
|
Configure next-hop `<address>` and `<target-address>` for an IPv4 static
|
||||||
|
route. Specify the target
|
||||||
|
IPv4 address for health checking.
|
||||||
|
|
||||||
|
.. cfgcmd:: set protocols failover route <subnet> next-hop <address> check
|
||||||
|
timeout <timeout>
|
||||||
|
|
||||||
|
Timeout in seconds between health target checks.
|
||||||
|
|
||||||
|
Range is 1 to 300, default is 10.
|
||||||
|
|
||||||
|
.. cfgcmd:: set protocols failover route <subnet> next-hop <address> check
|
||||||
|
type <protocol>
|
||||||
|
|
||||||
|
Defines protocols for checking ARP, ICMP, TCP
|
||||||
|
|
||||||
|
Default is ``icmp``.
|
||||||
|
|
||||||
|
.. cfgcmd:: set protocols failover route <subnet> next-hop <address>
|
||||||
|
interface <interface>
|
||||||
|
|
||||||
|
Next-hop interface for the route
|
||||||
|
|
||||||
|
.. cfgcmd:: set protocols failover route <subnet> next-hop <address>
|
||||||
|
metric <metric>
|
||||||
|
|
||||||
|
Route metric
|
||||||
|
|
||||||
|
Default 1.
|
||||||
|
|
||||||
|
|
||||||
|
*******
|
||||||
|
Example
|
||||||
|
*******
|
||||||
|
|
||||||
|
**One gateway:**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 check target '192.0.2.1'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 check timeout '5'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 check type 'icmp'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 interface 'eth0'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 metric '10'
|
||||||
|
|
||||||
|
Show the route
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
vyos@vyos:~$ show ip route 203.0.113.1
|
||||||
|
Routing entry for 203.0.113.1/32
|
||||||
|
Known via "kernel", distance 0, metric 10, best
|
||||||
|
Last update 00:00:39 ago
|
||||||
|
* 192.0.2.1, via eth0
|
||||||
|
|
||||||
|
**Two gateways and different metrics:**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 check target '192.0.2.1'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 check timeout '5'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 check type 'icmp'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 interface 'eth0'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 192.0.2.1 metric '10'
|
||||||
|
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 198.51.100.1 check target '198.51.100.99'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 198.51.100.1 check timeout '5'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 198.51.100.1 check type 'icmp'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 198.51.100.1 interface 'eth2'
|
||||||
|
set protocols failover route 203.0.113.1/32 next-hop 198.51.100.1 metric '20'
|
||||||
|
|
||||||
|
Show the route
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
vyos@vyos:~$ show ip route 203.0.113.1
|
||||||
|
Routing entry for 203.0.113.1/32
|
||||||
|
Known via "kernel", distance 0, metric 10, best
|
||||||
|
Last update 00:08:06 ago
|
||||||
|
* 192.0.2.1, via eth0
|
||||||
|
|
||||||
|
Routing entry for 203.0.113.1/32
|
||||||
|
Known via "kernel", distance 0, metric 20
|
||||||
|
Last update 00:08:14 ago
|
||||||
|
* 198.51.100.1, via eth2
|
||||||
@ -9,6 +9,7 @@ Protocols
|
|||||||
|
|
||||||
bfd
|
bfd
|
||||||
bgp
|
bgp
|
||||||
|
failover
|
||||||
igmp
|
igmp
|
||||||
isis
|
isis
|
||||||
mpls
|
mpls
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Copyright Notice
|
# Copyright Notice
|
||||||
|
|
||||||
Copyright (C) 2018-2022 VyOS maintainers and contributors
|
Copyright (C) 2018-2023 VyOS maintainers and contributors
|
||||||
|
|
||||||
Permission is granted to make and distribute verbatim copies of this manual
|
Permission is granted to make and distribute verbatim copies of this manual
|
||||||
provided the copyright notice and this permission notice are preserved on all
|
provided the copyright notice and this permission notice are preserved on all
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user