HCIP的mgre实验

题目

拓扑图

IP地址配置和缺省

R1

[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.1 24
Aug 2 2023 20:38:20-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]int s4/0/0
[r1-Serial4/0/0]ip add 14.1.1.1 24
[r1-Serial4/0/0]
[r1]ip rou
[r1]ip route
[r1]ip route-static 0.0.0.0 0 14.1.1.2

R2

< isp>sys
Enter system view, return user view with Ctrl+Z.
[isp]int s4/0/0
[isp-Serial4/0/0]ip add 14.1.1.2 24
[isp-Serial4/0/0]
Aug 2 2023 20:41:08-08:00 isp %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state.
[isp-Serial4/0/0]int s4/0/1
[isp-Serial4/0/1]ip add 24.1.1.2 24
[isp-Serial4/0/1]int s3/0/0
[isp-Serial3/0/0]ip add 34.1.1.2 24
[isp-Serial3/0/0]

R3

< r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]int s4/0/0
[r3-Serial4/0/0]ip add 24.1.1.1 24
[r3-Serial4/0/0]
Aug 2 2023 20:42:29-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
[r3-Serial4/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.2.1 24
Aug 2 2023 20:42:54-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]
[r3]ip rou
[r3]ip route
[r3]ip route-static 0.0.0.0 0 24.1.1.2

R4

< r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]int s4/0/0
[r4-Serial4/0/0]ip add 34.1.1.1 24
[r4-Serial4/0/0]
Aug 2 2023 20:43:20-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
[r4-Serial4/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.3.1 24
Aug 2 2023 20:43:42-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r4-GigabitEthernet0/0/1]
[r4]ip rou
[r4]ip route
[r4]ip route-static 0.0.0.0 0 34.1.1.2

R2环回

[isp]int lo
[isp]int LoopBack 0
[isp-LoopBack0]ip add 2.2.2.2 24
[isp-LoopBack0]

题目二,配置

R1

[r1]int
[r1]interface s4/0/0
[r1-Serial4/0/0]lin
[r1-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
Aug 2 2023 20:48:34-08:00 r1 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed
the configuration that will change the encapsulation protocol of the link and th
en selected Y.
[r1-Serial4/0/0]

R2

[isp]int
[isp]interface s4/0/0
[isp-Serial4/0/0]link
[isp-Serial4/0/0]link-protocol hd
[isp-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
Aug 2 2023 20:49:19-08:00 isp %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed
the configuration that will change the encapsulation protocol of the link and t
hen selected Y.
[isp-Serial4/0/0]

题目三,配置

R2主认证方

[isp]aaa
[isp-aaa]loc
[isp-aaa]local-user chs pass
[isp-aaa]local-user chs password ci
[isp-aaa]local-user chs password cipher 123456
Info: Add a new user.
[isp-aaa]lo
[isp-aaa]local-user chs ser
[isp-aaa]local-user chs service-type ppp
[isp-aaa]q
[isp]int s4/0/1
[isp-Serial4/0/1]ppp au
[isp-Serial4/0/1]ppp authentication-mode pap
[isp-Serial4/0/1]

R3被认证方

[r3]int s4/0/0
[r3-Serial4/0/0]ppp pap lo
[r3-Serial4/0/0]ppp pap local-user chs pa
[r3-Serial4/0/0]ppp pap local-user chs password ci
[r3-Serial4/0/0]ppp pap local-user chs password cipher 123456
[r3-Serial4/0/0]

题目四,配置

R2主认证方

[isp]aaa
[isp-aaa]local-user chs password cipher 123456
[isp-aaa]local-user chs service-type ppp
[isp-aaa]q
[isp]int s3/0/0
[isp-Serial3/0/0]ppp au
[isp-Serial3/0/0]ppp authentication-mode chap
[isp-Serial3/0/0]

R4被认证方

[r4]int s4/0/0
[r4-Serial4/0/0]ppp chap pa
[r4-Serial4/0/0]ppp chap password ci
[r4-Serial4/0/0]ppp chap password cipher 123456
[r4-Serial4/0/0]

题目五,配置

R1

[r1]int
[r1]interface tun
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.4.1 24
[r1-Tunnel0/0/0]tun
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]sou
[r1-Tunnel0/0/0]source 14.1.1.1
Aug 2 2023 21:15:58-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nh
[r1-Tunnel0/0/0]nhrp en
[r1-Tunnel0/0/0]nhrp entry mu
[r1-Tunnel0/0/0]nhrp entry multicast dyn
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nh
[r1-Tunnel0/0/0]nhrp netw
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]q
[r1]rip
[r1-rip-1]vers
[r1-rip-1]version 2
[r1-rip-1]netqw
[r1-rip-1]netw
[r1-rip-1]network 192.168.1.0
[r1-rip-1]netw
[r1-rip-1]network 192.168.4.0
[r1-rip-1]q
[r1]int tun
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]undo rip spli
[r1-Tunnel0/0/0]undo rip split-horizon
[r1-Tunnel0/0/0]

R3

[r3]int
[r3]interface tun
[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.4.2 24
[r3-Tunnel0/0/0]tun
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]sou
[r3-Tunnel0/0/0]source s
[r3-Tunnel0/0/0]source Serial 4/0/0
Aug 2 2023 21:19:12-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]
[r3-Tunnel0/0/0]nh
[r3-Tunnel0/0/0]nhrp en
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 re
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[r3-Tunnel0/0/0]nh
[r3-Tunnel0/0/0]nhrp netw
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]q
[r3]rip
[r3-rip-1]vers 2
[r3-rip-1]netw
[r3-rip-1]network 192.168.4.0
[r3-rip-1]netw
[r3-rip-1]network 192.168.2.0

R4

[r4]int
[r4]interface tun
[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.4.3 24
[r4-Tunnel0/0/0]tun
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]sourc
[r4-Tunnel0/0/0]source s
[r4-Tunnel0/0/0]source Serial 4/0/0
Aug 2 2023 21:21:59-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]
[r4-Tunnel0/0/0]nh
[r4-Tunnel0/0/0]nhrp en
[r4-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 re
[r4-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[r4-Tunnel0/0/0]nhrp net
[r4-Tunnel0/0/0]nhrp network-id 100
[r4-Tunnel0/0/0]q
[r4]rip
[r4-rip-1]vers
[r4-rip-1]version 2
[r4-rip-1]netw
[r4-rip-1]network 192.168.4.0
[r4-rip-1]netw
[r4-rip-1]network 192.168.3.0
[r4-rip-1]

nat配置

R1

[r1]acl 2000
[r1-acl-basic-2000]ru
[r1-acl-basic-2000]rule per
[r1-acl-basic-2000]rule permit sou
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat out
[r1-Serial4/0/0]nat outbound 2000
[r1-Serial4/0/0]

R3

[r3]acl 2000
[r3-acl-basic-2000]ru
[r3-acl-basic-2000]rule per
[r3-acl-basic-2000]rule permit sou
[r3-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]int s4/0/0
[r3-Serial4/0/0]nat out
[r3-Serial4/0/0]nat outbound 2000
[r3-Serial4/0/0]

R4

[r4]acl 2000
[r4-acl-basic-2000]ru
[r4-acl-basic-2000]rule per
[r4-acl-basic-2000]rule permit sou
[r4-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]int s4/0/0
[r4-Serial4/0/0]nat out
[r4-Serial4/0/0]nat outbound 2000
[r4-Serial4/0/0]

验证
PC1能ping通PC2和PC3

PC1能ping通R2的环回2.2.2.2

PC3能ping通PC2和2.2.2.2

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
xiaoxingxing的头像xiaoxingxing管理团队
上一篇 2023年9月2日
下一篇 2023年9月2日

相关推荐

此站出售,如需请站内私信或者邮箱!