OSPF实验二
一、首先按照如图所示搭建拓扑图,如下图:
二、根据拓扑图,合理规划IP地址及网段
其中蓝底IP地址为本地环回地址
三、接着为所有路由器配置接口IP地址和本地环回地址
配置完成后,路由器之间两两相互测试,看IP地址是否配置错误
列如图下所示:
四、基本配置完成后,R1,R2,R3 配置缺省指向R7
五、R1,R2,R3为全连接,配置mgre
R1上:
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.2.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 192.168.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]nhrp entry 10.1.2.2 192.168.3.1 register
[R1-Tunnel0/0/0]nhrp entry 10.1.2.3 192.168.2.1 register
R2上:
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.2.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]nhrp entry multicast dynamic
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 10.1.2.1 192.168.1.1 register
[R2-Tunnel0/0/0]nhrp entry 10.1.2.3 192.168.3.1 register
[R2-Tunnel0/0/0]source 192.168.2.1
R3上:
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.2.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 192.168.3.1
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 192.168.1.1 register
[R3-Tunnel0/0/0]nhrp entry 10.1.2.2 192.168.2.1 register
六、根据逻辑拓扑图完成ospf的宣告
R1:
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.1.2.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 16.1.1.1 0.0.0.0
R2:
[R2]ospf 1 router-id 2.2.2.2
[R1-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.1.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.2.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.2.3 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 26.1.1.1 0.0.0.0
R3:
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.1.2.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.1.2.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.1.2.2 0.0.0.0
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]network 36.1.1.1 0.0.0.0
R4:
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 1
[R4-ospf-1-area-0.0.0.1]network 46.1.1.1 0.0.0.0
[R4-ospf-1-area-0.0.0.1]network 192.168.4.2 0.0.0.0
[R4-ospf-1-area-0.0.0.1]network 192.168.5.1 0.0.0.0
R5:
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 1
[R5-ospf-1-area-0.0.0.1]network 192.168.5.2 0.0.0.0
[R5-ospf-1-area-0.0.0.1]network 56.1.1.1 0.0.0.0
R6:
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]network 66.1.1.1 0.0.0.0
[R6-ospf-1-area-0.0.0.2]network 192.168.6.2 0.0.0.0
修改R1的接口广播形式
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf network-type broadcast
七、R1telent实际登录到R6
[R1]aaa
[R1-aaa]local-user cyn password cipher 123456
[R1-aaa]local-user cyn service-type telnet
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R6]int g 0/0/0
[R6-GigabitEthernet0/0/0]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y