config router ospf
Use this command to configure OSPF. FortiADC supports OSPF version 2. OSPF (Open Shortest Path First) is described in RFC2328.
OSPF 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 router 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 area
edit <class_ip>
set authentication {md5|none|text}
set type {regular|stub}
set stub-type {summary|no-summary}
next
end
config network
edit <No.>
set area <datasource>
set prefix <ip&netmask>
next
end
config ospf-interface
edit <name>
set authentication {md5|none|text}
set authentication-md5 <datasource>
set authentication <text>
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 |
|
default-information-metric-type |
|
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 |
|
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 |
|
redistribute-static-metric |
Specify a metric. |
config area | |
<class_id> |
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. |
authentication
|
Specify an authentication type:
|
type |
Area type setting:
|
stub-type |
If using stub area, select a stub summary setting:
|
config network |
|
area |
Specify an area configuration name. |
prefix |
Address/mask notation to specify the subnet. |
config ospf-interface |
|
authentication
|
Specify an authentication type. All OSPF interfaces that want to learn routes from each other must be configured with the same authentication type and password or MD5 key (one match is enough). Options are:
|
authentication-md5
|
Specify an MD5 configuration name. |
authentication-text
|
Specify a password string. Passwords are limited to 8 characters. |
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 |
|
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