MGRE实验报告

在这里插入图片描述
在这里插入图片描述

那么,开始配置

PAP:
[isp]interface Serial 2/0/0
[isp-Serial2/0/0]q
[isp]aaa
[isp-aaa]local-user ps1 password cipher 123456
Info: Add a new user.
[isp-aaa]local-user ps1 service-type ppp
[isp-aaa]int
[isp-aaa]q
[isp]int s 2/0/0
[isp-Serial2/0/0]li
[isp-Serial2/0/0]link-protocol ppp
[isp-Serial2/0/0]ppp authentication-mode pap

[r1]int s 4/0/0
[r1-Serial4/0/0]link-protocol ppp
[r1-Serial4/0/0]ppp pap local-user ps1 password cipher 123456
[r1-Serial4/0/0]ip add 1.1.1.1 24

CHAP:
[isp-Serial2/0/1]li
[isp-Serial2/0/1]link-protocol ppp
[isp-Serial2/0/1]ppp au
[isp-Serial2/0/1]ppp authentication-mode ch
[isp-Serial2/0/1]ppp authentication-mode chap
[isp-Serial2/0/1]

[r2]int s 4/0/0
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]ppp chap user ps1
[r2-Serial4/0/0]ppp chap password cipher 123456
[r2-Serial4/0/0

HDLC:
[isp]int s 3/0/0
[isp-Serial3/0/0]link-protocol h
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y

[r3]int s 4/0/0
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y

配置ip:

[isp-Serial2/0/0]ip add 1.1.1.2 24
[r1-Serial4/0/0]ip add 1.1.1.1 24
[r2-Serial4/0/0]ip add 2.2.2.2 24
[r3-Serial4/0/0]ip add 3.3.3.2 24
[r3-Serial4/0/0]ip add 4.4.4.1 24
[isp-LoopBack0]ip add 6.6.6.1 24

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.2.254 24
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.3.254 24
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.4.254 24

静态路由
r4]ip route-static 0.0.0.0 0 4.4.4.2
[r1]ip route-static 0.0.0.0 0 1.1.1.2
[r3]ip route-static 0.0.0.0 0 3.3.3.1
[r2]ip route-static 0.0.0.0 0 2.2.2.1

[r1]acl 2000
[r1-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[r1-Serial4/0/0]nat outbound 2000
[r1-Serial4/0/0]

[r2]acl 2000
[r2-acl-basic-2000]rule 5 permit source 192.168.2.0 0.0.0.255
[r2-Serial4/0/0]nat outbound 2000
[r2-Serial4/0/0]

[r3]acl 2000
[r3-acl-basic-2000]rule 5 permit source 192.168.3.0 0.0.0.255
[r3-Serial4/0/0]nat outbound 2000
[r3-Serial4/0/0]

[r4]acl 2000
[r4-acl-basic-2000]rule 5 permit source 192.168.4.0 0.0.0.255
[r4-Serial4/0/0]nat outbound 2000

MGRE:

[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 5.5.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]undo rip split-horizon
[r1-Tunnel0/0/0]

[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 5.5.5.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source Serial 4/0/0
Jan 20 2021 20:58:47-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r2-Tunnel0/0/0]
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 5.5.5.1 1.1.1.1 register

[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip add 5.5.5.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial 4/0/0

[r3-Tunnel0/0/0]
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 5.5.5.1 1.1.1.1 register

GRE:

[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip add 7.7.7.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]source 1.1.1.1
[r1-Tunnel0/0/1]description 4.4.4.1

r4]int t 0/0/1
[r4-Tunnel0/0/1]ip add 7.7.7.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 4.4.4.1
[r4-Tunnel0/0/1]description 1.1.1.1

RIP:
r4]rip 1
[r4-rip-1]version 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 5.0.0.0
[r4-rip-1]

r3]rip v
[r3-rip-1]version 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 5.0.0.0

r2]rip
[r2-rip-1]version 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 5.0.0.0

[r1]rip 1
[r1-rip-1]v 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 5.0.0.0

大概结束了?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值