HCIP-MGRE综合实验
要求
r5配置接口IP地址
[r5]interface serial1 1/0/0
[r5-Serial1/0/0]ip address 15.0.0.5 24
[r5-Serial1/0/0]interface serial1 1/0/1
[r5-Serial1/0/1]ip address 25.0.0.5 24
[r5-Serial1/0/1]interface serial1 2/0/0
[r5-Serial2/0/0]ip address 35.0.0.5 24
[r5-Serial2/0/0]interface serial1 2/0/1
[r5-Serial2/0/1]ip address 45.0.0.5 24
[r5]display interface brief | include Serial
(显示所有接口简要信息,并筛选出名称中包含"Serial"的接口)
[r5]display ip interface brief
(显示设备上所有接口的 IP 配置摘要信息)
R1~R4配置IP地址
要求(2)
PaP认证
[r5]aaa
[r5-aaa]local-user admin password cipher 123321
[r5-aaa]local-user admin service-type ppp
[r5]interface Serial 1/0/0
[r5-Serial1/0/0]link-protocol ppp
[r5-Serial1/0/0]ppp authentication-mode pap
[r1-Serial2/0/0]ppp pap local-user admin password cipher 123321
chap认证
[r5]aaa
[r5-aaa]local-user r2 password cipher 123321
[r5-aaa]local-user r2 service-type ppp
[r5]interface Serial 1/0/1
[r5-Serial1/0/1]ppp authentication-mode chap
[r2-Serial2/0/1]ppp chap user r2
[r2-Serial2/0/1]ppp chap password cipher 123321
HDLC封装
[r5]interface Serial 2/0/0
[r5-Serial2/0/0]undo ip address 35.0.0.5 24
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.5 24
[r5-LoopBack0]int s 2/0/0
[r5-Serial2/0/0]ip address unnumbered interface LoopBack 0
要求(3)
R1和R4 GRE
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0]destination 45.0.0.4
[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 192.168.5.4 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 45.0.0.4
[r4-Tunnel0/0/0]destination 15.0.0.1
R1,R2,R3——MGRE——shortcut方式
[r1]interface Tunnel0/0/1
[r1-Tunnel0/0/1]ip address 192.168.6.1 255.255.255.0
[r1-Tunnel0/0/1]undo rip split-horizon(关闭水平分割)
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 15.0.0.1
[r1-Tunnel0/0/1]nhrp redirect(开启重定向)
[r1-Tunnel0/0/1]nhrp entry multicast dynamic(开启伪广播)
[r2]interface Tunnel0/0/0
[r2-Tunnel0/0/0]ip address 192.168.6.2 255.255.255.0
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source Serial2/0/1
[r2-Tunnel0/0/0]nhrp shortcut(开启接收重定向报文的能力)
[r2-Tunnel0/0/0]nhrp entry 192.168.6.1 15.0.0.1 register
[r3]interface Tunnel0/0/0
[r3-Tunnel0/0/0]ip address 192.168.6.3 255.255.255.0 [r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial2/0/0
[r3-Tunnel0/0/0]nhrp entry 192.168.6.1 15.0.0.1 register
MGRE——ping通
要求(4)RIP全网可达
以[R1]为例
[r1]rip 1
[r1-rip-1]display this
rip 1
version 2
network 192.168.1.0
network 192.168.5.0
network 192.168.6.0
network 192.168.4.0
[R1]和[R4]通过RIP学习到的路由
[R4]的rip路由
要求(5)NAT,转换
以[R1]为例
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]interface s2/0/0
[r1-Serial2/0/0nat outbound 2000