实验二十八、OSPF 邻居认证配置
一、 实验目的
1. 掌握OSPF 邻居认证的配置
2. 理解理解邻居认证的作用
二、 应用环境
在企业环境中,需要配置认证来保证OSPF 路由的安全性
三、 实验设备
1. DCR-1751 两台
2. CR-V35MT 一条
3. CR-V35FC 一条
四、 实验拓扑
五、 实验要求
ROUTER-A ROUTER-B
S1/1 192.168.1.1/24 S1/0 192.168.1.2/24
Loopback0 10.10.10.1/24 Loopback0 10.10.11.1/24
六、 实验步骤
第一步:路由器环回接口的配置(其他接口配置请参见实验三)
路由器A:
Router-A_config#interface loopback0
Router-A_config_l0#ip address 10.10.10.1 255.255.255.0路由器B:
Router-B#config
Router-B_config#interface loopback0
Router-B_config_l0#ip address 10.10.11.1 255.255.255.0
第二步:验证接口配置
Router-B#sh interface loopback0
Loopback0 is up, line protocol is up
Hardware is Loopback
Interface address is 10.10.11.1/24
MTU 1514 bytes, BW 8000000 kbit, DLY 500 usec
Encapsulation LOOPBACK
第三步:路由器的OSPF 配置
A 的配置:
Router-A_config#router ospf 2 !启动OSPF 进程,进程号为 2
Router-A_config_ospf_1#network 10.10.10.0 255.255.255.0 area 0 !注意要写掩码和区域号
Router-A_config_ospf_1#network 192.168.1.0 255.255.255.0 area 0
Router-A_config_ospf_1#area 0 authen simple !定义在区域0 中使用明文认证
Router-A_config_ospf_1#exit
Router-A_config#interface s1/1
Router-A_config#ip ospf password digitalchina !配置接口密码
B 的配置:
Router-B_config#router ospf 1
Router-B_config_ospf_1#network 10.10.11.0 255.255.255.0 area 0
Router-B_config_ospf_1#network 192.168.1.0 255.255.255.0 area 0
Router-B_config_ospf_1# area 0 authen simple !定义在区域0 中使用明文认证
Router-B_config_ospf_1#exit
Router-B_config#interface s1/0
Router-B_config#ip ospf password digitalchina !配置接口密码
第四步:查看路由表
路由器A:
Router-A#sh ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
C 10.10.10.0/24 is directly connected, Loopback0
O 10.10.11.1/32 [110,1600] via 192.168.1.2(on Serial1/1) !注意到环回接口产生的是主机路由
C 192.168.1.0/24 is directly connected, Serial1/1
路由器B:
Router-B#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
O 10.10.10.1/32 [110,1601] via 192.168.1.1(on Serial1/0) !注意管理距离为110
C 10.10.11.0/24 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Serial1/0