From 64781cbbfd6456a6b92abf6507aefb8d82e80d5f Mon Sep 17 00:00:00 2001 From: Leonid Voronkin Date: Wed, 6 Jan 2021 21:50:16 +0400 Subject: Update ospf.rst add command and their explanation --- docs/configuration/protocols/ospf.rst | 86 +++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 8 deletions(-) diff --git a/docs/configuration/protocols/ospf.rst b/docs/configuration/protocols/ospf.rst index a4188c68..77bb34b0 100644 --- a/docs/configuration/protocols/ospf.rst +++ b/docs/configuration/protocols/ospf.rst @@ -19,20 +19,90 @@ OSPF is a widely used IGP in large enterprise networks. OSPFv2 (IPv4) ############# -In order to have a VyOS system exchanging routes with OSPF neighbors, you will -at least need to configure an OSPF area and some network. +.. cfgcmd:: set protocols ospf area -.. code-block:: none + This command is udes to enable the OSPF process. The area number can be + specified in decimal notation in the range from 0 to 4294967295. Or it + can be specified in dotted decimal notation similar to ip address. - set protocols ospf area 0 network 192.168.0.0/24 +.. cfgcmd:: set protocols ospf area network A.B.C.D/M -That is the minimum configuration you will need. -It is a good practice to define the router ID too. + This command specifies the OSPF enabled interface(s). If the interface has + an address from defined range then the command enables ospf on this + interface so router can provide network information to the other ospf + routers via this interface. -.. code-block:: none +.. cfgcmd:: set protocols ospf auto-cost reference-bandwidth - set protocols ospf parameters router-id 10.1.1.1 + This command sets the reference bandwidth for cost calculations, where + bandwidth can be in range from 1 to 4294967, specified in Mbits/s. The + default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will + have a cost of 1. Cost of lower bandwidth links will be scaled with + reference to this cost). + +.. cfgcmd:: set protocols ospf default-information originate [always] [metric ] [metric-type <1|2>] [route-map ] + + Originate an AS-External (type-5) LSA describing a default route into all + external-routing capable areas, of the specified metric and metric type. + If the :cfgcmd:`always` keyword is given then the default is always advertised, + even when there is no default present in the routing table. The argument + :cfgcmd:`route-map` specifies to advertise the default route if the route map + is satisfied. + +.. cfgcmd:: set protocols ospf default-metric + + This command specifies the default metric value of redistributed routes. + The metric range is 0 to 16777214. + +.. cfgcmd:: set protocols ospf distance global + + This command change distance value of OSPF. The distance range is 1 to 255. + +.. cfgcmd:: set protocols ospf distance ospf + + This command change distance value of OSPF. The arguments are the distance + values for external routes, inter-area routes and intra-area routes + respectively. The distance range is 1 to 255. + + .. note:: Routes with a distance of 255 are effectively disabled and not + installed into the kernel. + +.. cfgcmd:: set protocols ospf parameters router-id + + This command sets the router-ID of the OSPF process. The router-ID may be an + IP address of the router, but need not be - it can be any arbitrary 32bit number. + However it MUST be unique within the entire OSPF domain to the OSPF speaker – bad + things will happen if multiple OSPF speakers are configured with the same router-ID! + +.. cfgcmd:: set protocols ospf parameters rfc1583-compatibility + + :rfc:`2328`, the successor to :rfc:`1583`, suggests according to section G.2 (changes) + in section 16.4.1 a change to the path preference algorithm that prevents possible + routing loops that were possible in the old version of OSPFv2. More specifically it + demands that inter-area paths and intra-area backbone path are now of equal preference + but still both preferred to external paths. + + This command should NOT be set normally. + +.. cfgcmd:: set protocols ospf passive-interface + + This command specifies interface as passive. Passive interface advertises its address, + but does not run the OSPF protocol (adjacencies are not formed and hello packets are + not generated). + +.. cfgcmd:: set protocols ospf passive-interface default + + This command specifies all interfaces as passive by default. Because this command changes + the configuration logic to a default passive; therefore, interfaces where router adjacencies + are expected need to be configured with the :cfgcmd:`passive-interface-exclude` command. + +.. cfgcmd:: set protocols ospf passive-interface-exclude + + This command allows exclude interface from passive state. This command is used if the + command :cfgcmd:`passive-interface default` was configured. +Configuration example +--------------------- Below you can see a typical configuration using 2 nodes, redistribute loopback address and the node 1 sending the default route: -- cgit v1.2.3 From bf5a8171be5d5a3985d7f7a134af7f086bc90b29 Mon Sep 17 00:00:00 2001 From: Leonid Voronkin Date: Thu, 7 Jan 2021 15:08:11 +0400 Subject: Update ospf.rst --- docs/configuration/protocols/ospf.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration/protocols/ospf.rst b/docs/configuration/protocols/ospf.rst index 77bb34b0..acb1bce8 100644 --- a/docs/configuration/protocols/ospf.rst +++ b/docs/configuration/protocols/ospf.rst @@ -25,10 +25,10 @@ OSPFv2 (IPv4) specified in decimal notation in the range from 0 to 4294967295. Or it can be specified in dotted decimal notation similar to ip address. -.. cfgcmd:: set protocols ospf area network A.B.C.D/M +.. cfgcmd:: set protocols ospf area network This command specifies the OSPF enabled interface(s). If the interface has - an address from defined range then the command enables ospf on this + an address from defined range then the command enables OSPF on this interface so router can provide network information to the other ospf routers via this interface. -- cgit v1.2.3