diff options
Diffstat (limited to 'docs/configuration/protocols/ospf.rst')
-rw-r--r-- | docs/configuration/protocols/ospf.rst | 86 |
1 files changed, 78 insertions, 8 deletions
diff --git a/docs/configuration/protocols/ospf.rst b/docs/configuration/protocols/ospf.rst index a4188c68..acb1bce8 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 <number> -.. 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 <number> 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 <number> - 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 <number>] [metric-type <1|2>] [route-map <name>] + + 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 <number> + + This command specifies the default metric value of redistributed routes. + The metric range is 0 to 16777214. + +.. cfgcmd:: set protocols ospf distance global <distance> + + This command change distance value of OSPF. The distance range is 1 to 255. + +.. cfgcmd:: set protocols ospf distance ospf <external|inter-area|intra-area> <distance> + + 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 <rid> + + 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 <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 <interface> + + 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: |