1、简介:
在一个大型的OSPF网络中,往往会有很多的路由条目,这无疑会给网络的管理带来不便,同时也影响路由器的效率,对于一些连续的子网,我们可以在区域边界路由器(ABR)上将他们汇总成一条路由,这样做既减少了路由条目,又不会影响网络的连通性。
2、拓扑规划:
3、IP地址规划:
设备 |
接口 |
IP地址及其子网掩码 |
R1(Quidway S3526) |
E0/9 |
192.168.1.1/24 |
Loopback 1 |
172.16.4.1/24 |
|
172.16.5.1/24 |
||
172.16.6.1/24 |
||
172.16.7.1/24 |
||
R2(Quidway S3526) |
E0/9 |
192.168.1.2/24 |
E0/17 |
192.168.2.1/24 |
|
R3(Quidway 2600s) |
E1 |
192.168.2.2/24 |
E0 |
192.168.3.1/24 |
|
R4(Quidway AR-28-31) |
E0/0 |
192.168.3.2/24 |
4、案例实施:
1)、配置IP地址与ospf区域信息
R1配置:
sysname R1 local-user admin password cipher %K/T]3SXOF$[FR9&2:*aF1!! service-type telnet level 3 user-interface vty 0 4 authentication-mode scheme vlan 10 # interface Vlan-interface10 ipaddress 192.168.1.1 255.255.255.0 interface Ethernet0/9 portaccess vlan 10 interface LoopBack1 ipaddress 172.16.4.1 255.255.255.0 ipaddress 172.16.5.1 255.255.255.0 sub #sub表示启用多个IP ipaddress 172.16.6.1 255.255.255.0 sub ipaddress 172.16.7.1 255.255.255.0 sub ospf area0.0.0.2 network 192.168.1.1 0.0.0.0 network 172.16.4.1 0.0.0.0 network 172.16.5.1 0.0.0.0 network 172.16.6.1 0.0.0.0 network 172.16.7.1 0.0.0.0
R2配置:
sysname R2 local-user admin password cipherQ_E4WOL3a+&AYP51,NO;"A!! service-type telnet level 3 user-interface vty 0 4 authentication-mode scheme vlan 10 vlan 20 # interface Vlan-interface10 ipaddress 192.168.1.2 255.255.255.0 # interface Vlan-interface20 ipaddress 192.168.2.1 255.255.255.0 interface Ethernet0/9 portaccess vlan 10 interface Ethernet0/17 portaccess vlan 20 ospf area0.0.0.2 network 192.168.1.2 0.0.0.0 # area0.0.0.0 network 192.168.2.1 0.0.0.0
R3配置:
local-user admin service-type administratorpassword cipher /P.G‘J<[email protected]<%DJQ!! sysname R3 interface Ethernet0 ip address 192.168.3.1 255.255.255.0 ospf enable area 0.0.0.1 ! interface Ethernet1 ip address 192.168.2.2 255.255.255.0 ospf enable area0.0.0.0 ospf enable
R4配置:
sysname R4 local-user admin password cipher.]@USE=B,53Q=^Q`MAF4<<"TX$_S#6.NM(0=0\)*5WWQ=^Q`MAF4<<"TX$_S#6.N service-type telnet terminal level 3 user-interface vty 0 4 authentication-mode scheme interface Ethernet0/0 ipaddress 192.168.3.2 255.255.255.0 ospf 1 area0.0.0.1 network 192.168.3.2 0.0.0.0
2)、在ABR(区域边界路由器)上做路由汇总,减少路由表条目
在R4上查看完整的路由表:
在R2的区域2上做路由汇总:
ospf area0.0.0.2 network 192.168.1.2 0.0.0.0 abr-summary 172.16.4.0 255.255.252.0 advertise #表示在ABR上做汇总,汇总后的网段和子网掩码
在R4上查看路由表:
汇总后只能看到172.16.4.0/22,但是其内含的网段依然能ping通:
时间: 2024-10-10 21:44:23