当前位置:网站首页>HCIP实验(06)
HCIP实验(06)
2022-08-03 07:57:00 【雨天_】
1.配置IP地址和环回
[r1]int lo0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 13.1.1.1 24
[r2]int lo0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 24.1.1.1 24
[r3]int lo0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 13.1.1.2 24
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
[r4]int lo0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 24.1.1.2 24
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[r4]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 45.1.1.1 24
[r5]int lo0
[r5-LoopBack0]ip add 5.5.5.5 24
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.1.1.2 24
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 56.1.1.1 24
[r6]int lo0
[r6-LoopBack0]ip add 6.6.6.6 24
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 56.1.1.2 24
[r6]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 67.1.1.1 24
[r7]int lo0
[r7-LoopBack0]ip add 7.7.7.7 24
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 67.1.1.2 24
(测试)
2.进行OSPF和RIP宣告
[r1]rip 1
[r1-rip-1]ver 2
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 13.0.0.0
[r1-rip-1]network 1.0.0.0
[r2]rip 1
[r2-rip-1]ver 2
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 2.0.0.0
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 13.0.0.0
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 24.1.1.1 0.0.0.0
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 24.1.1.2 0.0.0
[r4-ospf-1-area-0.0.0.0]network 45.1.1.1 0.0.0.0
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 45.1.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 56.1.1.1 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 56.1.1.2 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 67.1.1.1 0.0.0.0
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 67.1.1.2 0.0.0.0
(测试)
3.解决环路问题
(1)形成环路
(导入R7的直连路由)
[r7]ospf 1
[r7-ospf-1]import-route direct
(测试)
[r2]ospf 1
[r2-ospf-1]import-route rip
[r2]rip 1
[r2-rip-1]import-route ospf 1
[r3]ospf 1
[r3-ospf-1]import-route rip
[r3]rip 1
[r3-rip-1]import-route ospf 1
(查看)
(形成了环路)
(R5)
(形成等开销负载均衡)
(2)解决环路
(修改RIP优先级,让路由去不了R3)
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 7.7.7.0 0
[r3]route-policy a permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match acl 2000
[r3-route-policy]apply preference 151
[r3]rip 1
[r3-rip-1]preference route-policy a
(查看)
(3)测试
4.解决R2和R3的环回
[r3]int lo0
[r3-LoopBack0]ip add 3.3.3.3 32
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1] shutdown
[r1-GigabitEthernet0/0/1]undo shutdown
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1] shutdown
[r3-GigabitEthernet0/0/1]undo shutdown
(查看)
[r3]acl 2001
[r3-acl-basic-2001]rule permit source 2.2.2.0 0
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]rip metricout 2001 2
(查看)
5.修改偏移列表
[r2]acl 2001
[r2-acl-basic-2001]rule permit source 3.3.3.3 0
[r2-acl-basic-2001]rule permit source 34.1.1.0 0
[r2]int g0/0/0
[r2-GigabitEtherent0/0/0]rip metricout 2001 2
[r3]acl 2001
[r3-acl-basic-2001]rule permit source 24.1.1.0 0
(查看)
6.修改类型
[r2]ip ip-perfix q permit 12.1.1.0 24
[r2]ip ip-perfix q permit 2.2.2.0 24
[r2]route-pilcy w permit node 10
[r2-route-policy]if-match ip-perfix q
[r2-route-policy]apply cost-type type-1
[r2]route-policy w permit node 20
[r2]ospf 1
[r2-ospf-1]import-route rip route-policy w
(查看)
[r3]ip ip-prefix q permit 13.1.1.0 24
[r3]route-policy w permit node 10
[r3-route-policy]if-match ip-prefix q
[r3-route-policy]apply cost-type type-1
[r3]route-policy w permit node 20
[r3]ospf 1
[r3-ospf-1]import-route rip route-policy w
(查看)
边栏推荐
猜你喜欢
随机推荐
Docker启动mysql
netstat 及 ifconfig 是如何工作的。
Postman will return to results generated CSV file to the local interface
千万级别的表分页查询非常慢,怎么办?
如何使用电子邮件营销在五个步骤中增加产品评论
redis AOF持久化个人理解
循环神经网络RNN基础《PyTorch深度学习实践》
word之个人设置
thop 使用心得
面试介绍项目经验(转)
How to choose a reliable and formal training institution for the exam in September?
IDEA2021.2安装与配置(持续更新)
uni-app 顶部选项卡吸附效果 demo(整理)
Shell运维开发基础(一)
day12---接口和协议
线性表
Logic Pro X built-in sound library list
Logic Pro X自带音色库列表
Exch:重命名或删除默认邮箱数据库
36氪详情页AES