Fortinet Document Library

Version:

Version:


Table of Contents

Admin Guide (Standalone)

Download PDF
Copy Link

Configure OSPF redistribution

The current release allows both connected routes and static routes redistributed into the OSPF Domain.

The following are the summary steps for configuring OSPF redistribution:

  1. Configuring prefix-list
  2. Configuring route-map
  3. Configuring redistribute

Step 1: Configuring redistribute

CLI Command Description

config prefix-list

edit <prefix-name>

config rule edit <id>

set action [permit | deny]

set prefix <X.X.X.X/Y>

set ge 0

set le 0

next

Configure the prefix-list which defines the prefix (IP address and netmask) for the filter of redistribution.

  • prefix-name— for either static routes or connected routes

  • id—rule-id (1-65535)

  • action—permit/deny. Permit if it matches prefix network; deny if it does not match the exact prefix network.

  • le—(less than or equal to). The le parameter can be included to match all more-specific prefixes within a parent prefix up to a certain length. For example, 10.0.0.0/24 le 30 will match 10.0.0.0/24 and all prefixes contained within a length of 30 or less.

  • ge— (greater than or equal to) The length specified should be longer than the length of the initial prefix.

Example configuration:

ForitExtender# config router

config prefix-list

edit local-nets

config rule

edit 10

set action permit

set prefix 192.168.201.0/24 set ge 0

set le 0

next

end

next

edit static-routes

config rule

edit 10

set action deny

set prefix 192.168.203.0/24 set ge 0

set le 0

next

edit 20

set action permit

set prefix 192.168.202.0/24 set ge 0

set le 0 next

end

Step 2: Configuring route-map

CLI Command Description

config route-map

edit <route-map name>

config rule

edit <id>

set action [permit | deny]

set match-ip-address <prefix-list>

Configure route-map which defines the redistributed routes.

  • route-map name—defines the route-map name

  • rule—routing rule

  • id—rule-id (1—65535)

  • action— permit/deny. If set to permit, the system redistributes the permitted prefix-list; if set to deny, the system does not redistribute the permitted prefix-list.

  • match-ip-address—Configure the prefix-list and identifies the prefix list defined in the prefix-list section.

    Note: Route-maps are numbered with edit IDs, which are sequential numbers such as 10, 20, etc. We recommend starting with Number 10 to reserve numbering space in case you need to insert new matched/denied condition in the future.

Example configuration:

ForitExtender# config router

config route-map

edit redist-local-connected

config rule

edit 10

set action permit

set match-ip-address local-nets

end

edit redist-static

config rule

edit 10

set action permit

set match-ip-address static-routes

Step 3: Configuring redistribution

CLI Command Description

config router ospf

config redistribute

config [connected | static]

set status [enable | disable]

set metric-type [1 | 2]

set metric <value>

set route-map <route-map name>

Configure router OSPF redistribute.

  • status—enable/disable redistributing routes.

  • metric-type—specify the external link type to be used for the redistributed routes. The options are E1 and E2 (default).

  • metric value—used for the redistributed routes. The value range is from 1 to 16777214. The default is 10.

  • routemap—defined and configured on the route-map, see Configure route-map for details.

Example configuration:

ForitExtender# config router ospf

config redistribute

config connected

set status enable

set metric-type 2

set metric 10

set routemap redist-local-connected

end

config static

set status enable

set metric-type 2

set metric 10

set routemap redist-static

Configure OSPF redistribution

The current release allows both connected routes and static routes redistributed into the OSPF Domain.

The following are the summary steps for configuring OSPF redistribution:

  1. Configuring prefix-list
  2. Configuring route-map
  3. Configuring redistribute

Step 1: Configuring redistribute

CLI Command Description

config prefix-list

edit <prefix-name>

config rule edit <id>

set action [permit | deny]

set prefix <X.X.X.X/Y>

set ge 0

set le 0

next

Configure the prefix-list which defines the prefix (IP address and netmask) for the filter of redistribution.

  • prefix-name— for either static routes or connected routes

  • id—rule-id (1-65535)

  • action—permit/deny. Permit if it matches prefix network; deny if it does not match the exact prefix network.

  • le—(less than or equal to). The le parameter can be included to match all more-specific prefixes within a parent prefix up to a certain length. For example, 10.0.0.0/24 le 30 will match 10.0.0.0/24 and all prefixes contained within a length of 30 or less.

  • ge— (greater than or equal to) The length specified should be longer than the length of the initial prefix.

Example configuration:

ForitExtender# config router

config prefix-list

edit local-nets

config rule

edit 10

set action permit

set prefix 192.168.201.0/24 set ge 0

set le 0

next

end

next

edit static-routes

config rule

edit 10

set action deny

set prefix 192.168.203.0/24 set ge 0

set le 0

next

edit 20

set action permit

set prefix 192.168.202.0/24 set ge 0

set le 0 next

end

Step 2: Configuring route-map

CLI Command Description

config route-map

edit <route-map name>

config rule

edit <id>

set action [permit | deny]

set match-ip-address <prefix-list>

Configure route-map which defines the redistributed routes.

  • route-map name—defines the route-map name

  • rule—routing rule

  • id—rule-id (1—65535)

  • action— permit/deny. If set to permit, the system redistributes the permitted prefix-list; if set to deny, the system does not redistribute the permitted prefix-list.

  • match-ip-address—Configure the prefix-list and identifies the prefix list defined in the prefix-list section.

    Note: Route-maps are numbered with edit IDs, which are sequential numbers such as 10, 20, etc. We recommend starting with Number 10 to reserve numbering space in case you need to insert new matched/denied condition in the future.

Example configuration:

ForitExtender# config router

config route-map

edit redist-local-connected

config rule

edit 10

set action permit

set match-ip-address local-nets

end

edit redist-static

config rule

edit 10

set action permit

set match-ip-address static-routes

Step 3: Configuring redistribution

CLI Command Description

config router ospf

config redistribute

config [connected | static]

set status [enable | disable]

set metric-type [1 | 2]

set metric <value>

set route-map <route-map name>

Configure router OSPF redistribute.

  • status—enable/disable redistributing routes.

  • metric-type—specify the external link type to be used for the redistributed routes. The options are E1 and E2 (default).

  • metric value—used for the redistributed routes. The value range is from 1 to 16777214. The default is 10.

  • routemap—defined and configured on the route-map, see Configure route-map for details.

Example configuration:

ForitExtender# config router ospf

config redistribute

config connected

set status enable

set metric-type 2

set metric 10

set routemap redist-local-connected

end

config static

set status enable

set metric-type 2

set metric 10

set routemap redist-static