Fortinet white logo
Fortinet white logo

Admin Guide (Standalone)

Complete OSPF configuration code example

Complete OSPF configuration code example

FortiExtender#config router prefix-list

edit static-routes

config rule

edit 20

set action permit

set prefix 2.2.2.0/24

set ge 0

set le 0

next

edit 10

set action permit

set prefix 1.1.1.0/24

set ge 0

set le 0

next

end

next

edit local-nets

config rule

edit 10

set action permit set prefix 192.168.0.0/24

set ge 0

set le 0

next

end

next

end

FortiExtender#config router route-map

edit redist-local-connected

config rule

edit 10

set action permit

set match-ip-address local-nets

next

edit 20

set action deny

set match-ip-address

next

end

next

edit redist-static

config rule

edit 20

set action deny

set match-ip-address

next

edit 10

set action permit

set match-ip-address static-routes

next

end

FortiExtender#config router ospf

set status enable

set router-id 169.254.254.127

config area

edit 0.0.0.0

next

end

config network

edit 1

set prefix 169.254.254.0/24

set area 0.0.0.0 next

edit 2

set prefix 169.254.254.127/32

set area 0.0.0.0

next

end

config ospf-interface

edit 1

set status enable

set interface vti1

set mtu-ignore enable

set cost 5

next

end

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

end

end

end

Complete OSPF configuration code example

Complete OSPF configuration code example

FortiExtender#config router prefix-list

edit static-routes

config rule

edit 20

set action permit

set prefix 2.2.2.0/24

set ge 0

set le 0

next

edit 10

set action permit

set prefix 1.1.1.0/24

set ge 0

set le 0

next

end

next

edit local-nets

config rule

edit 10

set action permit set prefix 192.168.0.0/24

set ge 0

set le 0

next

end

next

end

FortiExtender#config router route-map

edit redist-local-connected

config rule

edit 10

set action permit

set match-ip-address local-nets

next

edit 20

set action deny

set match-ip-address

next

end

next

edit redist-static

config rule

edit 20

set action deny

set match-ip-address

next

edit 10

set action permit

set match-ip-address static-routes

next

end

FortiExtender#config router ospf

set status enable

set router-id 169.254.254.127

config area

edit 0.0.0.0

next

end

config network

edit 1

set prefix 169.254.254.0/24

set area 0.0.0.0 next

edit 2

set prefix 169.254.254.127/32

set area 0.0.0.0

next

end

config ospf-interface

edit 1

set status enable

set interface vti1

set mtu-ignore enable

set cost 5

next

end

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

end

end

end