This section provides information to configure OSPF and OSPF3 as well as configuration examples of common configuration tasks.
•
|
A router ID - If a router-id is not configured in the config>router context, the router’s system interface IP address is used.
|
ALA-A>config>router>ospf# info
----------------------------------------------
area 0.0.0.0
interface "system"
exit
exit
area 0.0.0.20
nssa
exit
interface "to-104"
priority 10
exit
exit
area 0.0.1.1
exit
----------------------------------------------
ALA-A>config>router>ospf#
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
area 0.0.0.0
interface "system"
exit
exit
area 0.0.0.20
nssa
exit
interface "SR1-2"
exit
exit
area 0.0.0.25
stub
default-metric 5000
exit
exit
A:ALA-B>config>router# info
#------------------------------------------
# IP Configuration
#------------------------------------------
interface "system"
address 10.10.10.104/32
exit
interface "to-103"
address 10.0.0.104/24
port 1/1/1
exit
autonomous-system 100
router-id 10.10.10.104
...
#------------------------------------------
A:ALA-B>config>router#
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
----------------------------------------------
A:ALA-49>config>router>ospf# ex
export policy-name [policy-name...(upto 5 max)]
spf-wait max-spf-wait [spf-initial-wait [spf-second-wait]]
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
----------------------------------------------
A:ALA-48>config>router>ospf3#
CLI Syntax: ospf ospf-instance
ospf3
area area-id
area-range ip-prefix/mask [advertise|not
-advertise]
A:ALA-A>config>router>ospf# info
----------------------------------------------
area 0.0.0.0
exit
area 0.0.0.20
exit
----------------------------------------------
ALA-A>config>router>ospf#A:
By default, summary route advertisements are sent into stub areas. The no form of the summary command disables sending summary route advertisements and only the default route is advertised by the ABR. This example retains the default so the command is not entered.
ALA-A>config>router>ospf>area># info
----------------------------------------------
...
area 0.0.0.0
exit
area 0.0.0.20
stub
exit
exit
...
----------------------------------------------
ALA-A>config>router>ospf#
ALA-A>config>router>ospf>area># info
----------------------------------------------
...
area 0.0.0.0
exit
area 0.0.0.20
stub
exit
exit
...
----------------------------------------------
ALA-A>config>router>ospf#
A:ALA-48>config>router>ospf3>area# info
----------------------------------------------
stub
default-metric 5000
exit
----------------------------------------------
A:ALA-48>config>router>ospf3>area#
CLI Syntax: ospf ospf-instance
ospf3
area-range ip-prefix/mask [advertise|not-advertise]
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
exit
area 0.0.0.20
stub
exit
exit
area 0.0.0.25
nssa
exit
exit
----------------------------------------------
A:ALA-49>config>router>ospf#
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
area 0.0.0.0
exit
area 0.0.0.20
stub
exit
exit
area 0.0.0.25
nssa
exit
exit
area 4.3.2.1
exit
----------------------------------------------
A:ALA-48>config>router>ospf3#
The router-id parameter specified in the
virtual-link command must be associated with the virtual neighbor, that is, enter the virtual neighbor’s router ID, not the local router ID. The transit area cannot be a stub area or an NSSA.
Use the following CLI syntax to configure stub areas:
CLI Syntax: ospf ospf-instance
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
exit
area 0.0.0.20
stub
exit
exit
area 0.0.0.25
nssa
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-49>config>router>ospf#
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
area 0.0.0.0
virtual-link 4.3.2.1 transit-area 4.3.2.1
exit
exit
area 0.0.0.20
stub
exit
exit
area 0.0.0.25
nssa
exit
exit
area 4.3.2.1
exit
----------------------------------------------
A:ALA-48>config>router>ospf3#
The passive command enables the passive property to and from the OSPF interface where passive interfaces are advertised as OSPF interfaces but do not run the OSPF protocol. By default, only interface addresses that are configured for OSPF are advertised as OSPF interfaces. The passive parameter allows an interface to be advertised as an OSPF interface without running the OSPF protocol. When enabled, the interface will ignore ingress OSPF protocol packets and not transmit any OSPF protocol packets.
CLI Syntax: ospf ospf-instance
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.20
stub
exit
interface "to-103"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 1.2.3.4
exit
area 4.3.2.1
interface "SR1-3"
exit
exit
area 4.3.2.1
interface "SR1-3" secondary
exit
exit
----------------------------------------------
A:ALA-49>config>router>ospf# area 0.0.0.20
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
area 0.0.0.0
virtual-link 4.3.2.1 transit-area 4.3.2.1
exit
interface "system"
exit
exit
area 0.0.0.20
stub
exit
interface "SR1-2"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 4.3.2.1
exit
----------------------------------------------
A:ALA-48>config>router>ospf3#
•
|
authentication-key — Configures the password used by the OSPF interface or virtual-link to send and receive OSPF protocol packets on the interface when simple password authentication is configured.
|
•
|
authentication-type — E nables authentication and specifies the type of authentication to be used on the OSPF interface, either password or message digest.
|
•
|
message-digest-key — Use this command when message-digest keyword is selected in the authentication-type command. The Message Digest 5 (MD5) hashing algorithm is used for authentication. MD5 is used to verify data integrity by creating a 128-bit message digest from the data input. It is unique to that specific data.
|
When the hash parameter is not used, non-encrypted characters can be entered. Once configured using the message-digest-key command, then all keys specified in the command are stored in encrypted format in the configuration file using the
hash keyword. When using the
hash keyword the password must be entered in encrypted form. Hashing cannot be reversed. Issue the
no message-digest-key key-id command and then re-enter the command
without the
hash parameter to configure an unhashed key.
CLI Syntax: ospf ospf-instance
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.20
stub
exit
interface "to-103"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 0.0.0.40
interface "test1"
authentication-type password
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-49>config>router>ospf#
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
exit
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.1
exit
area 0.0.0.20
stub
exit
interface "to-103"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 0.0.0.40
interface "test1"
authentication-type password
authentication-key "3WErEDozxyQ" hash
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-49>config>router>ospf#
The priority command is only used if the interface is a broadcast type. The designated router is responsible for flooding network link advertisements on a broadcast network to describe the routers attached to the network. A router uses hello packets to advertise its priority. The router with the highest priority interface becomes the designated router. A router with priority 0 is not eligible to be a designated router or a backup designated router. At least one router on each logical IP network or subnet must be eligible to be the designated router. By default, routers have a priority value of 1.
CLI Syntax: ospf ospf-instance
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 10.0.0.1 transit-area 0.0.0.1
authentication-type message-digest
message-digest-key 2 md5 "Mi6BQAFi3MI" hash
exit
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.1
exit
area 0.0.0.20
stub
exit
interface "to-103"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 0.0.0.40
interface "test1"
authentication-type password
authentication-key "3WErEDozxyQ" hash
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-49>config>router>ospf#
By default, summary route advertisements are sent into the stub area or NSSA. The no form of the
summaries command disables sending summary route advertisements and, in stub areas, the default route is advertised by the area border router.
CLI Syntax: ospf ospf-instance
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 10.0.0.1 transit-area 0.0.0.1
authentication-type message-digest
message-digest-key 2 md5 "Mi6BQAFi3MI" hash
exit
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.1
exit
area 0.0.0.20
stub
exit
interface "to-103"
exit
exit
area 0.0.0.25
nssa
exit
interface "if2"
priority 100
exit
exit
area 0.0.0.40
interface "test1"
authentication-type password
authentication-key "3WErEDozxyQ" hash
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-49>config>router>ospf#
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
area 0.0.0.0
virtual-link 4.3.2.1 transit-area 4.3.2.1
exit
interface "system"
exit
exit
area 0.0.0.20
stub
exit
interface "SR1-2"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 4.3.2.1
exit
----------------------------------------------
A:ALA-48>config>router>ospf3#
If multiple routes are learned with an identical preference using the same protocol and the costs (metrics) are equal, then the decision of what route to use is determined by the configuration of the ecmp in the config>router context.
CLI Syntax: ospf ospf-instance
ospf3
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 10.0.0.1 transit-area 0.0.0.1
authentication-type message-digest
message-digest-key 2 md5 "Mi6BQAFi3MI" hash
exit
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.1
exit
area 0.0.0.20
stub
exit
interface "to-103"
exit
exit
area 0.0.0.25
nssa
exit
interface "if2"
priority 100
exit
exit
area 0.0.0.40
interface "test1"
authentication-type password
authentication-key "3WErEDozxyQ" hash
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-48>config>router>ospf3# info
----------------------------------------------
asbr
overload
timers
lsa-arrival 50000
exit
export "OSPF-Export"
area 0.0.0.0
virtual-link 4.3.2.1 transit-area 4.3.2.1
exit
interface "system"
exit
exit
area 0.0.0.20
stub
exit
interface "SR1-2"
exit
exit
area 0.0.0.25
nssa
exit
exit
area 4.3.2.1
exit
----------------------------------------------
A:ALA-48>config>router>ospf3#
Since the router ID is defined in the config>router context, not in the OSPF configuration context, the protocol instance is not aware of the change. Re-examine the plan detailing the router ID. Changing the router ID on a device could cause configuration inconsistencies if associated values are not also modified.
A:ALA-49>config>router# info
------------------------------------------
IP Configuration
------------------------------------------
interface "system"
address 10.10.10.104/32
exit
interface "to-103"
address 10.0.0.103/24
port 1/1/1
exit
autonomous-system 100
router-id 10.10.10.104
------------------------------------------
A:ALA-49>config>router#
ALA-48>config>router# info
------------------------------------------
IP Configuration
------------------------------------------
interface "system"
address 10.10.10.103/32
exit
interface "to-104"
address 10.0.0.104/24
port 1/1/1
exit
autonomous-system 100
router-id 10.10.10.103
------------------------------------------
ALA-48>config>router#
You can modify a router ID, but you cannot delete the parameter. When the no router router-id command is issued, the router ID reverts to the default value, the system interface address (which is also the loopback address). If a system interface address is not configured, then the last 32 bits of the chassis MAC address is used as the router ID.
Example:
config>router# ospf 1
config>router>ospf# area 0.0.0.20
config>router>ospf>area# no interface "to-103"
config>router>ospf>area# interface "to-HQ
config>router>ospf>area>if$ priority 50
config>router>ospf>area>if# exit
config>router>ospf>area# exit
A:ALA-49>config>router>ospf# info
----------------------------------------------
asbr
overload
overload-on-boot timeout 60
traffic-engineering
preference 9
external-preference 140
export "OSPF-Export"
graceful-restart
helper-disable
exit
area 0.0.0.0
virtual-link 10.0.0.1 transit-area 0.0.0.1
authentication-type message-digest
message-digest-key 2 md5 "Mi6BQAFi3MI" hash
exit
virtual-link 1.2.3.4 transit-area 1.2.3.4
hello-interval 9
dead-interval 40
exit
interface "system"
exit
exit
area 0.0.0.1
exit
area 0.0.0.20
stub
exit
exit
area 0.0.0.25
nssa
exit
interface "if2"
priority 100
exit
exit
area 0.0.0.40
interface "test1"
authentication-type password
authentication-key "3WErEDozxyQ" hash
exit
exit
area 1.2.3.4
exit
----------------------------------------------
A:ALA-49>config>router>ospf#