一、路由器中OSPF的汇总
1)各个路由器的配置
R1
R1(config)#int lo0
R1(config-if)#ip addr 172.16.8.1 255.255.255.0
R1(config-if)#int lo1
R1(config-if)#ip addr 172.16.9.1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip addr 172.16.10.1 255.255.255.0
R1(config-if)#int lo3
R1(config-if)#ip addr 172.16.11.1 255.255.255.0
R1(config-if)#int s1/0
R1(config-if)#ip addr 202.110.100.1   255.255.255.0
R1(config-if)#encap hdlc
R1(config-if)#clock rate 56000
R1(config-if)#no shut
R1(config-if)#exit
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

R1(config)#router ospf 10
R1(config-router)#net 172.16.0.0    0.0.255.255 area 0
R1(config-router)#net 202.110.100.0    <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0.0.0.255 area 0

 

       R2
R2(config)#int s1/0
R2(config-if)#ip addr 202.110.100.2    255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#no shut
R2(config-if)#int s1/1
R2(config-if)#ip addr 202.110.101.1    255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#clock rate 56000
R2(config-if)#no shut
R2(config-if)#exit

 

R2(config)#router ospf 10
R2(config-router)#net 202.110.100.0    0.0.0.255 area 0
R2(config-router)#net 202.110.101.0     0.0.0.255 area 1

 

       R3

R3(config)#int s1/1
R3(config-if)#ip addr 202.110.101.2      255.255.255.0
R3(config-if)#encap hdlc
R3(config-if)#no shut
R3(config-if)#exit

 

R3(config)#router ospf 10
R3(config-router)#net 202.110.101.0     0.0.0.255 area 1

 

2)在R2ABR)上做路由汇总
R2(config)#router ospf 10
       R2(config-router)#area 0 range 172.16.8.0   255.255.252.0

 

 

 

二、路由器ID的更改

 

 

R1#show ip ospf

 

      Routing Process "ospf 10" with ID 202.110.100.1

 

R1#config t
R1(config)#int lo1
R1(config-if)#ip addr 1.1.1.1 255.0.0.0
R1(config-if)#exit
R1(config)#router ospf 10
R1(config-router)#router-id 1.1.1.1
R1(config-router)#^Z
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
R1#show ip ospf
     
      Routing Process "ospf 10" with ID 1.1.1.1