OSPF neighbor validation supports both MD5 and plaintext authentication, and the following is done by R1,R2,R3 neighbor validation. Here we have R1 and R2 for neighbor MD5 encryption.
The R1 configuration is as follows:
Interfaces {em1 {Vlan-id 12;
Family inet {address 10.0.4.5/30;
} \ {Vlan-id 13;
Family inet {address 10.0.4.14/30; }} lo0 {Unit 1 {family inet {address 10.0.0.1/
32;
}}} protocols {OSPF {area 0.0.0.2 {interface em1.12 { Authentication {MD5 123 key "$9$4ozikmftzn/"; # # SECRET-DATA//MD5 Certified Key-id and key must be
The Key-id of the end interface matches the key, otherwise the validation fails!
}} interface em1.13;
The configuration of R2}} is as follows: interfaces {em2 {Vlan-id 12;
Family inet {address 10.0.4.6/30;
} unit {Vlan-id 23;
Family inet {address 10.0.4.2/30; }} lo0 {Unit 2 {family inet {address 10.0.0.2/
32;
}}} protocols {OSPF {area 0.0.0.2 {interface em2.21 {
Authentication {MD5 123 key "$9$XKQ-S2OJGDHQ"; # # Secret-data}
} interface em2.23; Verify MD5 success: olive# run show OSPF interface Logical-system R1 em1.12 extensive interface State area DR ID BDR ID NBRS em1.12 BDR 0.0.0.2 10.0.0.2 10.0.0.1 1 Type:lan, address:10.0.4.5, mask:255.255.255.252, mtu:1500, Cost:1 DR addr:10.0. 4.6, BDR addr:10.0.4.5, priority:128 Adj counT:1 hello:10, dead:40, Rexmit:5, not Stub Auth type:md5, Active key id:123, Start time:1970 1 08:00: CST Protection type:none topology Default (ID 0)-> cost:1 [edit logical-systems R2] Oliv e# Run show OSPF interface Logical-system R2 em2.21 extensive the state area DR ID BDR ID NBRs em2.21 DR 0.0.0.2 10.0.0.2 10.0.0.1 1 Type: LAN, address:10.0.4.6, mask:255.255.255.252, mtu:1500, cost:1 DR addr:10.0.4.6, BDR addr:10.0.4.5, priority:1 Adj count:1 hello:10, dead:40, Rexmit:5, not Stub Auth type:md5, Active key id:123, Start time:19 1 08:00:00 CST Protection type:none topology Default (ID 0)-> cost:1
This article is from the "Rista" blog, please be sure to keep this source http://rista.blog.51cto.com/2526140/938231