IP通信实验报告——OSPF,认证实验

 IP 通信基础实验报告 实验一

 OSPF 认证实验

 一、

 实验目的

 1、 掌握在 GAR 路由器上配置 OSPF 所需的基本命令; 2、 理解和巩固 OSPF 的基本原理; 二、

 实验内容(仿真程序‘ ospf area authentication without MD5.pkt ’和‘ ospf with MD5.pkt ’)

 1、 OSPF 明文加密 2、 OSPF MD5 加密 三、

 实验设备

 路由器

  2 台 PC 机

  2 台 交叉网线

  3 条 四、

 实验拓扑图

 五、

 配置步骤

 1 1 、5 MD5 加密

 RT1 ==== ==============================

 Router>en

 Router#conf t

 Enter configuration commands, one per line.

 End with CNTL/Z.

 Router(config)#ho RT1

 RT1(config)#int loopback1

 %LINK- -5 5- - CHANGED: Interface Loopback1, changed state to up

 %LINEPROTO- -5 5- - UPDOWN: Line proto col on Interface Loopback1, changed state to up

 RT1(config- - if)#no shutdown

 RT1(config- - if)#ip add 1.1.1.1 255.255.255.255

 RT1(config- - if)#exit

 RT1(config)#interface fastEthernet 1/0

 RT1(config- - if)#no shutdown

 %LINK- -5 5- - CHANGED: Interface FastEthernet1/0, ch anged state to up

 RT1(config- - if)#ip add 192.168.10.254 255.255.255.0

 RT1(config- - if)#ex

 RT1(config)#

 RT1(config)#interface fastEthernet 0/0

 RT1(config- - if)#no shutdown

 %LINK- -5 5- - CHANGED: Interface FastEthernet0/0, changed state to up

 RT1(config- - if)#ip add 1 0.1.1.1 255.255.255.0

 RT1(config- - if)#ex

 RT1(config)#router ospf 110

 RT1(config)#router- - id 1.1.1.1

 RT1(config- - router)#network 1.1.1.1 0.0.0.0 area 0

 RT1(config- - router)#network 10.1.1.0 0.0.0.255 area 0

 RT1(config- - router)#network 192.168.10.0 0.0.0.255 area 0 0

 RT1(config- - router)#area 0 authentication message- - digest

  // 不同之处

 RT1(config- - router)#exit

 RT1(config)#interface fastEthernet 0/0

 RT1(config- - if)#ip ospf authentication

 RT1(config- - if)#ip ospf message- - digest- - key 100 md5 ZTE110

  RT1(config- - if)#exit

 2 2 、明文加密

 R R T1

 Router>enable

 Router#conf t

 Enter configuration commands, one per line.

 End with CNTL/Z.

 Router(config)#hostname RT1

 RT1(config)#interface loopback1

 RT1(config- - if)#no shutdown

 RT1(config- - if)#ip address 1.1.1.1 255.255.255.255

 RT1(config- - if)#exit

 RT1(c onfig)#interface fastEthernet 1/0

 RT1(config- - if)#no shutdown

 RT1(config- - if)#ip add 192.168.10.254 255.255.255.0

 RT1(config- - if)#exit

 RT1(config)#router ospf 110

 RT2(config- - router)#router- - id 1.1.1.1

 RT1(config- - router)#network 10.1.1.0 0.0.0.255 area 0

 RT1(co nfig- - router)#network 1.1.1.1 0.0.0.0 area 0

 RT1(config- - router)#network 192.168.10.0 0.0.0.255 area 0

 RT1(config- - router)#area 0 authentication

 RT1(config- - router)#exit

 RT1(config)#interface fastEthernet 0/0

 RT1(config- - if)#no shutdown

 RT1(config- - if)#ip addres s 10.1.1.1 255.255.255.0

 RT1(config- - if)#ip ospf authentication

 RT1(config- - if)#ip ospf authentication- - key zxr10

 RT1(config- - if)#exit

 =========================================================

 RT2

 Router>enable

 Router#conf t

 Enter configuration commands, on e per line.

 End with CNTL/Z.

 Router(config)#hostname RT2

 RT2(config)#interface loopback1

 RT2(config- - if)#no shutdown

 RT2(config- - if)#ip address 2.2.2.2 255.255.255.255

 RT2(config- - if)#exit

 RT1(config)#interface fastEthernet 1/0

 RT1(config- - if)#no shutdown

 RT1 (config- - if)#ip address 192.168.20.254 255.255.255.0

 RT1(config- - if)#exit

 RT1(config)#

 RT2(config)#router ospf 110

 RT2(config- - router)#router- - id 2.2.2.2

 RT2(config- - router)#network 2.2.2.2 0.0.0.0 area 0

 RT2(config- - router)#network 10.1.1.0 0.0.0.255 area 0

 RT2 (config- - router)#network 192.168.20.0 0.0.0.255 area 0

 RT2(config- - router)#area 0 authentication

 RT2(config- - router)#redistribute connected

  \ \\ \ 这一句可有可无

 RT2(config- - router)#exit

 RT2(config)#interface fastEthernet 0/0

 RT2(config- - if)#no shutdown

 RT2(config- - if)#ip

 address 10.1.1.2 255.255.255.0

 RT2(config- - if)#ip ospf authentication

 RT2(config- - if)#ip ospf authentication- - key zxr10

 RT2(config- - if)#exit

 六、

 验证方法及验证结果

 1. 明文认证

 Router(config)#do show ip ospf neig

 验证结果如下:

 2.5 MD5 认证

 Router(config)#do show ip ospf neig

 验证结果如下:

 七、

 实验结论

 GAR 支持 OSPF 明文和 MD5 加密认证