config router : config router ospf
 
config router ospf
Use this command to configure OSPF. FortiADC supports OSPF version 2.
OSPF (Open Shortest Path First) is described in RFC2328, OSPF Version 2. It is a link-state interior routing protocol. Compared with RIP, OSPF can provide scalable network support and faster convergence times. OSPF is widely used in large networks such as ISP backbone and enterprise networks.
Before you begin:
You must have read-write permission for system settings.
Syntax
config router ospf
set router-id <integer>
set default-metric <integer>
set distance <integer>
set default-information-originate {always|enable|disable}
set default-information-metric-type {1|2}
set default-information-metric <integer>
set redistribute-connected {enable|disable}
set redistribute-connected-metric-type {1|2}
set redistribute-connected-metric <integer>
set redistribute-static {enable|disable}
set redistribute-static-metric-type {1|2}
set redistribute-static-metric <integer>
config network
edit <No.>
set area <class_ip>
set prefix <ip&netmask>
next
end
config ospf-interface
edit <name>
set cost <integer>
set dead-interval <integer>
set hello-interval <integer>
set interface <datasource>
set mtu-ignore {enable|disable}
set network-type {broadcast | point-to-multipoint | point-to-point}
set priority <integer>
set retransmit-interval <integer>
set transmit-delay <integer>
next
end
end
router-id
32-bit number that identifies the router. The router ID uses dotted decimal notation. sets the router-ID of the OSPF process. The router-ID must be an IP address of the router, and it must be unique within the entire OSPF domain to the OSPF speaker.
default-metric
The default is 10.
distance
The default is 110.
default-information-originate
enable—Originate an AS-External (type-5) LSA describing a default route into all external routing capable areas of the specified metric and metric type.
always—The default is always advertised, even when there is no default present in the routing table.
disable
default-information-metric-type
1
2
default-information-metric
The default is -1.
redistribute-connected
Enable/disable to redistribute connected routes into OSPF, with the metric type and metric set if specified. Redistributed routes are distributed into OSPF as Type-5 External LSAs into links to areas.
redistribute-connected-metric-type
1
2
redistribute-connected-metric
Specify a metric.
redistribute-static
Enable/disable to redistribute static routes into OSPF, with the metric type and metric set if specified. Redistributed routes are distributed into OSPF as Type-5 External LSAs into links to areas.
redistribute-static-metric-type
1
2
redistribute-static-metric
Specify a metric.
config network
area
32-bit number that identifies the OSPF area. An OSPF area is a smaller part of the larger OSPF AS. Areas are used to limit the link-state updates that are sent out. The flooding used for these updates would overwhelm a large network, so it is divided into these smaller areas for manageability.
prefix
Address/mask notation to specify the subnet.
config ospf-interface
cost
Set link cost for the specified interface. The cost value is set to router-LSA's metric field and used for SPF calculation. The default is 0.
dead-interval
Number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer. This value must be the same for all routers attached to a common network. The default is 40 seconds.
hello-interval
Number of seconds between hello packets sent on the configured interface. This value must be the same for all routers attached to a common network. The default is 10 seconds.
interface
Specify the interface to enable OSPF for it.
mtu-ignore
Enable/disable to ignore the interface MTU. Disabled by default.
network-type
broadcast
point-to-point
point-to-multipoint
priority
The router with the highest priority will be more eligible to become Designated Router. Setting the value to 0 makes the router ineligible to become Designated Router. The default is 1.
retransmit-interval
Interval for retransmitting Database Description and Link State Request packets. The default is 5 seconds.
transmit-delay
Increment LSA age by this value when transmitting. The default is 1 second.
Example
FortiADC1
 
FortiADC-VM # config router ospf
FortiADC-VM (ospf) # set router-id 1.1.1.2
FortiADC-VM (ospf) # set default-metric 5
FortiADC-VM (ospf) # config network
FortiADC-VM (network) # edit 1
Add new entry '1' for node 2090
FortiADC-VM (1) # set prefix 1.1.1.1/32
FortiADC-VM (1) # set area 0.0.0.0
FortiADC-VM (1) # end
 
FortiADC-VM (ospf) # get
router-id : 1.1.1.2
default-information-originate: disable
default-information-metric: -1
default-information-metric-type: 2
default-metric : 5
distance : 110
redistribute-connected: disable
redistribute-connected-metric: -1
redistribute-connected-metric-type: 2
redistribute-static : disable
redistribute-static-metric: -1
redistribute-static-metric-type: 2
== [ 1 ]
 
FortiADC-VM (ospf) # show
config router ospf
set router-id 1.1.1.2
set default-metric 5
config network
edit 1
set prefix 1.1.1.1/32
next
end
config ospf-interface
end
end
 
FortiADC2
 
FortiADC-VM # config router ospf
FortiADC-VM (ospf) # set router-id 1.1.1.3
FortiADC-VM (ospf) # config network
FortiADC-VM (network) # edit 1
Add new entry '1' for node 2090
FortiADC-VM (1) # set prefix 1.1.1.1/32
FortiADC-VM (1) # set area 0.0.0.0
FortiADC-VM (1) # end
 
FortiADC-VM (ospf) # get
router-id : 1.1.1.2
default-information-originate: disable
default-information-metric: -1
default-information-metric-type: 2
default-metric : 10
distance : 110
redistribute-connected: disable
redistribute-connected-metric: -1
redistribute-connected-metric-type: 2
redistribute-static : disable
redistribute-static-metric: -1
redistribute-static-metric-type: 2
== [ 1 ]
 
FortiADC-VM (ospf) # show
config router ospf
set router-id 1.1.1.2
config network
edit 1
set prefix 1.1.1.1/32
next
end
config ospf-interface
end
end
See Also
get router info ospf