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

拓扑设计和IP地址规划

1.为R4进行HDLC封装、PAP认证、CHAP认证以及环回配置
[r4]int s4/0/0
(进行HDLC封装)
[r4-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[r4-Serial4/0/0]ip address 14.1.1.2 24
(创建账号,账号的功能是进行PPP封装)
[r4]int s3/0/0
[r4-Serial3/0/0]ppp authentication-mode pap
[r4-Serial3/0/0]ip add 24.1.1.1 24
[r4]aaa
[r4-aaa]local-user sss privilege level 15 password cipher 123456
Info: Add a new user.
[r4-aaa]local-user sss service-type ppp
[r4]int s4/0/1
[r4-Serial4/0/1]ppp authentication-mode chap
[r4-Serial4/0/1]ip add 34.1.1.2 24
[r4]aaa
[r4-aaa]local-user aaa privilege level 15 password cipher 123456
Info: Add a new user.
[r4-aaa]local-user aaa service-type ppp
[r4]int LoopBack 0
[r4-LoopBack0]ip address 4.4.4.4 24
(查看)

检测

(默认两边都是PPP封装,处于 up 状态)
[r4]int s3/0/0
[r4-Serial3/0/0]shutdown
[r4-Serial3/0/0]undo shutdown
[r4]int s4/0/1
[r4-Serial4/0/1]shutdown
[r4-Serial4/0/1]undo shutdown
(查看)

2.对私网路由器配置
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[r1]int s4/0/0
[r1-Serial4/0/0]ip address 14.1.1.1 24
[r1-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[r2]int s4/0/0
[r2-Serial4/0/0]ip address 24.1.1.1 24
[r2-Serial4/0/0]ppp pap local-user sss password cipher 123456
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add
[r3-GigabitEthernet0/0/0]ip address 192.168.3.1 24
[r3]int s4/0/0
[r3-Serial4/0/0]ip address 34.1.1.1 24
[r3-Serial4/0/0]ppp chap user aaa
[r3-Serial4/0/0]ppp chap password cipher 123456
(验证)



3.给电脑配置IP地址


4.配置缺省路由
[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
(验证)


5.建立MGRE环境(MGRE环境--NBMA网段)
[r1]int t0/0/0
[r1-Tunnel0/0/0]ip address 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 14.1.1.1
(启动nhrp,作为nhrp的服务端)
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp network-id 100
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip add 10.1.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s4/0/0
(找到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 t0/0/0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]ip add 10.1.1.3 24
[r3-Tunnel0/0/0]source s4/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
(查看)




(R2 ping 10.1.1.3 之后)

6.宣告(RIP)
[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 192.168.2.0
[r2-rip-1]network 10.0.0.0
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 10.0.0.0
(R1将路由共享给R2和R3,R2和R3之间不共享路由)
(关闭水平分割)
[r1]int t0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon 
优化:手写静态路由
[r3]ip route-static 192.168.2.0 24 10.1.1.2
[r2]ip route-static 192.168.3.0 24 10.1.1.3
验证

7.进行NAT(将源IP变成公有IP)
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2]int s4/0/0
[r2-Serial4/0/0]nat outbound 2000
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
(验证)


边栏推荐
- Selenium waits for the occurrence of elements and the conditions under which the waiting operation can be performed
- 8. SHELL file processing Three Musketeers sed
- 10.expect免交互
- FRP reverse proxy deployment
- 2.介绍部署LAMP平台+DISCUZ论坛
- Trojang attack on neural networks paper reading notes
- Attention is all you need paper intensive reading notes transformer
- Upgrade glibc 2.29 checking LD_ LIBRARY_ Path variable... Contains current directory error solution
- 配置FTP虚拟用户及访问控制
- 3、 Five operation modes of unittest test cases
猜你喜欢

Pow(x,n)

Angr (VI) -- angr_ ctf

Fastdfs offline deployment (Graphic)

Vs Code connects to the remote jupyter server

js 哈希表 02

Vscode latex workshop set xelatex compilation

3. Like you, DNS domain name resolution service!!!

After switching the shell command line terminal (bash/zsh), CONDA cannot be used: command not found

Angr (IX) -- angr_ ctf

6.PXE结合Kickstart原理和配置实现无人值守自动装机
随机推荐
Storage, computing and distributed computing (collection and sorting is suitable for Xiaobai)
What is the meaning of ordinary people's life?
4.FTP服务配置与原理
5.这简单的 “echo” 用法隔壁小孩能不会吗!
21. Merge Two Sorted Lists
UE4 loadingscreen dynamic loading startup animation
Bug elements
4、 Testfixture test fixture, or test firmware
Erlang(离线部署)
思路再次完美验证!加息临近,趋势明了,好好把握这波行情!
C# 类库的生成,使用类库对象对DataGridView 进行数据绑定
美国机场围棋风格可视化专题图:ArcGIS Pro版本
Qt | 鼠标事件和滚轮事件 QMouseEvent、QWheelEvent
Using numpy for elevation statistics and visualization
For cycle: daffodil case
3. Believe you can understand! Circular statements and functions of shell scripts, arrays, bubble sorting
Configuration of static routes (take Huawei ENSP as an example)
淦,为什么 '𠮷𠮷𠮷' .length !== 3 ??
6.shell之正则表达式
Virtual private line network deployment