当前位置:网站首页>HCIP实验(02)
HCIP实验(02)
2022-07-25 09:47:00 【雨天_】


1.配置环回和接口的IP地址
[r1]int LoopBack 0
[r1-LoopBack0]ip address 192.168.1.1 24
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 14.1.1.1 24
[r2]int LoopBack 0
[r2-LoopBack0]ip address 192.168.2.1 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 24.1.1.1 24
[r3]int LoopBack 0
[r3-LoopBack0]ip address 192.168.3.1 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 34.1.1.1 24
[r4]int LoopBack 0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 14.1.1.2 24
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 24.1.1.2 24
[r4]int g0/0/2
[r4-GigabitEthernet0/0/2]ip address 34.1.1.2 24
(测试)


2.配置缺省路由,达到公网通
[r1]ip route-static 0.0.0.0 0 14.1.1.2
[r2]ip route-static 0.0.0.0 0 24.1.1.2
[r3]ip route-static 0.0.0.0 0 34.1.1.2
(测试)


3.构建MGRE环境
[r1]interface Tunnel0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp (工作模式:点到多点)
(启动nhrp,作为nhrp的服务端)
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]source 14.1.1.1
[r2]int Tunnel0/0/0
[r2-Tunnel0/0/0]ip add 10.1.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
(找到10.1.1.1进行注册,用其公有ip进行注册)
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 register
[r2-Tunnel0/0/0]nhrp network-id 100
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 10.1.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 register
[r3-Tunnel0/0/0]nhrp network-id 100
(查看)

(测试)



4.宣告环回(私网全网通)
[r1]rip 1
[r1-rip-1]ver 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 10.0.0.0
[r2]rip 1
[r2-rip-1]ver 2
[r2-rip-1]network 10.0.0.0
[r2-rip-1]network 192.168.2.0
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 10.0.0.0
[r3-rip-1]network 192.168.3.0
(测试)

(R1将路由共享给R2和R3,R2和R3之间不共享路由)

解决办法:关闭R1的 水平分割
[r1]int t0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon
(测试)

边栏推荐
猜你喜欢
随机推荐
Angr (x) - official document (Part1)
ONNX Runtime介绍
Configure FTP virtual user and access control
Modify MySQL group error expression 1 of select list is not in group
Implementation of recommendation system collaborative filtering in spark
4. Children next door will know all kinds of shell symbols {}[], etc
Set up lnmp+discuz Forum
Wechat applet wxprase contains files that cannot be solved by clicking
使用Three.js实现炫酷的赛博朋克风格3D数字地球大屏
Software test notes, test case design
21. Merge Two Sorted Lists
Selenium waits for the occurrence of elements and the conditions under which the waiting operation can be performed
我为OpenHarmony 写代码,战“码”先锋第二期正式开启!
Idea overall font size modification
Angr(一)——安装
2. Introduce the deployment of lamp platform +discuz Forum
2021 致景笔试总结
Notes on building dompteur container
1. Shell programming specifications and variables
Fastdfs offline deployment (Graphic)









