Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

Run the command set protocols ospf redistribute metric-type to specify metric type for OSPF route redistribution from other sources. There are two types of external routes, type 1 and type 2. A type 1 route has a metric that is the sum of the internal OSPF cost and the external redistributed cost. A type 2 route has a metric equal only to the redistributed cost. Optional parameter instance-id can be included to specify the OSPFv2 multi-instance ID. Optional VRF can be specified for the single instance OSPF to configure the metric type.

Multiple instances of OSPF are only allowed in the default VRF. A maximum of 8 instance can be configured in the default VRF. In non-default VRFs, only single instance OSPF can be configured.

Run the command delete protocols ospf redistribute metric-type to delete this configuration.

Command Syntax

set protocol ospf [instance-id <instance-id> vrf <vrf-name>] redistribute {bgp|connected|kernel|static|table <table-id>} metric-type <1|2>

delete protocol ospf [instance-id <instance-id> | vrf <vrf-name>] redistribute {bgp|connected|kernel|static|table|table <table-id>} metric-type <1|2>




instance-id <instance-id>Optional, specifies the OSPF instance ID. The value is an integer that ranges from 1 to 8.

vrf <vrf-name>

Optional. Specifies the name of the VRF for the OSPF instance.

protocol bgpSpecify BGP routes for redistribution into OSPF.
connectedSpecifies the directly connected routes for redistribution.
kernelSpecifies the kernel routes for redistribution.
staticSpecifies the static routes for redistribution.
table <table-id>Specify a table for route redistribution. The value is an integer that ranges from 0 to 65535.
metric-type<1|2>Specifies the OSPF external routes metric type. Metric type identifies how metric for the route is calculated.


  •  Configure OSPF to redistribute BGP routes into OSPF with metric type 2.
admin@XorPlus# set protocols ospf instance-id 1 redistribute bgp metric-type 2
admin@Xorplus# commit
  • No labels