OSPF的完全stub区域

 

1、OSPF的 完全stub区域

 

a、 完全存根区域没有外部路由和域间路由,只能通过默认路由

b、 区域内命令配置area 区域-id stub no-summary






R1配置

en
conf t
hostname R1
 
int loopback 0
ip address 1.1.1.1 255.255.255.0
no shutdown
exit
 
int f0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
 
router ospf 1
network 1.1.1.0 0.0.0.255 area 1
network 192.168.1.0 0.0.0.255 area 1
area 1 stub no-summary
exit
end


 

 

R2配置

en
conf t
hostname R2
 
int loopback 0
ip address 2.2.2.2 255.255.255.0
no shutdown
exit
 
int f0/0
ip address 192.168.1.2 255.255.255.0
no shutdown
exit
 
int f0/1
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
 
router ospf 1
network 2.2.2.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 1
network 192.168.2.0 0.0.0.255 area 0
area 1 stub no-summary
exit
end


 

 

R3配置

en
conf t
hostname R3
 
int loopback 0
ip address 3.3.3.3 255.255.255.0
no shutdown
exit
 
int f0/1
ip address 192.168.2.2 255.255.255.0
no shutdown
exit
 
int f0/0
ip address 202.168.1.1 255.255.255.0
no shutdown
exit
 
router ospf 1
network 192.168.2.0 0.0.0.255 area 0
network 3.3.3.0 0.0.0.255 area 0
redistribute static metric-type 1 subnets
exit
 
 
ip route 4.4.4.0 255.255.255.0 f0/0
end


 

R4配置

en
conf t
hostname R4
 
int f0/0
ip address 202.168.1.2 255.255.255.0
no shutdown
exit
 
int loopback 0
ip address 4.4.4.4 255.255.255.0
no shutdown
exit
 
ip route 0.0.0.0 0.0.0.0 f0/0
end


 

 

 

 

 

R1#show ip route

Codes: C - connected, S - static, I - IGRP,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 - OSPFexternal type 2, E - EGP

       i - IS-IS, 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 192.168.1.2 tonetwork 0.0.0.0

 

    1.0.0.0/24 is subnetted, 1 subnets

C      1.1.1.0 is directly connected, Loopback0

C   192.168.1.0/24 is directly connected, FastEthernet0/0

O*IA0.0.0.0/0 [110/2] via 192.168.1.2, 00:00:02, FastEthernet0/0

R1#

R1#show ip ospf database

            OSPF Router with ID (1.1.1.1) (ProcessID 1)

 

                Router Link States (Area 1)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

1.1.1.1         1.1.1.1         33          0x80000003 0x00500e 2

2.2.2.2         2.2.2.2        33          0x80000002 0x005515 1

 

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum

192.168.1.2     2.2.2.2         33          0x80000001 0x00741f

 

                Summary Net Link States (Area1)

Link ID         ADV Router      Age         Seq#       Checksum

0.0.0.0         2.2.2.2         11          0x80000001 0x0057fe

 

 

 

解释:完全存根区域不能学习外部路由和其他区域的路由信息,只能通过默认路由0.0.0.0

 

 

 

 

R2#show ip ospf database

           OSPF Router with ID (2.2.2.2) (Process ID 1)

 

                Router Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

2.2.2.2         2.2.2.2         49          0x80000004 0x0055f8 2

3.3.3.3         3.3.3.3         49          0x80000004 0x00a29d 2

 

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

192.168.2.2     3.3.3.3         49          0x80000001 0x007f07

 

                Summary Net Link States (Area0)

Link ID         ADV Router      Age         Seq#       Checksum

192.168.1.0     2.2.2.2         44          0x80000001 0x009a51

1.1.1.1         2.2.2.2         44          0x80000002 0x00311f

 

                Router Link States (Area 1)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

2.2.2.2         2.2.2.2         67          0x80000002 0x005515 1

1.1.1.1         1.1.1.1         67          0x80000003 0x00500e 2

 

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum

192.168.1.2     2.2.2.2         67          0x80000001 0x00741f

 

                Summary Net Link States (Area1)

Link ID         ADV Router      Age         Seq#       Checksum

0.0.0.0         2.2.2.2         44          0x80000001 0x0057fe

 

R2#show ip route

Codes: C - connected, S - static, I - IGRP,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 - OSPFexternal type 2, E - EGP

       i - IS-IS, 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

 

    1.0.0.0/32 is subnetted, 1 subnets

O      1.1.1.1 [110/2] via 192.168.1.1, 00:01:05, FastEthernet0/0

    2.0.0.0/24 is subnetted, 1 subnets

C      2.2.2.0 is directly connected, Loopback0

    3.0.0.0/32 is subnetted, 1 subnets

O      3.3.3.3 [110/2] via 192.168.2.2, 00:00:48, FastEthernet0/1

    4.0.0.0/24 is subnetted, 1 subnets

O E1   4.4.4.0 [110/21] via 192.168.2.2, 00:00:48, FastEthernet0/1

C   192.168.1.0/24 is directly connected, FastEthernet0/0

C   192.168.2.0/24 is directly connected, FastEthernet0/1

 

 

解释:非存根区域能学习外部路由和其他区域的路由信息。



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值