OSPF区域MD5认证

1、区域md5认证

a、在区域内验证
b、配置命令
【OSPF区域MD5认证】验证方式: area 区域号 authentication message-digest
简单密码:ip ospfmessage-digest-key 1 md5密码
查看认证方式:show ipospf interface

c、认证成功,能建立邻居关系




OSPF区域MD5认证
文章图片



en conf t hostname R2 int loopback 0 ip address 2.2.2.2 255.255.255.0 no shutdown exit router ospf 1 network 192.168.3.0 0.0.0.255 area 0 network 192.168.2.0 0.0.0.255 area 0 network 2.2.2.0 0.0.0.255 area 0 area 0 authentication message-digest exit int f0/1 ip address 192.168.2.2 255.255.255.0 ip ospf message-digest-key 1 md5 abc no shutdown exit int f0/0 ip address 192.168.3.2 255.255.255.0 no shutdown exit end









R1#show ip ospf interface
Loopback0 is up, line protocol is up
Internet address is 1.1.1.1/24, Area 0
ProcessID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.1.2/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State WAITING, Priority 1
Nodesignated router on this network
Nobackup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Message digest authentication enabled
No key configured, using default key id 0
FastEthernet0/1 is up, line protocol is up
Internet address is 192.168.2.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State WAITING, Priority 1
Nodesignated router on this network
Nobackup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Index 3/3, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Message digest authentication enabled
Youngest key idis 1


解释:Message digest authentication enabled认证方式启动



R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)

Router Link States (Area 0)

Link IDADV RouterAgeSeq#Checksum Link count
1.1.1.11.1.1.1950x80000005 0x00f2eb 3
2.2.2.22.2.2.2950x80000005 0x00f7d7 3

Net Link States (Area 0)
Link IDADV RouterAgeSeq#Checksum
192.168.2.22.2.2.2950x80000001 0x006929
R1#show ip ospf neighbor

Neighbor IDPriStateDead TimeAddressInterface
2.2.2.21FULL/DR00:00:38192.168.2.2FastEthernet0/1


解释:能建立邻居关系,认证成功。

    推荐阅读