实验题目要求如下:
1.构建拓扑图并且进行IP规划
2.对路由器和PC进行IP配置
(1).R1:
#
interface Serial4/0/0
link-protocol hdlc
ip address 12.1.1.1 255.255.255.0
#
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
(2).ISP:
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
#
#
interface Serial4/0/0
link-protocol hdlc
ip address 12.1.1.2 255.255.255.0
#
#
interface Serial4/0/1
link-protocol ppp
ppp authentication-mode pap
ip address 22.1.1.1 255.255.255.0
#
#
interface Serial3/0/0
link-protocol ppp
ppp authentication-mode chap
ip address 32.1.1.1 255.255.255.0
#
(3).R3:
[r3]int s4/0/0
[r3-Serial4/0/0]ip address 22.1.1.2 24
#
interface GigabitEthernet0/0/0
ip address 192.168.2.1 255.255.255.0
#
(4).R4:
[r4]int s4/0/0
[r4-Serial4/0/0]ip add 32.1.1.2 24
[r4]int
[r4]interface gi
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.3.1 24
(5).PC1
(6).PC2
(7).PC3
3.内网实现全网可达
R1 0.0.0.0/0 Static 60 0 RD 12.1.1.2 Serial4/0/0
R3 0.0.0.0/0 Static 60 0 RD 22.1.1.1 Serial4/0/0
R4 0.0.0.0/0 Static 60 0 RD 32.1.1.1 Serial4/0/0
4.R1-R2之间为HDLC封装
[r1]interface s4/0/0
[r1-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
5.R2-R3为PPP封装(R2为主认证方)
Pap 密文发送账号密码
[r2]aaa
[r2-aaa]local-user a password cipher 123456
[r2-aaa]local-user a service-type ppp
[r2]int s4/0/1
[r2-Serial4/0/1]ppp authentication-mode pap
[r3]int s4/0/0
[r3-Serial4/0/0]ppp pap local-user a password cipher 123456
6.R2-R4为PPP封装(R2为主认证方)
Chap 密文发送账号密码
[r2]aaa
[r2-aaa]local-user a password cipher 123456
[r2-aaa]local-user a service-type ppp
[r2]int s3/0/0
[r2-Serial3/0/0]ppp authentication-mode chap
[r4]int s4/0/0
[r4-Serial4/0/0]ppp chap password cipher 123456
7.R1、R3、R4构建MGRE环境,仅R1IP地址固定
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.4.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 12.1.1.1
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp network-id 100
[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 192.168.4.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
Aug 2 2023 22:16:05-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register
[r3-Tunnel0/0/0]nhrp network-id 100
[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.4.3 255.255.255.0
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source s4/0/0
Aug 2 2023 22:25:01-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r4-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register
[r4-Tunnel0/0/0]nhrp network-id 100
8.内网使用RIP获取路由,所有pc可以互相访问,并日可访问R2的环回
[r1]rip
[r1-rip-1]vers 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.4.0
[r3]rip
[r3-rip-1]vers 2
[r3-rip-1]network 192.168.4.0
[r3-rip-1]network 192.168.2.0
[r4]rip
[r4-rip-1]vers 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.3.0
9.查看每个路由器路由表
(1).R1
(2).R2
(3).R3
(4).R4
10.关闭水平分割来实现路由的全网正常收敛
[r1-Tunnel0/0/0]undo rip split-horizon
11.测试
(1).PC1
(1).PC2
(1).PC3