policy: fix lint errors

This commit is contained in:
rebortg 2020-12-11 22:43:35 +01:00
parent 8a43e769a0
commit 95f1bc6724
2 changed files with 18 additions and 14 deletions

View File

@ -10,8 +10,10 @@ routes and their attributes needs to be put into the routing table.
There could be a wide range of routing policies. Some examples are below: There could be a wide range of routing policies. Some examples are below:
* Set some metric to routes learned from a particular neighbor * Set some metric to routes learned from a particular neighbor
* Set some attributes (like AS PATH or Community value) to advertised routes to neighbors * Set some attributes (like AS PATH or Community value) to advertised routes
* Prefer a specific routing protocol routes over another routing protocol running on the same router to neighbors
* Prefer a specific routing protocol routes over another routing protocol
running on the same router
Example Example
======= =======
@ -65,8 +67,6 @@ neighbor.
You now see the longer AS path. You now see the longer AS path.
.. include:: /_include/need_improvement.txt
.. _routing-pbr: .. _routing-pbr:
### ###
@ -136,7 +136,7 @@ Add default routes for routing ``table 10`` and ``table 11``
.. code-block:: none .. code-block:: none
set protocols static table 10 route 0.0.0.0/0 next-hop 192.0.1.1 set protocols static table 10 route 0.0.0.0/0 next-hop 192.0.2.1
set protocols static table 11 route 0.0.0.0/0 next-hop 192.0.2.2 set protocols static table 11 route 0.0.0.0/0 next-hop 192.0.2.2
Add policy route matching VLAN source addresses Add policy route matching VLAN source addresses
@ -175,11 +175,13 @@ each other using the main routing table.
Local route Local route
=========== ===========
The following example allows VyOS to use :abbr:`PBR (Policy-Based Routing)` for traffic, which originated from the router itself. The following example allows VyOS to use :abbr:`PBR (Policy-Based Routing)`
That solution for multiple ISP's and VyOS router will respond from the same interface that the packet was received. for traffic, which originated from the router itself. That solution for multiple
Also, it used, if we want that one VPN tunnel to be through one provider, and the second through another. ISP's and VyOS router will respond from the same interface that the packet was
received. Also, it used, if we want that one VPN tunnel to be through one
provider, and the second through another.
* ``192.168.1.254`` IP addreess on VyOS eth1 from ISP1 * ``203.0.113.0.254`` IP addreess on VyOS eth1 from ISP1
* ``192.168.2.254`` IP addreess on VyOS eth2 from ISP2 * ``192.168.2.254`` IP addreess on VyOS eth2 from ISP2
* ``table 10`` Routing table used for ISP1 * ``table 10`` Routing table used for ISP1
* ``table 11`` Routing table used for ISP2 * ``table 11`` Routing table used for ISP2
@ -188,10 +190,10 @@ Also, it used, if we want that one VPN tunnel to be through one provider, and th
.. code-block:: none .. code-block:: none
set policy local-route rule 101 set table '10' set policy local-route rule 101 set table '10'
set policy local-route rule 101 source '192.0.1.254' set policy local-route rule 101 source '203.0.113.0.254'
set policy local-route rule 102 set table '11' set policy local-route rule 102 set table '11'
set policy local-route rule 102 source '192.0.2.254' set policy local-route rule 102 source '192.0.2.254'
set protocols static table 10 route '0.0.0.0/0' next-hop '192.0.1.1' set protocols static table 10 route '0.0.0.0/0' next-hop '203.0.113.0.1'
set protocols static table 11 route '0.0.0.0/0' next-hop '192.0.2.2' set protocols static table 11 route '0.0.0.0/0' next-hop '192.0.2.2'
Add multiple source IP in one rule with same priority Add multiple source IP in one rule with same priority
@ -199,7 +201,7 @@ Add multiple source IP in one rule with same priority
.. code-block:: none .. code-block:: none
set policy local-route rule 101 set table '10' set policy local-route rule 101 set table '10'
set policy local-route rule 101 source '192.0.1.254' set policy local-route rule 101 source '203.0.113.0.254'
set policy local-route rule 101 source '192.0.1.253' set policy local-route rule 101 source '203.0.113.0.253'
set policy local-route rule 101 source '203.0.113.0/24' set policy local-route rule 101 source '198.51.100.0/24'

View File

@ -1218,9 +1218,11 @@ That is how it is possible to do the so-called "ingress shaping".
.. stop_vyoslinter .. stop_vyoslinter
.. _that can give you a great deal of flexibility: https://blog.vyos.io/using-the-policy-route-and-packet-marking-for-custom-qos-matches .. _that can give you a great deal of flexibility: https://blog.vyos.io/using-the-policy-route-and-packet-marking-for-custom-qos-matches
.. _tc: https://en.wikipedia.org/wiki/Tc_(Linux) .. _tc: https://en.wikipedia.org/wiki/Tc_(Linux)
.. _tocken bucket: https://en.wikipedia.org/wiki/Token_bucket .. _tocken bucket: https://en.wikipedia.org/wiki/Token_bucket
.. _HFSC: https://en.wikipedia.org/wiki/Hierarchical_fair-service_curve .. _HFSC: https://en.wikipedia.org/wiki/Hierarchical_fair-service_curve
.. _Intermediate Functional Block: https://www.linuxfoundation.org/collaborate/workgroups/networking/ifb .. _Intermediate Functional Block: https://www.linuxfoundation.org/collaborate/workgroups/networking/ifb
.. start_vyoslinter .. start_vyoslinter