实验目的:
1 多区域的基本配置
2 Stub区域
3 Full Stub区域
4 Nssa区域
5 完全Nssa区域
6 虚链路
7 域间路由汇总
8 外部路由汇总
9 修改COST影响选路
10 默认路由的注入
实验拓扑:
R3#sh running-config
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
area 1 stub
network 11.0.0.1 0.0.0.0 area 1
network 192.168.1.33 0.0.0.0 area 1
network 192.168.1.65 0.0.0.0 area 1
R3#sh ip route ospf
O IA 12.0.0.0/8 [110/20] via 11.0.0.2, 00:02:25, Ethernet0/0
O IA 13.0.0.0/8 [110/30] via 11.0.0.2, 00:02:25, Ethernet0/0
O IA 14.0.0.0/8 [110/20] via 11.0.0.2, 00:02:25, Ethernet0/0
O IA 15.0.0.0/8 [110/30] via 11.0.0.2, 00:02:25, Ethernet0/0
O*IA 0.0.0.0/0 [110/11] via 11.0.0.2, 00:02:25, Ethernet0/0
R3#sh ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 100)
Router Link States (Area 1[微软用户1] )
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 123 0x80000005 0x0048BD 1
3.3.3.3 3.3.3.3 133 0x80000005 0x007628 3
Net Link States (Area 1[微软用户2] )
Link ID ADV Router Age Seq# Checksum
11.0.0.1 3.3.3.3 189 0x80000003 0x005EB3
Summary Net Link States (Area 1[微软用户3] )
Link ID ADV Router Age Seq# Checksum
0.0.0.0 1.1.1.1 196 0x80000001 0x0093A6
12.0.0.0 1.1.1.1 123 0x80000003 0x004DD5
13.0.0.0 1.1.1.1 123 0x80000003 0x00A473
14.0.0.0 1.1.1.1 196 0x80000002 0x0035EC
15.0.0.0 1.1.1.1 196 0x80000002 0x008C8A
以上输出表明末端区域没有了5类的LSA,也没有了4类的LSA!!!!!!!!!!!!!!!!!
注意:末端区域需要在区域内所有路由器上配置
[微软用户1] 1类LSA[微软用户2]2类LSA
[微软用户3]3类LSA
R1#sh running-config
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
area 1 stub
redistribute connected
network 11.0.0.2 0.0.0.0 area 1
network 12.0.0.1 0.0.0.0 area 0
network 14.0.0.1 0.0.0.0 area 3
R1#sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 12.0.0.2, 00:10:45, Ethernet0/1[微软用户1]
110.0.0.0/24 is subnetted, 1 subnets
O E2 110.110.110.0 [110/20] via 14.0.0.2, 00:10:45, Ethernet0/2
192.168.1.0/32 is subnetted, 2 subnets
O 192.168.1.65 [110/11] via 11.0.0.1, 00:10:45, Ethernet0/0
O 192.168.1.33 [110/11] via 11.0.0.1, 00:10:45, Ethernet0/0
O IA 13.0.0.0/8 [110/20] via 12.0.0.2, 00:10:45, Ethernet0/1
O 15.0.0.0/8 [110/20] via 14.0.0.2, 00:11:00, Ethernet0/2
R1#sh ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 643 0x80000003 0x0042BF 1
2.2.2.2 2.2.2.2 657 0x80000003 0x0004F4 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
12.0.0.2 2.2.2.2 657 0x80000002 0x0027EF
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 1.1.1.1 643 0x80000004 0x003AE6
13.0.0.0 2.2.2.2 657 0x80000002 0x000617
14.0.0.0 1.1.1.1 1595 0x80000001 0x001908
14.0.0.0 2.2.2.2 1432 0x80000001 0x005FB3
15.0.0.0 1.1.1.1 1435 0x80000001 0x0070A5
15.0.0.0 2.2.2.2 1532 0x80000001 0x00ED2E
192.168.1.33 1.1.1.1 697 0x80000003 0x00CDD2
192.168.1.65 1.1.1.1 699 0x80000003 0x008CF3
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 1435 0x80000001 0x00D942
2.2.2.2 1.1.1.1 1427 0x80000001 0x00C952
5.5.5.5 1.1.1.1 1398 0x80000001 0x00DA3F
5.5.5.5 2.2.2.2 1398 0x80000001 0x00BC59
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 646 0x80000005 0x0048BD 1
3.3.3.3 3.3.3.3 657 0x80000005 0x007628 3
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
11.0.0.1 3.3.3.3 714 0x80000003 0x005EB3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 1.1.1.1 719 0x80000001 0x0093A6
12.0.0.0 1.1.1.1 646 0x80000003 0x004DD5
13.0.0.0 1.1.1.1 646 0x80000003 0x00A473
14.0.0.0 1.1.1.1 720 0x80000002 0x0035EC
15.0.0.0 1.1.1.1 720 0x80000002 0x008C8A
Router Link States (Area 3)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1443 0x80000002 0x005EA1 1
2.2.2.2 2.2.2.2 1440 0x80000002 0x0024D1 1
5.5.5.5 5.5.5.5 1404 0x80000004 0x006043 2
Net Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
14.0.0.1 1.1.1.1 1442 0x80000001 0x00DD31
15.0.0.1 2.2.2.2 1441 0x80000001 0x00D431
Summary Net Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 1.1.1.1 710 0x80000003 0x003CE5
11.0.0.0 2.2.2.2 712 0x80000001 0x00868F
12.0.0.0 1.1.1.1 1598 0x80000001 0x0033EF
12.0.0.0 2.2.2.2 1537 0x80000001 0x00150A
13.0.0.0 1.1.1.1 1598 0x80000001 0x008A8D
13.0.0.0 2.2.2.2 1537 0x80000001 0x000816
192.168.1.33 1.1.1.1 705 0x80000001 0x00D1D0
192.168.1.33 2.2.2.2 702 0x80000001 0x00187C
192.168.1.65 1.1.1.1 705 0x80000001 0x0090F1
192.168.1.65 2.2.2.2 702 0x80000001 0x00D69D
Summary ASB Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 1537 0x80000001 0x0075B0
2.2.2.2 1.1.1.1 1598 0x80000001 0x0065C0
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
110.110.110.0 5.5.5.5 1404 0x80000001 0x00C977 0
202.101.224.0 2.2.2.2 661 0x80000002 0x009ED8 0
[微软用户1]想一下为什么到外部走的是R2而不是R5?4类的LSA描述ASBR的可达性走那条路到ASBR最近,是R2不是R5
R2#sh running-config
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
area 2 nssa
network 12.0.0.2 0.0.0.0 area 0
network 13.0.0.1 0.0.0.0 area 2
network 15.0.0.1 0.0.0.0 area 3
R2# sh ip route ospf
O N2 202.101.224.0/24 [110/20] via 13.0.0.2, 00:15:08, Ethernet0/0
110.0.0.0/24 is subnetted, 1 subnets
O E2 110.110.110.0 [110/20] via 15.0.0.2, 00:15:08, Ethernet0/3
O IA 11.0.0.0/8 [110/20] via 12.0.0.1, 00:15:23, Ethernet0/1
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/21] via 12.0.0.1, 00:15:13, Ethernet0/1
O IA 192.168.1.33 [110/21] via 12.0.0.1, 00:15:13, Ethernet0/1
O 14.0.0.0/8 [110/20] via 15.0.0.2, 00:17:10, Ethernet0/3
R2#sh ip ospf database
OSPF Router with ID (2.2.2.2) (Process ID 100)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 889 0x80000003 0x0042BF 1
2.2.2.2 2.2.2.2 901 0x80000003 0x0004F4 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
12.0.0.2 2.2.2.2 901 0x80000002 0x0027EF
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 1.1.1.1 889 0x80000004 0x003AE6
13.0.0.0 2.2.2.2 901 0x80000002 0x000617
14.0.0.0 1.1.1.1 1840 0x80000001 0x001908
14.0.0.0 2.2.2.2 1676 0x80000001 0x005FB3
15.0.0.0 1.1.1.1 1680 0x80000001 0x0070A5
15.0.0.0 2.2.2.2 1776 0x80000001 0x00ED2E
192.168.1.33 1.1.1.1 941 0x80000003 0x00CDD2
192.168.1.65 1.1.1.1 944 0x80000003 0x008CF3
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 1679 0x80000001 0x00D942
2.2.2.2 1.1.1.1 1673 0x80000001 0x00C952
5.5.5.5 1.1.1.1 1643 0x80000001 0x00DA3F
5.5.5.5 2.2.2.2 1642 0x80000001 0x00BC59
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 904 0x80000003 0x00A34F 1
4.4.4.4 4.4.4.4 839 0x80000003 0x0016CC 1
Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
13.0.0.1 2.2.2.2 904 0x80000002 0x0060A4
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 2.2.2.2 949 0x80000003 0x0028E5
12.0.0.0 2.2.2.2 1062 0x80000001 0x00BA5E
14.0.0.0 2.2.2.2 1062 0x80000001 0x000508
15.0.0.0 2.2.2.2 1062 0x80000001 0x009382
192.168.1.33 2.2.2.2 945 0x80000001 0x00BDD0
192.168.1.65 2.2.2.2 945 0x80000001 0x007CF1
Type-7 AS External Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Tag
202.101.224.0 4.4.4.4 839 0x80000002 0x00CD97 0
Router Link States (Area 3)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1689 0x80000002 0x005EA1 1
2.2.2.2 2.2.2.2 1684 0x80000002 0x0024D1 1
5.5.5.5 5.5.5.5 1649 0x80000004 0x006043 2
Net Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
14.0.0.1 1.1.1.1 1689 0x80000001 0x00DD31
15.0.0.1 2.2.2.2 1684 0x80000001 0x00D431
Summary Net Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 1.1.1.1 957 0x80000003 0x003CE5
11.0.0.0 2.2.2.2 955 0x80000001 0x00868F
12.0.0.0 1.1.1.1 1844 0x80000001 0x0033EF
12.0.0.0 2.2.2.2 1779 0x80000001 0x00150A
13.0.0.0 1.1.1.1 1844 0x80000001 0x008A8D
13.0.0.0 2.2.2.2 1779 0x80000001 0x000816
192.168.1.33 1.1.1.1 952 0x80000001 0x00D1D0
192.168.1.33 2.2.2.2 945 0x80000001 0x00187C
192.168.1.65 1.1.1.1 951 0x80000001 0x0090F1
192.168.1.65 2.2.2.2 945 0x80000001 0x00D69D
Summary ASB Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 1779 0x80000001 0x0075B0
2.2.2.2 1.1.1.1 1844 0x80000001 0x0065C0
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
110.110.110.0 5.5.5.5 1649 0x80000001 0x00C977 0
202.101.224.0 2.2.2.2 905 0x80000002 0x009ED8 0
R4#sh running-config
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
area 2 nssa
redistribute connected subnets
network 13.0.0.2 0.0.0.0 area 2
R4#sh ip route ospf
O IA 11.0.0.0/8 [110/30] via 13.0.0.1, 00:21:04, Ethernet0/0
O IA 12.0.0.0/8 [110/20] via 13.0.0.1, 00:22:57, Ethernet0/0
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/31] via 13.0.0.1, 00:20:59, Ethernet0/0
O IA 192.168.1.33 [110/31] via 13.0.0.1, 00:20:59, Ethernet0/0
O IA 14.0.0.0/8 [110/30] via 13.0.0.1, 00:22:57, Ethernet0/0
O IA 15.0.0.0/8 [110/20] via 13.0.0.1, 00:22:57, Ethernet0/0
R4#sh ip ospf database
OSPF Router with ID (4.4.4.4) (Process ID 100)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 1253 0x80000003 0x00A34F 1
4.4.4.4 4.4.4.4 1185 0x80000003 0x0016CC 1
Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
13.0.0.1 2.2.2.2 1253 0x80000002 0x0060A4
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 2.2.2.2 1298 0x80000003 0x0028E5
12.0.0.0 2.2.2.2 1410 0x80000001 0x00BA5E
14.0.0.0 2.2.2.2 1410 0x80000001 0x000508
15.0.0.0 2.2.2.2 1410 0x80000001 0x009382
192.168.1.33 2.2.2.2 1293 0x80000001 0x00BDD0
192.168.1.65 2.2.2.2 1293 0x80000001 0x007CF1
Type-7 AS External Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Tag
202.101.224.0 4.4.4.4 1185 0x80000002 0x00CD97 0
以上输出表明NSSA区域没有4 5类的LSA,只有1237 类的LSA!!!!!!!!!!!!!!!
R5#sh running-config
router ospf 100
router-id 5.5.5.5
log-adjacency-changes
redistribute connected subnets
network 14.0.0.2 0.0.0.0 area 3
network 15.0.0.2 0.0.0.0 area 3
R5#sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 15.0.0.1, 00:28:01, Ethernet0/3
O IA 11.0.0.0/8 [110/20] via 14.0.0.1, 00:28:16, Ethernet0/2
O IA 12.0.0.0/8 [110/20] via 15.0.0.1, 00:39:44, Ethernet0/3
[110/20] via 14.0.0.1, 00:39:44, Ethernet0/2
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/21] via 14.0.0.1, 00:28:06, Ethernet0/2
O IA 192.168.1.33 [110/21] via 14.0.0.1, 00:28:06, Ethernet0/2
O IA 13.0.0.0/8 [110/20] via 15.0.0.1, 00:39:44, Ethernet0/3
R5#sh ip ospf database
OSPF Router with ID (5.5.5.5) (Process ID 100)
Router Link States (Area 3)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 432 0x80000003 0x005CA2 1
2.2.2.2 2.2.2.2 415 0x80000003 0x0022D2 1
5.5.5.5 5.5.5.5 495 0x80000005 0x005E44 2
Net Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
14.0.0.1 1.1.1.1 432 0x80000002 0x00DB32
15.0.0.1 2.2.2.2 415 0x80000002 0x00D232
Summary Net Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
11.0.0.0 1.1.1.1 1724 0x80000003 0x003CE5
11.0.0.0 2.2.2.2 1724 0x80000001 0x00868F
12.0.0.0 1.1.1.1 676 0x80000002 0x0031F0
12.0.0.0 2.2.2.2 677 0x80000002 0x00130B
13.0.0.0 1.1.1.1 676 0x80000002 0x00888E
13.0.0.0 2.2.2.2 679 0x80000002 0x000617
192.168.1.33 1.1.1.1 1721 0x80000001 0x00D1D0
192.168.1.33 2.2.2.2 1716 0x80000001 0x00187C
192.168.1.65 1.1.1.1 1721 0x80000001 0x0090F1
192.168.1.65 2.2.2.2 1716 0x80000001 0x00D69D
Summary ASB Link States (Area 3)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 679 0x80000002 0x0073B1
2.2.2.2 1.1.1.1 678 0x80000002 0x0063C1
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
110.110.110.0 5.5.5.5 497 0x80000002 0x00C778 0
202.101.224.0 2.2.2.2 1676 0x80000002 0x009ED8 0
R1(config-router)#area 1 stub no-summary
完全的STUB只需要在ABR上配置
R3#sh ip route ospf
O*IA 0.0.0.0/0 [110/11] via 11.0.0.2, 00:00:24, Ethernet0/0
R3#sh ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 100)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1920 0x80000005 0x0048BD 1
3.3.3.3 3.3.3.3 1930 0x80000005 0x007628 3
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
11.0.0.1 3.3.3.3 174 0x80000004 0x005CB4
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 1.1.1.1 46 0x80000002 0x0091A7
完全的STUB区域,只有12类LSA,没有345类LSA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
R2(config-router)#area 2 nssa no-summary
完全的NSSA区域,只需要在ABR上配置
R4#sh ip route ospf
O*IA 0.0.0.0/0 [110/11] via 13.0.0.1, 00:00:32, Ethernet0/0
R4#sh ip ospf database
OSPF Router with ID (4.4.4.4) (Process ID 100)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 185 0x80000004 0x00A150 1
4.4.4.4 4.4.4.4 109 0x80000004 0x0014CD 1
Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
13.0.0.1 2.2.2.2 185 0x80000003 0x005EA5
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 2.2.2.2 45 0x80000001 0x00FC31
Type-7 AS External Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Tag
202.101.224.0 4.4.4.4 109 0x80000003 0x00CB98 0
完全的NSSA区域,没有3 4 5类的LSA,只有127 类的LSA!!!!!!!!!!!!!!!
R1#sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 12.0.0.2, 00:08:59, Ethernet0/1
110.0.0.0/24 is subnetted, 1 subnets
O E2 110.110.110.0 [110/20] via 14.0.0.2, 00:08:59, Ethernet0/2
192.168.1.0/32 is subnetted, 2 subnets
O 192.168.1.65 [110/11] via 11.0.0.1, 00:08:59, Ethernet0/0
O 192.168.1.33 [110/11] via 11.0.0.1, 00:08:59, Ethernet0/0
O IA 13.0.0.0/8 [110/20] via 12.0.0.2, 00:08:59, Ethernet0/1
O 15.0.0.0/8 [110/20] via 14.0.0.2, 00:08:59, Ethernet0/2
R2#sh ip route ospf
O N2 202.101.224.0/24 [110/20] via 13.0.0.2, 00:05:26, Ethernet0/0
110.0.0.0/24 is subnetted, 1 subnets
O E2 110.110.110.0 [110/20] via 15.0.0.2, 00:05:26, Ethernet0/3
O IA 11.0.0.0/8 [110/20] via 12.0.0.1, 00:05:26, Ethernet0/1
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/21] via 12.0.0.1, 00:05:26, Ethernet0/1
O IA 192.168.1.33 [110/21] via 12.0.0.1, 00:05:26, Ethernet0/1
O 14.0.0.0/8 [110/20] via 15.0.0.2, 00:05:26, Ethernet0/3
R5(config)#router ospf 100
R5(config-router)#no redistribute connected subnets
R1#sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 12.0.0.2, 00:11:58, Ethernet0/1
192.168.1.0/32 is subnetted, 2 subnets
O 192.168.1.65 [110/11] via 11.0.0.1, 00:11:58, Ethernet0/0
O 192.168.1.33 [110/11] via 11.0.0.1, 00:11:58, Ethernet0/0
O IA 13.0.0.0/8 [110/20] via 12.0.0.2, 00:11:58, Ethernet0/1
O 15.0.0.0/8 [110/20] via 14.0.0.2, 00:11:58, Ethernet0/2
R2#sh ip route ospf
O N2 202.101.224.0/24 [110/20] via 13.0.0.2, 00:08:25, Ethernet0/0
O IA 11.0.0.0/8 [110/20] via 12.0.0.1, 00:08:25, Ethernet0/1
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/21] via 12.0.0.1, 00:08:25, Ethernet0/1
O IA 192.168.1.33 [110/21] via 12.0.0.1, 00:08:25, Ethernet0/1
O 14.0.0.0/8 [110/20] via 15.0.0.2, 00:08:25, Ethernet0/3
现在没有了到外部网络110.110.110.0/24的路由!!!!!!!!!!!!!!!!!!!!!!!!
R5(config-router)#default-information originate always
R1#sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 12.0.0.2, 00:16:17, Ethernet0/1
192.168.1.0/32 is subnetted, 2 subnets
O 192.168.1.65 [110/11] via 11.0.0.1, 00:16:17, Ethernet0/0
O 192.168.1.33 [110/11] via 11.0.0.1, 00:16:17, Ethernet0/0
O IA 13.0.0.0/8 [110/20] via 12.0.0.2, 00:16:17, Ethernet0/1
O 15.0.0.0/8 [110/20] via 14.0.0.2, 00:16:17, Ethernet0/2
O*E2 0.0.0.0/0 [110/1] via 14.0.0.2, 00:00:29, Ethernet0/2
R2#sh ip route ospf
O N2 202.101.224.0/24 [110/20] via 13.0.0.2, 00:12:24, Ethernet0/0
O IA 11.0.0.0/8 [110/20] via 12.0.0.1, 00:12:24, Ethernet0/1
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/21] via 12.0.0.1, 00:12:24, Ethernet0/1
O IA 192.168.1.33 [110/21] via 12.0.0.1, 00:12:24, Ethernet0/1
O 14.0.0.0/8 [110/20] via 15.0.0.2, 00:12:24, Ethernet0/3
O*E2 0.0.0.0/0 [110/1] via 15.0.0.2, 00:00:57, Ethernet0/3
以默认路由注入的方式到达外部网络!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
区域间路由汇总:
R5# sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 15.0.0.1, 00:05:15, Ethernet0/3
O IA 11.0.0.0/8 [110/20] via 14.0.0.1, 01:03:10, Ethernet0/2
O IA 12.0.0.0/8 [110/20] via 15.0.0.1, 01:14:39, Ethernet0/3
[110/20] via 14.0.0.1, 01:14:39, Ethernet0/2
192.168.1.0/32 is subnetted, 2 subnets
O IA 192.168.1.65 [110/21] via 14.0.0.1, 01:03:01, Ethernet0/2
O IA 192.168.1.33 [110/21] via 14.0.0.1, 01:03:00, Ethernet0/2
O IA 13.0.0.0/8 [110/20] via 15.0.0.1, 01:14:39, Ethernet0/3
R1(config-router)#area 1 range 192.168.1.0 255.255.255.0
R5# sh ip route ospf
O E2 202.101.224.0/24 [110/20] via 15.0.0.1, 00:00:14, Ethernet0/3
O IA 11.0.0.0/8 [110/20] via 14.0.0.1, 01:09:47, Ethernet0/2
O IA 12.0.0.0/8 [110/20] via 15.0.0.1, 01:21:15, Ethernet0/3
[110/20] via 14.0.0.1, 01:21:15, Ethernet0/2
O IA 192.168.1.0/24 [110/21] via 14.0.0.1, 00:00:19, Ethernet0/2
O IA 13.0.0.0/8 [110/20] via 15.0.0.1, 01:21:15, Ethernet0/3
外部路由汇总:
R4(config-router)#summary-address 202.0.0.0 255.0.0.0
R5# sh ip route ospf
O IA 11.0.0.0/8 [110/20] via 14.0.0.1, 01:14:37, Ethernet0/2
O IA 12.0.0.0/8 [110/20] via 15.0.0.1, 01:26:05, Ethernet0/3
[110/20] via 14.0.0.1, 01:26:05, Ethernet0/2
O IA 192.168.1.0/24 [110/21] via 14.0.0.1, 00:05:09, Ethernet0/2
O IA 13.0.0.0/8 [110/20] via 15.0.0.1, 01:26:05, Ethernet0/3
O E2 202.0.0.0/8 [110/20] via 15.0.0.1, 00:00:27, Ethernet0/3
修改COST影响选路:
R5(config-if)#ip ospf cost 30
R5# sh ip route ospf
O IA 11.0.0.0/8 [110/20] via 14.0.0.1, 00:00:01, Ethernet0/2
O IA 12.0.0.0/8 [110/20] via 14.0.0.1, 00:00:01, Ethernet0/2
O IA 192.168.1.0/24 [110/21] via 14.0.0.1, 00:00:01, Ethernet0/2
O IA 13.0.0.0/8 [110/30] via 14.0.0.1, 00:00:01, Ethernet0/2
O E2 202.0.0.0/8 [110/20] via 14.0.0.1, 00:00:01, Ethernet0/2
虚链路
192.168.1.32/27---------------------------------5区
192.168.1.96/27---------------------------------5区
R3#sh running-config
router ospf 100
area 1 virtual-link 1.1.1.1[微软用户1]
network 11.0.0.1 0.0.0.0 area 1
network 192.168.1.33 0.0.0.0 area 5
network 192.168.1.65 0.0.0.0 area 5
R1#sh running-config |
router ospf 100
area 1 virtual-link 3.3.3.3
network 11.0.0.2 0.0.0.0 area 1
network 12.0.0.1 0.0.0.0 area 0
network 14.0.0.1 0.0.0.0 area 3
R1#sh ip ospf virtual-links
Virtual Link OSPF_VL0 to router 3.3.3.3 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Ethernet0/0, Cost of using 10[u2]
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Adjacency State FULL (Hello suppressed)
Index 1/1, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
[微软用户1]想一想虚链路是干吗的?是用来连接那些不能直接连接到骨干区域做中转的,还可以用来连接不连续的骨干区域,注意虚链路要指定对方的RouterID而非对方的接口地址
[u2]穿越的区域