NSSA区域处于鸿沟引进默许路由该怎样处理呢?51CTO博客 - 乐橙lc8

NSSA区域处于鸿沟引进默许路由该怎样处理呢?51CTO博客

2019-01-03 10:43:08 | 作者: 鸿飞 | 标签: 路由,默许,信息 | 浏览: 1198

如下图的拓扑所示,

内部网络的路由衔接internet上,鸿沟的路由器的内部网口归于ospf的NSSA区域,路由器上装备相应的默许路由指向internet的下一跳。内部网络中跑着不同协议的路由信息,确保内部的OSPF区域傍边还需要引进其他类型的路由信息;而且要确保内部网络可以正常拜访internet(在鸿沟的路由器上做NAT暂时疏忽,确保网络的连通性 )

怎样确保内部的网络可以正常拜访internet呢?

详细的装备信息如下:

R5的路由装备信息:

router ospf 1
 log-adjacency-changes
 area 1 nssa
 redistribute connected subnets
 redistribute static subnets
 network 192.168.4.0 0.0.0.255 area 1
ip route 0.0.0.0 0.0.0.0 192.168.5.6

R4的路由装备信息:

router ospf 1
 log-adjacency-changes
 area 1 nssa default-information-originate no-summary
 network 4.4.4.0 0.0.0.255 area 1
 network 192.168.3.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 1
!

R3的路由装备信息:

router ospf 1
 log-adjacency-changes
 redistribute rip metric 1 subnets
 network 3.3.3.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 3
 network 192.168.3.0 0.0.0.255 area 0
!
router rip
 version 2
 redistribute ospf 1 metric 2
 network 192.168.1.0
 no auto-summary

R2路由装备信息:

router ospf 1
 log-adjacency-changes
 network 2.2.2.0 0.0.0.255 area 3
 network 192.168.2.0 0.0.0.255 area 3

R1路由装备信息:

router rip
 version 2
 network 1.0.0.0
 network 192.168.1.0
 no auto-summary
检查R1的路由信息

R1#show ip route
Codes: C - connected, S - static, 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 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, 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/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback1
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/2] via 192.168.1.3, 00:00:16, FastEthernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
R       3.3.3.0 [120/2] via 192.168.1.3, 00:00:16, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/2] via 192.168.1.3, 00:00:16, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
R       5.5.5.0 [120/2] via 192.168.1.3, 00:00:16, FastEthernet0/0
R    192.168.4.0/24 [120/2] via 192.168.1.3, 00:00:16, FastEthernet0/0
R    192.168.5.0/24 [120/2] via 192.168.1.3, 00:00:16, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Loopback10
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R    192.168.2.0/24 [120/2] via 192.168.1.3, 00:00:17, FastEthernet0/0
R    192.168.3.0/24 [120/2] via 192.168.1.3, 00:00:17, FastEthernet0/0
检查R2的路由信息:

R2#  show ip route
Codes: C - connected, S - static, 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 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, 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/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/1] via 192.168.2.3, 04:44:05, FastEthernet0/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback2
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/2] via 192.168.2.3, 05:06:48, FastEthernet0/1
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/12] via 192.168.2.3, 05:06:48, FastEthernet0/1
     5.0.0.0/24 is subnetted, 1 subnets
O E2    5.5.5.0 [110/20] via 192.168.2.3, 04:43:55, FastEthernet0/1
O IA 192.168.4.0/24 [110/21] via 192.168.2.3, 04:44:05, FastEthernet0/1
O E2 192.168.5.0/24 [110/20] via 192.168.2.3, 04:43:55, FastEthernet0/1
O E2 192.168.1.0/24 [110/1] via 192.168.2.3, 04:44:05, FastEthernet0/1
C    192.168.2.0/24 is directly connected, FastEthernet0/1
O IA 192.168.3.0/24 [110/11] via 192.168.2.3, 05:06:49, FastEthernet0/1

检查R5路由的信息:

R5#   show ip route
Codes: C - connected, S - static, 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 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, 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.5.6 to network 0.0.0.0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/11] via 192.168.4.4, 00:09:53, Ethernet1/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback5
C    192.168.4.0/24 is directly connected, Ethernet1/0
C    192.168.5.0/24 is directly connected, Ethernet1/2
S*   0.0.0.0/0 [1/0] via 192.168.5.6

R5的LSDB信息:

R5#show ip ospf database
            OSPF Router with ID (5.5.5.5) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
4.4.4.4         4.4.4.4         618         0x80000007 0x00A253 2
5.5.5.5         5.5.5.5         601         0x80000006 0x003ED1 1
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.4.5     5.5.5.5         627         0x80000001 0x001277
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         4.4.4.4         473         0x80000001 0x00C065
                Type-7 AS External Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         4.4.4.4         482         0x80000001 0x005D34 0
5.5.5.0         5.5.5.5         715         0x80000001 0x00B24E 0
192.168.5.0     5.5.5.5         715         0x80000001 0x007E23 0

检查到R1上的LSDB也会发生相应的7类0.0.0.0的默许路由LSA,可是检查路由表中只要一条去往internet的默许路由;为什么没有发生一条去往R2的默许路由呢?

是因为路由的办理间隔起的效果,默许路由的办理间隔是1 ,ospf的办理间隔是110,办理间隔是越小越优先,所以就没有发生ospf的默许路由

解决方案:1、要么修正Area 1的特点,nssa区域修正成一般的area区域并要在鸿沟路由器的上注入默许路由(指令:default-information originate),确保内部网络可以正常拜访internet网络

修正后:检查到的R1/R2上路由信息都可以学习到一条外部引进的默许路由信息

详细的修正信息如下:

修正后R5的装备如下:

 log-adjacency-changes
 redistribute connected subnets
 redistribute static subnets
 network 192.168.4.0 0.0.0.255 area 1
 default-information originate
!
ip route 0.0.0.0 0.0.0.0 192.168.5.6

R4的装备信息:

router ospf 1
 log-adjacency-changes
 network 4.4.4.0 0.0.0.255 area 1
 network 192.168.3.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 1
!
检查R1的路由信息:

R1#            show ip ro
R1#            show ip route
Codes: C - connected, S - static, 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 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, 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.3 to network 0.0.0.0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback1
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/2] via 192.168.1.3, 00:00:13, FastEthernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
R       3.3.3.0 [120/2] via 192.168.1.3, 00:00:13, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/2] via 192.168.1.3, 00:00:13, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
R       5.5.5.0 [120/2] via 192.168.1.3, 00:00:13, FastEthernet0/0
R    192.168.4.0/24 [120/2] via 192.168.1.3, 00:00:13, FastEthernet0/0
R    192.168.5.0/24 [120/2] via 192.168.1.3, 00:00:13, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Loopback10
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R    192.168.2.0/24 [120/2] via 192.168.1.3, 00:00:14, FastEthernet0/0
R    192.168.3.0/24 [120/2] via 192.168.1.3, 00:00:14, FastEthernet0/0
R*   0.0.0.0/0 [120/2] via 192.168.1.3, 00:00:14, FastEthernet0/0

检查R2的路由信息:

R2#show ip route
Codes: C - connected, S - static, 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 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, 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.2.3 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/1] via 192.168.2.3, 00:04:04, FastEthernet0/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback2
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/2] via 192.168.2.3, 05:25:49, FastEthernet0/1
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/12] via 192.168.2.3, 05:25:49, FastEthernet0/1
     5.0.0.0/24 is subnetted, 1 subnets
O E2    5.5.5.0 [110/20] via 192.168.2.3, 00:04:04, FastEthernet0/1
O IA 192.168.4.0/24 [110/21] via 192.168.2.3, 00:04:19, FastEthernet0/1
O E2 192.168.5.0/24 [110/20] via 192.168.2.3, 00:04:04, FastEthernet0/1
O E2 192.168.1.0/24 [110/1] via 192.168.2.3, 00:04:04, FastEthernet0/1
C    192.168.2.0/24 is directly connected, FastEthernet0/1
O IA 192.168.3.0/24 [110/11] via 192.168.2.3, 05:25:49, FastEthernet0/1
O*E2 0.0.0.0/0 [110/1] via 192.168.2.3, 00:03:40, FastEthernet0/1

检查R2的LSDB信息:

R2#show ip ospf database
            OSPF Router with ID (2.2.2.2) (Process ID 1)
                Router Link States (Area 3)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         602         0x8000000D 0x005AC8 2
3.3.3.3         3.3.3.3         1666        0x8000000C 0x001F12 1
                Net Link States (Area 3)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.2.2     2.2.2.2         602         0x8000000B 0x004E58
                Summary Net Link States (Area 3)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         3.3.3.3         682         0x8000000B 0x009A7F
4.4.4.4         3.3.3.3         682         0x8000000B 0x00D03B
192.168.3.0     3.3.3.3         682         0x8000000D 0x00A806
192.168.4.0     3.3.3.3         396         0x80000001 0x001A95
                Summary ASB Link States (Area 3)
Link ID         ADV Router      Age         Seq#       Checksum
5.5.5.5         3.3.3.3         391         0x80000001 0x000305
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         5.5.5.5         359         0x80000001 0x00A4F9 1
1.1.1.0         3.3.3.3         1667        0x8000000A 0x009803 0
5.5.5.0         5.5.5.5         433         0x80000001 0x009CE0 0
192.168.1.0     3.3.3.3         1667        0x8000000A 0x00FF34 0
192.168.5.0     5.5.5.5         433         0x80000001 0x0068B5 0
网络测验:
R2# ping 6.6.6.6   模仿的外部internet网络
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/73/104 ms
R2#tracerou 6.6.6.6
Type escape sequence to abort.
Tracing the route to 6.6.6.6
  1 192.168.2.3 28 msec 12 msec 20 msec
  2 192.168.3.4 8 msec 24 msec 32 msec
  3 192.168.4.5 32 msec 40 msec 80 msec
  4 192.168.5.6 104 msec 60 msec 72 msec

附件:http://down.51cto.com/data/2368480
版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表乐橙lc8立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章