实验报告
一、拓扑
二、分析
1、为所有路由器设备进行IP配置
2、r1和r5进行PPP的PAP认证; r2于r5之间使用PPP的chap认证; r3于r5之间使用HDLC封装。
3、构建MGrE环境;构建GRE
4、RIP全网可达
5、PC访问r5
三、配置
1、为所有路由器设备进行IP配置
r1:
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[r1]interface Serial 4/0/0
[r1-Serial4/0/0]ip address 15.0.0.1 24
[r1]int t 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.5.1 24
[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
缺省路由:
[r1]ip route-static 0.0.0.0 0 15.0.0.2
r2:
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[r2]int s 4/0/0
[r2-Serial4/0/0]ip add 25.0.0.1 24
[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24
缺省路由:
[r2]ip route-static 0.0.0.0 0 25.0.0.2
r3:
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.3.1 24
[r3]int s 4/0/0
[r3-Serial4/0/0]ip add 35.0.0.1 24
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.5.3 24
缺省路由:
[r3]ip route-static 0.0.0.0 0 35.0.0.2
r4:
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.4.1 24
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 45.0.0.1 24
[r4]int t 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24
缺省路由:
[r4]ip route-static 0.0.0.0 0 45.0.0.2
r5:
[r5]int s 3/0/0
[r5-Serial3/0/0]ip add 15.0.0.2 24
[r5-Serial3/0/0]int s 3/0/1
[r5-Serial3/0/1]ip add 25.0.0.2 24
[r5-Serial3/0/1]int s 4/0/0
[r5-Serial4/0/0]ip add 35.0.0.2 24
[r5-Serial4/0/0]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.2 24
[r5]int l 0
[r5-LoopBack0]ip add 5.5.5.1 24
2、r1和r5进行PPP的PAP认证、r2于r5之间使用PPP的chap认证、r3于r5之间使用HDLC封装
认证方配置:
[r5]aaa
[r5-aaa]local-user huawei password cipher 123456
[r5-aaa]local-user huawei service-type ppp
[r5-aaa]int s3/0/0
[r5-Serial3/0/0]ppp authentication-mode pap
被认证方配置:
[r1]int s4/0/0
[r1-Serial4/0/0]ppp pap local-user huawei password cipher 123456
认证方配置:
[r5-aaa]local-user admin password cipher 123456
[r5-aaa]int s3/0/1
[r5-Serial3/0/1]ppp authentication-mode chap
被认证方配置:
[r2]int s4/0/0
[r2-Serial4/0/0]ppp chap user admin
[r2-Serial4/0/0]ppp chap password cipher 123456
直接修改串口接口的数据链路层协议为非标准的HDLC
[r5-Serial4/0/0]link-protocol hdlc
[r3-Serial4/0/0]link-protocol hdlc
3、构建MGrE环境;构建GRE
MGRE
中心配置
r1:
[r1]int t 0/0/0
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp ---修改接口的封装协议为MGrE
[r1-Tunnel0/0/0]source 15.0.0.1 ---规定封装源15.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100 ---创建NHRP域
分支配置
r2:
[r2]int t 0/0/0
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp ---修改接口的封装协议为MGrE
[r2-Tunnel0/0/0]source s4/0/0 ---规定封装源s4/0/0接口的IP地址
[r2-Tunnel0/0/0]nhrp network-id 100 ---加入中心创建的NHrP域
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register ----找中心上报映射信息(第一个IP为隧道地址,第二个为物理地址)
r3配置与r2一样:
[r3]int t 0/0/0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
映射关系
GRE
r1:
[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]source 15.0.0.1 ---定义封装中的源地址信息
[r1-Tunnel0/0/1]destination 45.0.0.1 ---定义封装中的目的地址信息
r4:
[r4]int t 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 45.0.0.1
[r4-Tunnel0/0/0]destination 15.0.0.1
4、RIP全网可达
r1配置:
[r1-Tunnel0/0/0]nhrp entry multicast dynamic ---在中心开启伪广播功能
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0 ---主类宣告
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0
r2配置:
[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
r3配置:
[r3-rip-1]rip 1
[r3-rip-1]version 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0
r4配置:
[r4]rip 1
[r4-rip-1]version 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0
检查路由表
该处优点小问题(RIP路径不完整),待小编查明以后补发一篇文章说明
5、PC访问r5
PC配置
配置EasyIP
[r1-rip-1]acl 2000
[r1-acl-basic-2000]rule 10 permit source 192.168.1.0 0.0.255.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
[r2]acl 2000
[r2-acl-basic-2000]rule 10 permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]int s4/0/0
[r2-Serial4/0/0]nat outb 2000
[r3]acl 2000
[r3-acl-basic-2000]rule 10 permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]int s4/0/0
[r3-Serial4/0/0]nat out 2000
[r4]acl 2000
[r4-acl-basic-2000]rule 10 permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]int g0/0/0
[r4-GigabitEthernet0/0/0]nat out 2000
检查路由表
PCpingr5