ospf 默认路由综合配置
Cisco ospf 默认路由综合实验
一、实验拓扑:
R1、R2模拟内部网络路由器,运行OSPF协议,R3模拟互联网路由器,现需要通过R2上配置默认路由,让R1能学习到R3的3.3.3.3路由条目。
二、实验步骤:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
R2:
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
duplex auto
interface Serial1/0
ip address 221.16.1.1 255.255.255.252
serial restart-delay 0
router ospf 10
router-id 2.2.2.2
log-adjacency-changes
network 192.168.1.0 0.0.0.255 area 0
default-information originate always
R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Serial0/0
ip address 221.16.1.2 255.255.255.252
serial restart-delay 0
ip route 0.0.0.0 0.0.0.0 Serial0/0
查看R1和R2的邻接关系和路由表:
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:35 192.168.1.2 FastEthernet0/0
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 192.168.1.2, 00:02:07, FastEthernet0/0
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:35 192.168.1.1 FastEthernet0/0
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 192.168.1.1, 00:01:53, FastEthernet0/0
221.16.1.0/30 is subnetted, 1 subnets
C 221.16.1.0 is directly connected, Serial1/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 is directly connected, Serial1/0
测试从R1到3.3.3.3的网络连通性:
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 408/508/640 ms
2、通过上个实验观察到R1学到O*E2的度量值为1,现在扩大度量值:
R2上配置:
R2(config)#router ospf 10
R2(config-router)#default-information originate always metric 30
测试R1路由表:
R1#show ip route ospf
O*E2 0.0.0.0/0 [110/30] via 192.168.1.2, 00:00:13, FastEthernet0/0 //度量值变成30了,当然R1 PING 3.3.3.3肯定还是通的。
3、通过上个实验观察到R1的OE2度量值变成30,现在需要把OE2变成OE1,配置:
R2(config)#router ospf 10
R2(config-router)#default-information originate always metric-type 1 metric 30
查看R1路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O*E1 0.0.0.0/0 [110/31] via 192.168.1.2, 00:00:11, FastEthernet0/0
//31的度量值的算法:宣告外部路由进来为30,从R2到192.168.1.1的METRIC=1,根据OE1的度量值算法为:内部到ASBR+外部路径度量值=31
R2#show ip ospf database router
LS age: 1356
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x64D8
Length: 48
Number of Links: 2
Link connected to: a Transit Network
(Link ID) Designated Router address: 192.168.1.1
(Link Data) Router Interface address: 192.168.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 1
4、现在R3上增加网段4.4.4.0/24,R1 PING 3.3.3.0/24,4.4.4.0/24情况:
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 364/471/568 ms
R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 284/417/620 ms
R2上配置路由策略过滤掉3.3.3.0/24网段:
R2(config)#access-list 1 permit 3.3.3.0 0.0.0.255
R2(config)#route-map ccna permit 10
R2(config-route-map)#match ip address 1
R2(config-route-map)#set metr
R2(config-route-map)#set metric 30
R2(config-route-map)#end
R2(config)#router ospf 10
R2(config-router)#no default-information originate always route-map ccna
R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 284/417/620 ms
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O*E1 0.0.0.0/0 [110/31] via 192.168.1.2, 00:02:51, FastEthernet0/0
转载于:https://blog.51cto.com/zxa09/982550
ospf 默认路由综合配置相关推荐
- CCIE-LAB-第十六篇-NAT+OSPF下发默认路由+校验配置(模块一结束篇章)
CCIE-LAB-第十六篇-NAT+OSPF下发默认路由+校验配置(模块一结束篇章) 实际中,思科只会给你5个小时去做下面的全部配置 这个是CCIE-LAB的拓扑图 问题 翻译: 根据这些要求1为FA ...
- 基于【IPv6】静态路由和默认路由的配置
基于IPv6静态路由和默认路由的配置 实验环境: 实验背景:在路由器R1上配置3个环回接口IPv6地址,分别模拟三个不同的IPv6前缀,作为IPV6目标网络,然后,在路由器R2上为三个IPv6前缀配置 ...
- 计算机网络实训报告动态路由,实验报告OSPF动态路由的配置
<实验报告OSPF动态路由的配置>由会员分享,可在线阅读,更多相关<实验报告OSPF动态路由的配置(5页珍藏版)>请在人人文库网上搜索. 1.淮海工学院计算机工程学院实验报告书 ...
- Cisco PT模拟实验(14) 路由器OSPF动态路由的配置
Cisco PT模拟实验(14) 路由器OSPF动态路由的配置 实验目的: 掌握OSPF动态路由选择协议的配置方法 掌握路由选择表中的OSPF路由描述 熟悉路由选择和分组转发的原理及过程 实验背景: ...
- 【计算机网络】实验六路由器静态路由、默认路由的配置
实验六 路由器静态路由.默认路由的配置 一.实验目标 掌握静态路由.默认路由的配置方法和技巧: 掌握路由配置实现网络的连通性方法: 熟悉广域网线缆的连接方式: 二.实验背景 郑州某中学有2个校区,每 ...
- 静态路由和默认路由的配置实战及其区别--很详细哦
静态路由和默认路由的配置实战及其区别 一:实验拓扑 二:实验要求 1:实现全网互通 2:实现静态路由与动态路由的区别认识 3:熟练掌握其配置命令 三:实验步骤 第一步:ip地址.环回扣的划分 R1 ...
- 路由器的工作原理、静态路由和默认路由的配置
目录 一.路由器的工作原理 1.路由概述 2.路由器的工作原理 二.路由表的形成 1.路由表 2.路由表的形成 三.静态路由和默认路由 1.静态路由 2.动态路由 3.默认路由 4.小结 四.配置静态 ...
- 静态路由及默认路由——基本配置
原理简述: 1.静态路由:是指用户或网络管理员手工配置的路由信息.当网络拓扑结构或链路状态发生改变时,需要网络管理员手工配置静态路由信息. 相比较动态路由协议,静态路由无需频繁的交换各自的路由表,配置 ...
- cisco路由器基本实验之二 默认路由的配置(Boson NetSim)
昨天做的是静态路由的配置,按照Boson NetSim上面写的实验计划,后面还有一系列的实验,如下图所示:昨天做的就是Laber4 静态路由的配置,今天则是Laber5,默认路由的配置,还是和昨天一样 ...
最新文章
- 线性代数 2021-2022-1 考试要点
- android 仿京东toolbar,仿京东商城系列2------自定义toolbar
- 怎么显示全部背景图片_Windows 聚焦图片在锁屏界面和登陆界面没有显示
- 统计学习方法之机器学习相关理论
- python 用队列实现栈
- seer文献_文献解读 | 师兄带你读一篇免疫浸润3分文章!
- python web前端开发面试_面试前端,听听别人怎么说!
- MySQL入门之事件
- 事件驱动的javascript
- python映射的主要特点_30 个 Python 语言的特点技巧
- [android源码分析]sdp Server的启动分析
- python tkinter-单选、多选
- 使用Python监控SNMP Trap并获取OSPF邻居状态
- import jpype报错 解决办法
- java将多个excel合并为一个
- 2021-6-25 组态王与modbus rtu从机STM32精英开发板通信
- 轻型机械臂模块关节机械设计方案
- android共享局域网打印,Android 浅谈同一局域网下使用WiFi连接打印机
- TJOI2015 弦论
- 海尔简爱s11装Linux,海尔简爱S11值得买吗 海尔简爱S11全面深度评测详解