实验目标
一:r5为SIP只能进行IP地址配置,其所有地址均配为公有IP地址
1:进行网段分配
2:配置IP
3:除r5外的缺省路由
二:R1和R5间使用PPP的PAP认证,R5为主认证方;R2于R5之间使用PPP的chap认证,R5为主认证方; R3于R5之间使用HDLC封装。
1:R1和R5间使用PPP的PAP认证,R5为主认证方;
[r1-Serial4/0/0]ppp pap local-user admin password cipher 12345
2:;R2于R5之间使用PPP的chap认证,R5为主认证方;
isp
-
[isp-aaa]local-user admin password cipher 123456
-
[isp-aaa]local-user admin service-type p
-
[isp-Serial3/0/1]ppp authentication-mode chap
R2
-
[r2-Serial4/0/0]ppp chap user admin
-
[r2-Serial4/0/0]ppp chap password cipher 12345
可以ping通
3:R3于R5之间使用HDLC封装
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[isp-Serial3/0/0]link-protocol hdlc
三:R1/R2/R3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
R1
1,创建隧道接口
[r1]int Tunnel 0/0/0
2,隧道接口配置IP地址
[r1-Tunnel0/0/0]ip add 192.168.5.1 24
3,定义封装方式
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
4,定义封装的源IP
[r1-Tunnel0/0/0]source 10.0.0.1
5,创建NHRP域
[r1-Tunnel0/0/0]nhrp network-id 100
R2
r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s 4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 10.0.0.1 register
r3
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.5.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s 4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 10.0.0.1 register
R1、R4间为点到点的GRE。
另外创建一条隧道网段为192.168.6.
R1
[R1]interface Tunnel 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 10.0.0.1
[r1-Tunnel0/0/1]description 25.0.0.1
R4
[R4]interface Tunnel 0/0/1
[r4-Tunnel0/0/1]ip add 192.168.6.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 25.0.0.1
[r4-Tunnel0/0/1]description 10.0.0.1
lietome/article/details/126933157
四:整个私有网络基于RIP全网可达
R1
[r1]rip
[r1-rip-1]v 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
[r2-rip-1]v 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
R3
[r3]rip
[r3-rip-1]v 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0
R4
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0
五:所有Pc设置私有IP为源IP,可以访问R5环回
R1
[r1]acl 2000
[r1-acl-basic-2000]
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]
[r1-acl-basic-2000]q
[r1]
[r1]int s 4/0/0
[r1-Serial4/0/0]nat outbound 2000
R2
[r2]acl 2000
[r2-acl-basic-2000]
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]q
[r2]int s 4/0/0
[r2-Serial4/0/0]nat outbound 2000
R3
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]interface Serial 4/0/0
[r3-Serial4/0/0]
[r3-Serial4/0/0]nat outbound 2000
R4[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]nat outbound 2000
[r4-GigabitEthernet0/0/1]