HCIP网络类型实验

网络类型实验

1、建立拓扑,标识ip

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

R1

R2

R3

R4

R5

3R1R5——pppPAP认证,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

4R2R5间使用PPPchap认证,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

5R3R5间使用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

6R1/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

7R1/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环回):

实验完成

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值