一、簡介:bash
在一個大型的OSPF網絡中,每每會有不少的路由條目,這無疑會給網絡的管理帶來不便,同時也影響路由器的效率,對於一些連續的子網,咱們能夠在區域邊界路由器(ABR)上將他們彙總成一條路由,這樣作既減小了路由條目,又不會影響網絡的連通性。網絡
二、拓撲規劃:ide
三、IP地址規劃:oop
設備ui |
接口spa |
IP地址及其子網掩碼blog |
R1(Quidway S3526)接口 |
E0/9ip |
192.168.1.1/24ci |
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 |
四、案例實施:
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<G@HG-JEXJQ<%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通: