summaryrefslogtreecommitdiff
path: root/docs/configexamples/ospf-unnumbered.rst
blob: 39f8f69aa8235a87a8732daf74dd268edebba731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.. _examples-ospf-unnumbered:

#########################
OSPF unnumbered with ECMP
#########################

General infomration can be found in the :ref:`routing-ospf` chapter.

Configuration
=============

- Router A:

.. code-block:: none

  set interfaces ethernet eth0 address '10.0.0.1/24'
  set interfaces ethernet eth1 address '192.168.0.1/32'
  set interfaces ethernet eth1 ip ospf authentication md5 key-id 1 md5-key 'yourpassword'
  set interfaces ethernet eth1 ip ospf network 'point-to-point'
  set interfaces ethernet eth2 address '192.168.0.1/32'
  set interfaces ethernet eth2 ip ospf authentication md5 key-id 1 md5-key 'yourpassword'
  set interfaces ethernet eth2 ip ospf network 'point-to-point'
  set interfaces loopback lo address '192.168.0.1/32'
  set protocols ospf area 0.0.0.0 authentication 'md5'
  set protocols ospf area 0.0.0.0 network '192.168.0.1/32'
  set protocols ospf parameters router-id '192.168.0.1'
  set protocols ospf redistribute connected

- Router B:

.. code-block:: none

  set interfaces ethernet eth0 address '10.0.0.2/24'
  set interfaces ethernet eth1 address '192.168.0.2/32'
  set interfaces ethernet eth1 ip ospf authentication md5 key-id 1 md5-key 'yourpassword'
  set interfaces ethernet eth1 ip ospf network 'point-to-point'
  set interfaces ethernet eth2 address '192.168.0.2/32'
  set interfaces ethernet eth2 ip ospf authentication md5 key-id 1 md5-key 'yourpassword'
  set interfaces ethernet eth2 ip ospf network 'point-to-point'
  set interfaces loopback lo address '192.168.0.2/32'
  set protocols ospf area 0.0.0.0 authentication 'md5'
  set protocols ospf area 0.0.0.0 network '192.168.0.2/32'
  set protocols ospf parameters router-id '192.168.0.2'
  set protocols ospf redistribute connected


Results
=======

- Router A:

.. code-block:: none

  vyos@vyos:~$ show interfaces
  Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
  Interface        IP Address                        S/L  Description
  ---------        ----------                        ---  -----------
  eth0             10.0.0.1/24                       u/u
  eth1             192.168.0.1/32                    u/u
  eth2             192.168.0.1/32                    u/u
  lo               127.0.0.1/8                       u/u
                   192.168.0.1/32
                   ::1/128

.. code-block:: none

  vyos@vyos:~$ show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP,
         O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
         T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
         F - PBR, f - OpenFabric,
         > - selected route, * - FIB route, q - queued route, r - rejected route

  S>* 0.0.0.0/0 [210/0] via 10.0.0.254, eth0, 00:57:34
  O   10.0.0.0/24 [110/20] via 192.168.0.2, eth1 onlink, 00:13:21
                              via 192.168.0.2, eth2 onlink, 00:13:21
  C>* 10.0.0.0/24 is directly connected, eth0, 00:57:35
  O   192.168.0.1/32 [110/0] is directly connected, lo, 00:48:53
  C * 192.168.0.1/32 is directly connected, eth2, 00:56:31
  C * 192.168.0.1/32 is directly connected, eth1, 00:56:31
  C>* 192.168.0.1/32 is directly connected, lo, 00:57:36
  O>* 192.168.0.2/32 [110/1] via 192.168.0.2, eth1 onlink, 00:29:03
    *                        via 192.168.0.2, eth2 onlink, 00:29:03

- Router B:

.. code-block:: none

  vyos@vyos:~$ show interfaces
  Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
  Interface        IP Address                        S/L  Description
  ---------        ----------                        ---  -----------
  eth0             10.0.0.2/24                       u/u
  eth1             192.168.0.2/32                    u/u
  eth2             192.168.0.2/32                    u/u
  lo               127.0.0.1/8                       u/u
                   192.168.0.2/32
                   ::1/128

.. code-block:: none

  vyos@vyos:~$ show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP,
         O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
         T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
         F - PBR, f - OpenFabric,
         > - selected route, * - FIB route, q - queued route, r - rejected route

  S>* 0.0.0.0/0 [210/0] via 10.0.0.254, eth0, 00:57:34
  O   10.0.0.0/24 [110/20] via 192.168.0.1, eth1 onlink, 00:13:21
                              via 192.168.0.1, eth2 onlink, 00:13:21
  C>* 10.0.0.0/24 is directly connected, eth0, 00:57:35
  O   192.168.0.2/32 [110/0] is directly connected, lo, 00:48:53
  C * 192.168.0.2/32 is directly connected, eth2, 00:56:31
  C * 192.168.0.2/32 is directly connected, eth1, 00:56:31
  C>* 192.168.0.2/32 is directly connected, lo, 00:57:36
  O>* 192.168.0.1/32 [110/1] via 192.168.0.1, eth1 onlink, 00:29:03
    *                        via 192.168.0.1, eth2 onlink, 00:29:03