资源描述
CCIE学习OSPF配置 配置拓扑图: 配置要求: 1)证明在不同路由器上OSPF的PID不用匹配也可以建立邻接关系。 2)使用network命令来匹配借口,从而在网络10.0.0.0内触发邻接路由器发现进程。 3)配置S1的RID为7.7.7.7。 4)在骨干LAN上设置合适的优先权值以使得
CCIE学习——OSPF配置
配置拓扑图:
配置要求:
1)证明在不同路由器上OSPF的PID不用匹配也可以建立邻接关系。
2)使用network命令来匹配借口,从而在网络10.0.0.0内触发邻接路由器发现进程。
3)配置S1的RID为7.7.7.7。
4)在骨干LAN上设置合适的优先权值以使得S1和S2成为DR/BDR。
5)在骨干LAN上配置dead间隔为最小(1秒),它是hello间隔的4倍,所以hello间隔为250毫秒。
6)配置区域3为完全NSSA区域,区域4为完全桩区域,区域5为桩区域。
具体配置:
1)R1的配置:
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
ip ospf dead-interval minimal hello-multiplier 4
!
router ospf 1
area 3 nssa no-summary
area 4 stub no-summary
area 5 stub
network 10.1.0.0 0.0.255.255 area 0
network 10.3.0.0 0.0.255.255 area 3
network 10.4.0.0 0.0.255.255 area 4
network 10.5.0.0 0.0.255.255 area 5
2)R2的配置:
interface FastEthernet0/0
ip address 10.1.1.2 255.255.255.0
ip ospf dead-interval minimal hello-multiplier 4
!
router ospf 2
area 5 stub
network 10.1.0.0 0.0.255.255 area 0
network 10.5.25.2 0.0.0.0 area 5
3)R3的配置:
router ospf 1
area 3 nssa no-summary
network 10.0.0.0 0.255.255.255 area 3
4)R4的配置:
router ospf 1
area 4 stub no-summary
network 10.0.0.0 0.255.255.255 area 4
5)S1的配置:
interface Vlan1
ip address 10.1.1.3 255.255.255.0
ip ospf dead-interval minimal hello-multiplier 4
ip ospf priority 255
!
router ospf 1
router-id 7.7.7.7
network 10.1.0.0 0.0.255.255 area 0
6)S2的配置:
interface Vlan1
ip address 10.1.1.4 255.255.255.0
ip ospf dead-interval minimal hello-multiplier 4
ip ospf priority 254
!
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
●OSPF的开销以及怎样重启OSPF进程
IOS确定OSPF接口开销的方法:
1)使用neighbor neighbor cost value命令对每台邻接路由器设置开销(对于允许使用neighbor命令的网络类型)。
2)使用ip ospf cost value接口子命令对每个接口设置开销。
3)开销默认为OSPF参考带宽(默认108)/接口带宽(bps)。
4)在OSPF进程下使用ospf auto-cost reference-bandwidth value命令设置OSPF参考带宽。
注意:IOS的接口带宽的单位是kbps,而auto-cost reference-bandwidth命令的单位是Mbps。当两数相除时,所得结果会向下取整,如100/1.544=64。
如果要重启OSPF进程,可以使用clear ip ospf process命令,路由器会要求你确认,输入“y”即表示确认重启。
●OSPF网络命令的替代
从Cisco IOS 12.3(11)T开始,OSPF的配置中可以完全省去network命令部分,取而代之的是ip ospf process-id area area-id接口子命令。新命令可在接口上激活OSPF并选择区域。例如,前面例子中的network 10.3.0.0 0.0.255.255 area 3命令可以用S0/0.1和e0/0接口上的命令ip ospf 1 area 3替换。
如果使用了从IP地址,network和ip ospf area命令会有一些细微的差别。当使用network命令的时候,OSPF只将匹配命令的从IP子网广播为桩网络,而ip ospf area命令则使所配置接口上的所有从子网广播为桩网络(除非配置了secondaries none参数)。
区域间和外部路由汇总案例 主题关键词:无线网络破解
CISCO允许对地址进行汇总,以通过限制区域间通告的路由来达到节省资源的目的。 CISCO路由器支持两种类型的地址汇总:区域间汇总和外部路由汇总。区域间汇总用于在区域间汇总地址,而外部汇总用于收集到某个Cisco CCNP培训域中的一系列外部路由的汇总。 5.jpg (30.79 KB)2009-10-25 20:38路由器A将通过V。35交叉电缆连接到路由器B上。路由器B作为DCE为路由器A提供时钟。B和C通过以太网集线器连接。C通过交叉电缆连接到 D上。C作为DCE为D提供时钟。D和E通过以太网集线器连接BT无线网络破解教程B和C上的第二个以太网接口将不连到任何地方,所以需要禁用其活跃状 态。这里使用以太网接口代替回送接口的原因是,回送接口在区域边界间是作为/32位网络通告的。 RIP运行D和E之间;E将通告所有连接的子网。D将把学习到的RIP路由重分布到OSPF中,这里不使用相互的重分布,因为不需要它来验证汇总。但是, 如果你希望E能够看见OSPF网络,就需要加上它。所有IP地址分配如图。 //router a int e0 ip addr 192.1.1.2 255.255.255.0 int s0 ip addr 152.1.2.1 255.255.255.252 router ospf 64 network 152.1.2.0 0.0.0.255 area 1 //指定运行OSPF的接口以及该接口位于的区域 //router b int e1/0 ip addr 152.1.1.129 255.255.255.192 no keepalive int e0/0 ip addr 152.1.1.1 255.255.255.128 int s0/0 ip addr 152.1.2.2 255.255.255.252 no ip direct-broadcast no ip mroute-cache no fair-queue clockrate 1000000 router ospf 64 netw 152.1.1.0 0.0.0.255 area 0 netw 152.1.2.0 0.0.0.255 area 1 //router c int e1/0 ip addr 152.1.1.193 255.255.255.192 no ip direct-broadcast no keepalive int e0/0思科培训团购 ip addr 152.1.1.2 255.255.255.128 no ip direct-broadcast int s0/0 ip addr 152.1.3.2 255.255.255.252 no ip direct-broadcast no ip mroute-cache no fair-queue clockrate 1000000 router ospf 64 netw 152.1.1.0 0.0.0.255 area 0 netw 152.1.3.0 0.0.0.255 area 2 //router d int e0 ip addr 130.1.4.1 255.255.255.0 no ip direct-broadcast int s0 ip addr 152.1.3.1 255.255.255.252 no ip direct-broadcast ip ospf interface-retry 0 router ospf 64 redistribute rip metric 10 sunets //重分布RIP到OSPF中(对于此实验,仅仅只需要一个方向上的重分布) network 152.1.3.0 0.0.0.255 area 2 router rip network 130.1.0.0Cisco 模拟器 //router e int lo0 ip addr 130.1.1.1 255.255.255.0 no ip direct-broadcast int lo1 ip addr 130.1.2.1 255.255.255.0 no ip direct-broadcast int lo2 ip addr 130.1.3.1 255.255.255.0 no ip direct-broadcast int lo3 ip addr 130.1.5.1 255.255.255.0 router rip netw 130.1.0.0 //监视和测试配置 show ip ro检测一下路由表 O IA 152.1。1.128/26 [110/65] VIA 152.1.2.2 SERIAL 0 O IA 512.1.1.192/26 [110/94] VIA 152.1.2.2 SERIAL 0 因为所有它些网络都是区域0的一部分。所以区域边界路由器ABR B和C都可以将网络汇总到一个项目152.1。1.0/24中: routerb# router ospf 64思科模拟器 routerb(config-router)# area 0 range 152.1.1.0 255.255.255.0 routerc# router ospf 64 routerc(config-router)# area range 152.1.1.0 255.255.255.0 show ip ro O IA 152.1.1.0/24 [110/84]VIA 152.1.2.2 SERIAL 0 路由器D做为ASBR,将把E学到的RIP重分布到OSPF中。使用SHOW IP RO 130.1.0.0/24 IS SUBNETTED, 7 SUBNETS O E2 130.1。3.0 O E2 130.1。2.0 O E2 130.1。1.0 O E2 130.1。7.0 O E2 130.1。6.0 O E2 130.1。5.0 O E2 130.1。4.0 routerd# router ospf 64 routerd(config-router)# summary-address 130.1.0.0 255.255.248.0 sh ip ro 130.1.0.0/21 IS SUBNETTED,1 SUBNETS O E2 130.1.0.0Cisco ios 下载 思科论坛 Cisco
首先我们还是看一看今天实验的拓扑图吧:
帧中继链接详细拓扑图:
看一看在PacketTracert中我们是如何配置帧中继服务的吧:
接下来看看路由器是如何配置的:
路由器R1的配置:
R1#sh run
Building configuration...
Current configuration : 908 bytes
!
version 12.3
no service password-encryption
!
hostname R1
!
!
!
!
interface FastEthernet0/0
ip address 192.168.20.254 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
no ip address
encapsulation frame-relay ietf
!
interface Serial0/0/0.12 point-to-point
ip address 192.168.3.1 255.255.255.0
frame-relay interface-dlci 102
!
interface Serial0/0/0.13 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 103
!
interface Vlan1
no ip address
shutdown
!
router eigrp 100
network 192.168.20.0
network 192.168.1.0
network 192.168.3.0
auto-summary
!
ip classless
!
!
ip dhcp excluded-address 192.168.20.200 192.168.20.254
!
ip dhcp pool
network 192.168.20.0 255.255.255.0
default-router 192.168.20.254
dns-server 192.168.20.251
!
line con 0
line vty 0 4
login
!
!
end
路由器R2的配置:
R2#sh run
Building configuration...
Current configuration : 908 bytes
!
version 12.3
no service password-encryption
!
hostname R2
!
!
!
!
interface FastEthernet0/0
ip address 192.168.40.254 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
no ip address
encapsulation frame-relay ietf
!
interface Serial0/0/0.21 point-to-point
ip address 192.168.3.2 255.255.255.0
frame-relay interface-dlci 201
!
interface Serial0/0/0.23 point-to-point
ip address 192.168.4.1 255.255.255.0
frame-relay interface-dlci 203
!
interface Vlan1
no ip address
shutdown
!
router eigrp 100
network 192.168.3.0
network 192.168.4.0
network 192.168.40.0
auto-summary
!
ip classless
!
!
ip dhcp excluded-address 192.168.40.200 192.168.40.254
!
ip dhcp pool
network 192.168.40.0 255.255.255.0
default-router 192.168.40.254
dns-server 192.168.20.251
!
line con 0
line vty 0 4
login
!
!
end
路由器R3的配置:
R3#sh run
Building configuration...
Current configuration : 908 bytes
!
version 12.3
no service password-encryption
!
hostname R3
!
!
!
!
interface FastEthernet0/0
ip address 192.168.30.254 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
no ip address
encapsulation frame-relay ietf
!
interface Serial0/0/0.31 point-to-point
ip address 192.168.1.2 255.255.255.0
frame-relay interface-dlci 301
!
interface Serial0/0/0.32 point-to-point
ip address 192.168.4.2 255.255.255.0
frame-relay interface-dlci 302
!
interface Vlan1
no ip address
shutdown
!
router eigrp 100
network 192.168.30.0
network 192.168.4.0
network 192.168.1.0
auto-summary
!
ip classless
!
!
ip dhcp excluded-address 192.168.30.200 192.168.30.254
!
ip dhcp pool
network 192.168.30.0 255.255.255.0
default-router 192.168.30.254
dns-server 192.168.20.251
!
line con 0
line vty 0 4
login
!
!
end
路由器的配置就算是完成了。
在前面几篇文章中我介绍了PacketTracert中服务器的设置,再此不再赘述,在该实验中DNS服务器IP为:192.168.20.251;WEB服务器的IP地址为:192.168.20.253([url][/url])。
下面看看路由表吧:
R1:
R1#SH IP ROUTE
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 not set
C 192.168.1.0/24 is directly connected, Serial0/0/0.13
C 192.168.3.0/24 is directly connected, Serial0/0/0.12
D 192.168.4.0/24 [90/2681856] via 192.168.3.2, 01:01:01, Serial0/0/0.12
[90/2681856] via 192.168.1.2, 01:00:36, Serial0/0/0.13
C 192.168.20.0/24 is directly connected, FastEthernet0/0
D 192.168.30.0/24 [90/2172416] via 192.168.1.2, 01:00:36, Serial0/0/0.13
D 192.168.40.0/24 [90/2172416] via 192.168.3.2, 01:00:58, Serial0/0/0.12
R2:
R2#SH IP ROUTE
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 not set
D 192.168.1.0/24 [90/2681856] via 192.168.3.1, 01:01:37, Serial0/0/0.21
[90/2681856] via 192.168.4.2, 01:01:15, Serial0/0/0.23
C 192.168.3.0/24 is directly connected, Serial0/0/0.21
C 192.168.4.0/24 is directly connected, Serial0/0/0.23
D 192.168.20.0/24 [90/2172416] via 192.168.3.1, 01:01:37, Serial0/0/0.21
D 192.168.30.0/24 [90/2172416] via 192.168.4.2, 01:01:17, Serial0/0/0.23
C 192.168.40.0/24 is directly connected, FastEthernet0/0
R3:
R3#
R3#SH IP ROUTE
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 not set
C 192.168.1.0/24 is directly connected, Serial0/0/0.31
D 192.168.3.0/24 [90/2681856] via 192.168.4.1, 01:02:15, Serial0/0/0.32
[90/2681856] via 192.168.1.1, 01:02:08, Serial0/0/0.31
C 192.168.4.0/24 is directly connected, Serial0/0/0.32
D 192.168.20.0/24 [90/2172416] via 192.168.1.1, 01:02:08, Serial0/0/0.31
C 192.168.30.0/24 is directly connected, FastEthernet0/0
D 192.168.40.0/24 [90/2172416] via 192.168.4.1, 01:02:15, Serial0/0/0.32
通过对路由表的观察我们知道网络已经联通了~
最后我们就在这个模拟器中小小应用一把吧:用PC0访问[url][/url](192.168.1.253)。
实验:OSPF高级配置(三)绝对末节区域
2009-06-26 02:08:38
本篇只介绍绝对末节区域的配置,及实验结果显示。如需查看之前配置,可参看本专题前两篇文章(一)、(二)。 拓扑图: 将区域1配置为绝对末节区域,要R2、R3、R4均设置为末节路由器,并且R2不能转发汇总信息到区域1内(只通告给R3、R4默认路由)。 路由器配置: R2: R2(config)#router ospf 1
R2(config-router)#area 1 stub no-summary R3: R3(config)#router ospf 1
R3(config-router)#area 1 stub R4: R4(config)#router ospf 1
R4(config-router)#area 1 stub 查看末节区域内的路由表: R3#sh 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.17.1 to network 0.0.0.0 C 192.168.30.0/24 is directly connected, FastEthernet1/0
C 192.168.17.0/24 is directly connected, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 192.168.17.1, 00:06:56, FastEthernet0/0 R4#sh 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.30.1 to network 0.0.0.0 C 192.168.30.0/24 is directly connected, FastEthernet0/0
O 192.168.17.0/24 [110/2] via 192.168.30.1, 00:07:13, FastEthernet0/0
O*IA 0.0.0.0/0 [110/3] via 192.168.30.1, 00:07:13, FastEthernet0/0 [/img]..
类别:路由|阅读(232)|回复(1)|赞(0)阅读全文>>
原创
实验:OSPF高级配置(二)路由汇总
2009-06-26 01:53:00
接上篇《实验:OSPF高级配置(一)连通性目标实现》本片主要介绍OSPF地址汇总
在ABR(R2)和ASBR(R5)上实现路由汇总:
路由器关键配置:
R2:
R2(config)#router ospf 1
R2(config-router)#area 1 range 192.168.16.0 0.0.15.255 advertise R5:
R5(config)#router ospf 1
R5(config-router)#summary-address 192.168.64.0 255.255.240.0
查看路由汇总会的路由表:
R1:
R1#sh 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 not set C 192.168.10.0/24 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet1/0
O E2 192.168.64.0/20 [110/20] via 192.168.1.2, 00:02:15, Fa
展开阅读全文