summaryrefslogtreecommitdiff
path: root/docs/routing/ospf.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/routing/ospf.rst')
-rw-r--r--docs/routing/ospf.rst65
1 files changed, 65 insertions, 0 deletions
diff --git a/docs/routing/ospf.rst b/docs/routing/ospf.rst
new file mode 100644
index 00000000..1a55dc16
--- /dev/null
+++ b/docs/routing/ospf.rst
@@ -0,0 +1,65 @@
+.. _routing-ospf:
+
+OSPF
+----
+
+IPv4
+^^^^
+
+A typical configuration using 2 nodes, redistribute loopback address and the
+node 1 sending the default route:
+
+**Node 1:**
+
+.. code-block:: sh
+
+ set interfaces loopback lo address 10.1.1.1/32
+ set protocols ospf area 0 network 192.168.0.0/24
+ set protocols ospf default-information originate always
+ set protocols ospf default-information originate metric 10
+ set protocols ospf default-information originate metric-type 2
+ set protocols ospf log-adjacency-changes
+ set protocols ospf parameters router-id 10.1.1.1
+ set protocols ospf redistribute connected metric-type 2
+ set protocols ospf redistribute connected route-map CONNECT
+
+ set policy route-map CONNECT rule 10 action permit
+ set policy route-map CONNECT rule 10 match interface lo
+
+**Node 2:**
+
+.. code-block:: sh
+
+ set interfaces loopback lo address 10.2.2.2/32
+ set protocols ospf area 0 network 192.168.0.0/24
+ set protocols ospf log-adjacency-changes
+ set protocols ospf parameters router-id 10.2.2.2
+ set protocols ospf redistribute connected metric-type 2
+ set protocols ospf redistribute connected route-map CONNECT
+
+ set policy route-map CONNECT rule 10 action permit
+ set policy route-map CONNECT rule 10 match interface lo
+
+IPv6
+^^^^
+
+A typical configuration using 2 nodes.
+
+**Node 1:**
+
+.. code-block:: sh
+
+ set protocols ospfv3 area 0.0.0.0 interface eth1
+ set protocols ospfv3 area 0.0.0.0 range 2001:db8:1::/64
+ set protocols ospfv3 parameters router-id 192.168.1.1
+ set protocols ospfv3 redistribute connected
+
+**Node 2:**
+
+.. code-block:: sh
+
+ set protocols ospfv3 area 0.0.0.0 interface eth1
+ set protocols ospfv3 area 0.0.0.0 range 2001:db8:2::/64
+ set protocols ospfv3 parameters router-id 192.168.2.1
+ set protocols ospfv3 redistribute connected
+