汇总
R1(ABR)
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 100
R1(config-router)#area 1 range 172.200.0.0 255.255.252.0 //在ABR上做汇总、如果是在ASBR上做汇总、命令不一样
R1(config-router)#end
R1#sh ip rout
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
O IA 204.0.0.0/24 [110/3] via 202.0.0.2, 00:04:22, FastEthernet0/0
C 201.0.0.0/24 is directly connected, Serial1/0
172.200.0.0/16 is variably subnetted, 7 subnets, 3 masks
O IA 172.200.4.0/22 [110/3] via 202.0.0.2, 00:00:31, FastEthernet0/0
O 172.200.1.1/32 [110/65] via 201.0.0.2, 00:04:22, Serial1/0
O 172.200.0.0/22 is a summary, 00:04:22, Null0
O 172.200.0.1/32 [110/65] via 201.0.0.2, 00:04:22, Serial1/0
O 172.200.3.1/32 [110/65] via 201.0.0.2, 00:04:22, Serial1/0
O 172.200.2.1/32 [110/65] via 201.0.0.2, 00:04:22, Serial1/0
C 172.200.12.0/24 is directly connected, Loopback1
C 202.0.0.0/24 is directly connected, FastEthernet0/0
O IA 203.0.0.0/24 [110/2] via 202.0.0.2, 00:04:22, FastEthernet0/0
R1#
R1#
R1#
--------------------------------------------------------------------------------
RSW2(ASBR) //自治系统边界路由器上做汇总先配置RIPv2、学到外部路由后在做汇总
RSW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW2(config)#
*Mar 1 02:10:57.443: %SYS-5-CONFIG_I: Configured from console by console
RSW2(config)#router rip
RSW2(config-router)#versi
RSW2(config-router)#version 2
RSW2(config-router)#no auto-summary
RSW2(config-router)#net 172.200.4.0
RSW2(config-router)#net 172.200.5.0
RSW2(config-router)#net 172.200.6.0
RSW2(config-router)#net 172.200.7.0
RSW2(config-router)#
RSW2(config-router)#
RSW2(config-router)#net 204.0.0.0
RSW2(config-router)#end
RSW2(config)#no ip route 0.0.0.0 0.0.0.0 204.0.0.2
RSW2(config)#end
RSW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW2(config)#router ospf 100
RSW2(config-router)#summar
RSW2(config-router)#summary-address 172.200.8.0 255.255.252.0 //在ASBR上做汇总
RSW2(config-router)#end
RSW2#sh
*Mar 1 02:23:54.611: %SYS-5-CONFIG_I: Configured from console by cons
RSW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW2(config)#router ospf 100
RSW2(config-router)#redistribute rip
RSW2(config-router)#redistribute rip me
RSW2(config-router)#redistribute rip metric 15 su
RSW2(config-router)#redistribute rip metric 15 subnets //在OSPF的进程下将RIP的路由条目注入到OSPF下
RSW2(config-router)#
--------------------------------------------------------------------------
RSW3:
RSW3#CONF T
Enter configuration commands, one per line. End with CNTL/Z.
RSW3(config)#router rip
RSW3(config-router)#version 2
RSW3(config-router)#no auto-summary
RSW3(config-router)#net 204.0.0.0
RSW3(config-router)#net 172.200.8.0
RSW3(config-router)#net 172.200.9.0
RSW3(config-router)#net 172.200.10.0
RSW3(config-router)#net 172.200.11.0
RSW3(config-router)#
RSW3(config-router)#
RSW3(config-router)#
RSW3(config-router)#
RSW3(config-router)#en d
^
% Invalid input detected at '^' marker.
RSW3(config-router)#end
RSW3#sh ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 17 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet1/2 2 2
Loopback1 2 2
Loopback2 2 2
Loopback3 2 2
Loopback4 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.200.0.0
204.0.0.0
Routing Information Sources:
Gateway Distance Last Update
204.0.0.1 120 00:00:14
Distance: (default is 120)
RSW3#
-----------------------------------------------------------------
OSPF发布默认路由
RSW2(ASBR):
RSW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW2(config)#
*Mar 1 02:41:10.535: %SYS-5-CONFIG_I: Configured from console by console
RSW2(config)#
RSW2(config)#no router rip //先取消RIP的运行
RSW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW2(config)#
*Mar 1 02:43:38.527: %SYS-5-CONFIG_I: Configured from console by console
RSW2(config)#ip route 0.0.0.0 0.0.0.0 204.0.0.2
RSW2#
RSW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW2(config)#router ospf 100
RSW2(config-router)#default-information or
RSW2(config-router)#default-information originate always //将默认路由重分布进OSPF、目的是为了其它路由器能学习到。
RSW2(config-router)#
--------------------------------------------------------------------------------
RSW3:
RSW3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RSW3(config)#no router rip
RSW3(config)#
本文出自 “技术成就梦想” 博客,谢绝转载!