网络类型实验

1、建立拓扑,标识ip

2、配置PC、环回以及各接口ip,并使用RIP达成内网全通
R1

R2

R3

R4

R5


3、R1和R5——ppp的PAP认证,R5为主认证方
R5:
[r5]aaa
[r5-aaa]loc
[r5-aaa]local-user AR1 pas
[r5-aaa]local-user AR1 password ci
[r5-aaa]local-user AR1 password cipher 123456
Info: Add a new user.
[r5-aaa]loc
[r5-aaa]local-user AR1 service-type ppp
[r5-aaa]int s 1/0/0
[r5-Serial1/0/0]lin
[r5-Serial1/0/0]link-protocol ppp
[r5-Serial1/0/0]ppp a
[r5-Serial1/0/0]ppp authentication-mode pap
R1:
[r1]int s 2/0/0
[r1-Serial2/0/0]link
[r1-Serial2/0/0]link-protocol ppp
[r1-Serial2/0/0]ppp pap loc
[r1-Serial2/0/0]ppp pap local-user AR1 pa
[r1-Serial2/0/0]ppp pap local-user AR1 password c
[r1-Serial2/0/0]ppp pap local-user AR1 password cipher 123456
4、R2和R5间使用PPP的chap认证,R5为主认证方
R5:
[r5]aaa
[r5-aaa]loc
[r5-aaa]local-user AR2 pas
[r5-aaa]local-user AR2 password c
[r5-aaa]local-user AR2 password cipher 123456
Info: Add a new user.
[r5-aaa]loc
[r5-aaa]local-user AR2 se
[r5-aaa]local-user AR2 service-type ppp
[r5-aaa]int s 1/0/1
[r5-Serial1/0/1]li
[r5-Serial1/0/1]link-protocol ppp
[r5-Serial1/0/1]ppp a
[r5-Serial1/0/1]ppp authentication-mode chap
R2:
[r2]int s 2/0/0
[r2-Serial2/0/0]lin
[r2-Serial2/0/0]link-protocol ppp
[r2-Serial2/0/0]ppp chap us
[r2-Serial2/0/0]ppp chap user AR2
[r2-Serial2/0/0]ppp chap pas
[r2-Serial2/0/0]ppp chap password c
[r2-Serial2/0/0]ppp chap password cipher 123456
5、R3和R5间使用HDLC封装
R5:
[r5]int s 2/0/0
[r5-Serial2/0/0]link
[r5-Serial2/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
R3:
[r3]int s 2/0/0
[r3-Serial2/0/0]link
[r3-Serial2/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
6、R1/2/3构建一个MGRE环境,R1为中心站点
R1:
[r1]int t 0/0/0
[r1-Tunnel0/0/0]ip add 10.1.2.1 24
[r1-Tunnel0/0/0]tu
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]sou
[r1-Tunnel0/0/0]source 10.0.15.1
Jul 7 2021 17:22:51-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]nhrp en
[r1-Tunnel0/0/0]nhrp entry mu
[r1-Tunnel0/0/0]nhrp entry multicast dy
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp ne
[r1-Tunnel0/0/0]nhrp network-id 100
R2:
[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 10.1.2.2 24
[r2-Tunnel0/0/0]tu
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]sou
[r2-Tunnel0/0/0]source s
[r2-Tunnel0/0/0]source Serial 2/0/0
[r2-Tunnel0/0/0]nhrp n
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp en
[r2-Tunnel0/0/0]nhrp entry 10.1.2.1 10.0.15.1 reg
[r2-Tunnel0/0/0]nhrp entry 10.1.2.1 10.0.15.1 register
R3:
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip add 10.1.2.3 24
[r3-Tunnel0/0/0]tu
[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 2/0/0
[r3-Tunnel0/0/0]nhrp n
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp en
[r3-Tunnel0/0/0]nhrp entry 10.1.2.1 10.0.15.1 re
[r3-Tunnel0/0/0]nhrp entry 10.1.2.1 10.0.15.1 register
7、R1/4间为点到点GRE
[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.5.1 24
[r1-Tunnel0/0/1]tu
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]sou
[r1-Tunnel0/0/1]source 10.0.15.1
[r1-Tunnel0/0/1]dest
[r1-Tunnel0/0/1]destination 10.0.45.1
Jul 7 2021 17:29:50-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.
RI到R5的静态:
[r1]ip route-static 0.0.0.0 0 10.0.15.2
[r4]int t 0/0/1
[r4-Tunnel0/0/1]ip add 192.168.5.2 24
[r4-Tunnel0/0/1]tu
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]sou
[r4-Tunnel0/0/1]source 10.0.45.1
[r4-Tunnel0/0/1]dest
[r4-Tunnel0/0/1]destination 10.0.15.1
Jul 7 2021 17:32:00-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.
R4到R5的静态:
[r4]ip route-static 0.0.0.0 0 10.0.45.2
8、测试
GRE测试:

MGRE测试:

PC访问外网(R5环回):

3019

被折叠的 条评论
为什么被折叠?



