home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Basic OSPF configuration

In this section, you configure OSPF on the routers that are labeled R1, R2, and R3 in the OSPF configuration diagram. The routers advertise their routes on the 10.0.40/24 and 10.0.50.0/24 networks.

For this example, it is assumed that you have already configured the router interfaces, including the loopback interfaces (lo); only the steps that are required to implement OSPF are shown.

Note: Setting the router-id, loopback interface, and redistribution of router area are not mandatory requirements for basic OSPF configuration.

To create a basic OSPF configuration, perform the following steps in configuration mode.

Table 1. Configuring OSPF

Router

Step

Command

R1

Set the identifier of the OSPF router to that of the loopback address.

vyatta@R1# set protocols ospf process 3 parameters router-id 10.0.0.1

R1

Run OSPF on the 10.0.40.0/24 network.

vyatta@R1# set protocols ospf process 3 area 0 network 10.0.40.0/24

R1

Redistribute the networks connected to OSPF.

vyatta@R2#?start-selection s ospf process 3 redistribute connected

R1

Commit the configuration.

vyatta@R1# commit

R1

Display the configuration.

vyatta@R1# show protocols
 ospf {
         process 3 {
                 area 0 {
                         network 10.0.40.0/24
                 }
                 parameters {
                         router-id 10.0.0.1
                 }
                 redistribute {
                         connected
                 }
         }
 }

R2

Set the identifier of the OSPF router to that of the loopback address.

vyatta@R2# set protocols ospf parameters router-id 10.0.0.2

R2

Run OSPF on the 10.0.40.0/24 network.

vyatta@R2# set protocols ospf process 4 area 0 network 10.0.40.0/24

R2

Run OSPF on the 10.0.0.2/32 network.

vyatta@R2# set protocols ospf process 4 area 0 network 10.0.0.2/32

R2

Redistribute the networks connected to OSPF.

vyatta@R2# set protocols ospf process 4 redistribute connected

R2

Redistribute connected routes from OSPF process 5 to OSPF process 4.

vyatta@R2# set protocols ospf process 4 redistribute ospf process-id 5

R2

Run OSPF on the 10.0.50.0/24 network.

vyatta@R2# set protocols ospf process 5 area 0 network 10.0.50.0/24

R2

Redistribute the networks connected to OSPF.

vyatta@R2# set protocols ospf process 5 redistribute connected
R2

Redistribute connected routes from OSPF process 4 to OSPF process 5.

vyatta@R2# set protocols ospf process 5 redistribute ospf process-id 4

R2

Commit the configuration.

vyatta@R2# commit

R2

Display the configuration.

vyatta@R2# show protocols
 ospf {
        parameters {
                router-id 10.0.0.2
        }
        process 4 {
                area 0 {
                        network 10.0.40.0/24
                        network 10.0.0.2/32
                }
                redistribute {
                        connected
                        ospf {
                                process-id 5
                        }
                }
        }
        process 5 {
                area 0 {
                        network 10.0.50.0/24
                }
                redistribute {
                        connected
                        ospf {
                                process-id 4
                        }
                }
        }
 }

R3

Set the identifier of the OSPF router to that of the loopback address.

vyatta@R3# set protocols ospf parameters router-id 10.0.0.3

R3

Run OSPF on the 10.0.50.0/24 network.

vyatta@R3# set protocols ospf area 0 network 10.0.50.0/24

R3

Redistribute the networks connected to OSPF.

vyatta@R3# set protocols ospf redistribute connected

R3

Commit the configuration.

vyatta@R3# commit

R3

Display the configuration.

vyatta@R3# show protocols
 ospf {
           area 0 {
                   network 10.0.50.0/24
           }
           parameters {
                   router-id 10.0.0.3
           }
           redistribute {
                   connected
           }
}