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.

OSPFv2 range cost detailed configuration example

An example that shows how to [something].

In this example, an area border router (ABR) has:

  • interface dp0p1s1 in area 0
  • interfaces dp0p1s2.100, dp0p1s2.101, and dp0p1s2.102 in area 1

This ABR summarizes the range 10.64.0.0/10 from area 1 into area 0. It has this configuration:

set interfaces dataplane dp0p1s1 address '10.10.3.3/24'
set interfaces dataplane dp0p1s2 vif 100 address '10.100.4.3/24'
set interfaces dataplane dp0p1s2 vif 100 ip ospf cost '10'
set interfaces dataplane dp0p1s2 vif 101 address '10.101.4.3/24'
set interfaces dataplane dp0p1s2 vif 101 ip ospf cost '11'
set interfaces dataplane dp0p1s2 vif 102 address '10.102.4.3/24'
set interfaces dataplane dp0p1s2 vif 102 ip ospf cost '12'
set interfaces loopback lo address '3.3.3.3/32'
set protocols ospf area 0 network '10.10.3.0/24'
set protocols ospf area 1 network '10.100.4.0/24'
set protocols ospf area 1 network '10.101.4.0/24'
set protocols ospf area 1 network '10.102.4.0/24'
set protocols ospf area 1 range '10.64.0.0/10'

No explicitly configured metric exists for the range, so the ABR advertises the maximum cost to reach all prefixes that match the range. This cost will be at least 12 and possibly more if the ABR learns of a matching prefix from one of its area 1 peers.


  1. user@system# show ip ospf database summary self-originate
             OSPF Router with ID (3.3.3.3) (Process ID 0 routing-instance default)
    
                    Summary Link States (Area 0.0.0.0)
    
      LS age: 685
      Options: 0x22 (-|-|DC|-|-|-|E|-)
      LS Type: Summary-LSA
      Link State ID: 10.64.0.0 (summary Network Number)
      Advertising Router: 3.3.3.3
      LS Seq Number: 80000001
      Checksum: 0x25f4
      Length: 28
      Network Mask: /10
            TOS: 0  Metric: 12
  2. Set the range through explicit configuration.
    user@system# set protocols ospf area 1 range 10.64.0.0/10 metric 20

  3. user@system# show ip ospf database summary self-originate
    		OSPF Router with ID (3.3.3.3) (Process ID 0 routing-instance default)
    
    			Summary Link States (Area 0.0.0.0)
    
      LS age: 26
      Options: 0x22 (-|-|DC|-|-|-|E|-)
      LS Type: Summary-LSA
      Link State ID: 10.64.0.0 (summary Network Number)
      Advertising Router: 3.3.3.3
      LS Seq Number: 80000002
      Checksum: 0x739d
      Length: 28
      Network Mask: /10
            TOS: 0  Metric: 20