公   告
日   历
日   志
回   复
留   言
链   接
信   息
搜   索
登   陆
配置OSPF虚电路
Posted by sergent 2008-7-1 8:38:36

 

在路由器R1上进行配制

R1(config)#int s 2/1

R1(config-if)#ip add 12.0.0.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#exit

R1(config)#router ospf 1

R1(config-router)#network 12.0.0.1 0.0.0.0 area 0

R1(config-router)#end

 

R1#

     34.0.0.0/24 is subnetted, 1 subnets

O IA    34.0.0.0 [110/192] via 12.0.0.2, 00:04:28, Serial2/1

     23.0.0.0/24 is subnetted, 1 subnets

O IA    23.0.0.0 [110/128] via 12.0.0.2, 00:04:28, Serial2/1

     12.0.0.0/24 is subnetted, 1 subnets

C       12.0.0.0 is directly connected, Serial2/1

     45.0.0.0/24 is subnetted, 1 subnets

O       45.0.0.0 [110/256] via 12.0.0.2, 00:04:28, Serial2/1

45.0.0.0/24是通过虚电路学习到另外一个自治区域area0的路由

R1#

 

在路由器R2上进行配制

 

R2(config)#int s 2/1

R2(config-if)#ip add 12.0.0.2 255.255.255.0

R2(config-if)#no sh

R2(config-if)#int s 2/2

R2(config-if)#ip add 23.0.0.2 255.255.255.0

R2(config-if)#no sh

R2(config-if)#exit

R2(config)#router ospf 1

R2(config-router)#network 12.0.0.2 0.0.0.0 area 0

R2(config-router)#network 23.0.0.2 0.0.0.0 area 1

R2(config-router)#end

R2(config)#router ospf 1

R2(config-router)#router-id 99.99.99.99

配置R4router-id

Reload or use "clear ip ospf process" command, for this to take effect

R2(config-router)#area 1 virtual-link 88.88.88.88

配置R4R5之间的虚电路,为两个area0之间打通一个隧道

R2(config-router)#end

 

R2#sh ip route

     34.0.0.0/24 is subnetted, 1 subnets

O       34.0.0.0 [110/128] via 23.0.0.3, 00:08:21, Serial2/2

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, Serial2/2

     12.0.0.0/24 is subnetted, 1 subnets

C       12.0.0.0 is directly connected, Serial2/1

     45.0.0.0/24 is subnetted, 1 subnets

O       45.0.0.0 [110/192] via 23.0.0.3, 00:08:11, Serial2/2

R2#

 

在路由器R3上进行配制

 

R3(config)#int s 2/1

R3(config-if)#ip add 23.0.0.3 255.255.255.0

R3(config-if)#no sh

R3(config-if)#int s 2/2

R3(config-if)#ip add 34.0.0.3 255.255.255.0

R3(config-if)#no sh

R3(config-if)#router ospf 1

R3(config-router)#network 34.0.0.3 0.0.0.0 area 1

R3(config-router)#network 23.0.0.3 0.0.0.0 area 1

R3(config-router)#end

 

R3#sh ip route

     34.0.0.0/24 is subnetted, 1 subnets

C       34.0.0.0 is directly connected, Serial2/2

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, Serial2/1

     12.0.0.0/24 is subnetted, 1 subnets

O IA    12.0.0.0 [110/128] via 23.0.0.2, 00:10:22, Serial2/1

     45.0.0.0/24 is subnetted, 1 subnets

O IA    45.0.0.0 [110/128] via 34.0.0.4, 00:10:22, Serial2/2

这两条路由是通过ABR路由器R2R4学习到

R3#

 

在路由器R4上进行配制

 

R4(config)#int s 2/1

R4(config-if)#ip add 34.0.0.4 255.255.255.0

R4(config-if)#no sh

R4(config-if)#exit

R4(config)#int s 2/2

R4(config-if)#ip add 45.0.0.4 255.255.255.0

R4(config-if)#no sh

R4(config-if)#exit

R4(config)#router ospf 1

R4(config-router)#network 45.0.0.4 0.0.0.0 area 0

R4(config-router)#network 34.0.0.4 0.0.0.0 area 1

R4(config-router)#end

R4(config)#router ospf 1

R4(config-router)#router-id 88.88.88.88

配置R4router-id

Reload or use "clear ip ospf process" command, for this to take effect

R4(config-router)#area 1 vi

R4(config-router)#area 1 virtual-link 99.99.99.99

配置R4R5之间的虚电路,为两个area0之间打通一个隧道

R4(config-router)#end

 

R4#sh ip route

     34.0.0.0/24 is subnetted, 1 subnets

C       34.0.0.0 is directly connected, Serial2/1

     23.0.0.0/24 is subnetted, 1 subnets

O       23.0.0.0 [110/128] via 34.0.0.3, 00:11:03, Serial2/1

     12.0.0.0/24 is subnetted, 1 subnets

O       12.0.0.0 [110/192] via 34.0.0.3, 00:10:53, Serial2/1

     45.0.0.0/24 is subnetted, 1 subnets

C       45.0.0.0 is directly connected, Serial2/2

R4#

 

在路由器R5上进行配制

 

R5(config)#int s 2/2

R5(config-if)#ip add 45.0.0.5 255.255.255.0

R5(config-if)#no sh

R5(config-if)#exit

R5(config)#router ospf 1

R5(config-router)#network 45.0.0.5 0.0.0.0 area 0

R5(config-router)#end

 

R5# sh ip route

     34.0.0.0/24 is subnetted, 1 subnets

O IA    34.0.0.0 [110/128] via 45.0.0.4, 00:06:05, Serial2/2

     23.0.0.0/24 is subnetted, 1 subnets

O IA    23.0.0.0 [110/192] via 45.0.0.4, 00:06:05, Serial2/2

     12.0.0.0/24 is subnetted, 1 subnets

O       12.0.0.0 [110/256] via 45.0.0.4, 00:06:05, Serial2/2

45.0.0.0/24是通过虚电路学习到另外一个自治区域area0的路由

     45.0.0.0/24 is subnetted, 1 subnets

C       45.0.0.0 is directly connected, Serial2/2

发表评论:

    昵称:
    密码:
    主页:
    标题:
Powered by Oblog.