OSPF链路简单密码认证

1、 链路简单密码认证

 

a、在接口上配置

认证启动: ip ospfauthentication

认证密码:ip ospfauthentication-key abc

 

b、认证成功,能建立邻居关系,不成功,不发送hello报文,不能建立邻居关系







R1配置

en
conf t
hostname R1
 
int loopback 0
ip address 1.1.1.1 255.255.255.0
no shutdown
exit
 
int f0/0
ip address 192.168.1.2 255.255.255.0
no shutdown
exit
 
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.255 area 0
exit
 
int f0/1
ip address 192.168.2.1 255.255.255.0
ip ospf authentication
ip ospf authentication-key abc
no shutdown
exit
end


 

R2配置

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
exit
 
int f0/1
ip address 192.168.2.2 255.255.255.0
ip ospf authentication
ip ospf authentication-key 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

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 DR, Priority 1

 Designated Router (ID) 1.1.1.1, Interface address 192.168.1.2

  Nobackup designated router on this network

 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

   Hello due in 00:00:01

 Index 1/1, 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)

Loopback0 is up, line protocol is up

 Internet address is 1.1.1.1/24, Area 0

 Process ID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1

 Loopback interface is treated as a stub Host

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 BDR, Priority 1

 Designated Router (ID) 2.2.2.2, Interface address 192.168.2.2

 Backup Designated Router (ID) 1.1.1.1, Interface address 192.168.2.1

 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 1

   Adjacent with neighbor 2.2.2.2 (Designated Router)

 Suppress hello for 0 neighbor(s)

Simple passwordauthentication enabled

 

 

解释:Simple passwordauthentication enabled简单密码认证启动。

 

 

 

 

 

 

 

 

R1#show ip ospf neighbor

 

Neighbor ID     Pri  State           Dead Time   Address         Interface

2.2.2.2           1  FULL/DR         00:00:33    192.168.2.2     FastEthernet0/1

R1#show ip ospf database

            OSPF Router with ID (1.1.1.1) (ProcessID 1)

 

                Router Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

1.1.1.1         1.1.1.1         8           0x80000004 0x0028b7 3

2.2.2.2         2.2.2.2        8           0x80000005 0x00f7d7 3

 

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

192.168.2.2     2.2.2.2         8           0x80000001 0x006929

 

 

 

 

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


  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值