diff options
author | runborg <runar@13xl.com> | 2019-06-27 21:34:16 +0200 |
---|---|---|
committer | Kim <kim.sidney@gmail.com> | 2019-06-27 21:34:16 +0200 |
commit | 1a2bd0acd0671b0df55e889dc38a6a2543744402 (patch) | |
tree | ee6f404c2ef71040764986e9b12042d07ab38653 /docs/routing/routing-policy.rst | |
parent | 4c63a9d11d05b8ca6998de971d97182bc81f5ff0 (diff) | |
download | vyos-documentation-1a2bd0acd0671b0df55e889dc38a6a2543744402.tar.gz vyos-documentation-1a2bd0acd0671b0df55e889dc38a6a2543744402.zip |
T1457: migrate Config archive, routing-policy example and two hardware devices (#70)
* T1457: Migrate Qotom Q355G4 into Running on Bare Metal
* T1457: Added Configuration archive to configuration overview
* T1457: Added routing-policy example to routing, from the wiki
* T1457: Added Partaker i5 and Acrosser to Running on bare metal
Diffstat (limited to 'docs/routing/routing-policy.rst')
-rw-r--r-- | docs/routing/routing-policy.rst | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/routing/routing-policy.rst b/docs/routing/routing-policy.rst new file mode 100644 index 00000000..253dd980 --- /dev/null +++ b/docs/routing/routing-policy.rst @@ -0,0 +1,59 @@ + +Routing-policy +-------------- + +Routing Policies could be used to tell the router (self or neighbors) what 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: + + * Set some metric to routes learned from a particular neighbor + * Set some attributes (like AS PATH or Community value) to advertised routes to neighbors + * Prefer a specific routing protocol routes over another routing protocol running on the same router + +Routing Policy Example +~~~~~~~~~~~~~~~~~~~~~~ + +**Policy definition:** + +.. code-block:: sh + + #Create policy + set policy route-map setmet rule 2 action 'permit' + set policy route-map setmet rule 2 set as-path-prepend '2 2 2' + + #Apply policy to BGP + set protocols bgp 1 neighbor 1.1.1.2 route-map import 'setmet' + set protocols bgp 1 neighbor 1.1.1.2 soft-reconfiguration 'inbound' <<<< *** + + *** get policy update without bouncing the neighbor + +**Routes learned before routing policy applied:** + +.. code-block:: sh + + vyos@vos1:~$ show ip bgp + BGP table version is 0, local router ID is 192.168.56.101 + Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, + r RIB-failure, S Stale, R Removed + Origin codes: i - IGP, e - EGP, ? - incomplete + + Network Next Hop Metric LocPrf Weight Path + *> 22.22.22.22/32 1.1.1.2 1 0 2 i < Path + + Total number of prefixes 1 + +**Routes learned after routing policy applied:** + +.. code-block:: sh + + vyos@vos1:~$ sho ip b + BGP table version is 0, local router ID is 192.168.56.101 + Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, + r RIB-failure, S Stale, R Removed + Origin codes: i - IGP, e - EGP, ? - incomplete + + Network Next Hop Metric LocPrf Weight Path + *> 22.22.22.22/32 1.1.1.2 1 0 2 2 2 2 i < longer AS_path length + + Total number of prefixes 1 + vyos@vos1:~$ |