OSPF Configuration Router ospf process no. Redistribute other routing protocols Network port Network anti-mask area number Area No. range network No. Mask Area No. default-cost Expense Value Ip ospf priority number Cost of Ip ospf cost <BR> Show ip ospf database |
Use Authentication
For security reasons, we can enable the authentication function on the vrouters in the same OSPF region. Only the vrouters in the same region that have been authenticated can advertise route information to each other.
By default, OSPF does not use area verification. You can enable the authentication function in two ways: plain text authentication and Message Digest (md5) authentication. The authentication password transmitted by plain text authentication is identified by the Network detector, so it is not secure and is not recommended. The Digest (md5) authentication must encrypt the password before transmitting the authentication password. Therefore, we recommend that you use this method for authentication.
When using authentication, all vro interfaces in the region must use the same authentication method. To start identity authentication, you must configure a password for each vro interface in the region in router interface configuration mode.
Task commands Id authentication area-id authentication Use plain text authentication ip ospf authentication-key password Use the message digest (md5) to authenticate the ip ospf message-digest-key keyid md5 key |
The following are two verification settings. The network distribution and Address Allocation environment in this example are the same as those in the preceding basic configuration. The authentication function is only used in Zone 0 of Router1 and Router2. :
Example 1. use plain text Authentication
Router1: interface ethernet 0 ip address 192.1.0.129 255.255.255.192 ! interface serial 0 ip address 192.200.10.5 255.255.255.252 ip ospf authentication-key cisco ! router ospf 100 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.128 0.0.0.63 area 1 area 0 authentication ! Router2: interface ethernet 0 ip address 192.1.0.65 255.255.255.192 ! interface serial 0 ip address 192.200.10.6 255.255.255.252 ip ospf authentication-key cisco ! router ospf 200 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.64 0.0.0.63 area 2 area 0 authentication ! |
Example 2. Message Digest (md5) authentication:
Router1: Interface ethernet 0 Ip address 192.1.0.129 255.255.255.192 ! Interface serial 0 Ip address 192.200.10.5 255.255.255.252 Ip ospf message-digest-key 1 md5 cisco ! Router ospf 100 Network 192.200.10.4 0.0.3 area 0 Network 192.1.0.128 0.0.63 area 1 Area 0 authentication message-digest ! Router2: Interface ethernet 0 Ip address 192.1.0.65 255.255.255.192 ! Interface serial 0 Ip address 192.200.10.6 255.255.255.252 Ip ospf message-digest-key 1 md5 cisco ! Router ospf 200 Network 192.200.10.4 0.0.3 area 0 Network 192.1.0.64 0.0.63 area 2 Area 0 authentication message-digest ! Related Debugging commands: Debug ip ospf Debug ip ospf events |
Related Articles]
- Detailed concept and working principle of OSPF Routing Protocol
- Required for network management: principles and features of Dynamic Routing Protocol OSPF
- OSPF Route Protocol Configuration Guide