4、summary LSA(四类),external LSA(五类)
自治系统间路由汇总LSA。有五类才会有四类LSA
|
R3的配置
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 34.1.1.1 255.255.255.0
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
summary-address 1.1.0.0 255.255.252.0 疑问:为何这个不起作用
summary-address 4.4.0.0 255.255.240.0
redistribute rip subnets
network 3.3.3.0 0.0.0.255 area 1
network 23.1.1.0 0.0.0.255 area 1
!
router rip
version 2
redistribute ospf 1 metric 2
network 34.0.0.0
no auto-summary
!
R1的路由表
R1#show ip route ospf
34.0.0.0/24 is subnetted, 1 subnets
O E2 34.1.1.0 [110/20] via 12.1.1.2, 00:07:01, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
O IA 3.3.3.0 [110/129] via 12.1.1.2, 00:07:07, Serial1/0
4.0.0.0/20 is subnetted, 1 subnets
O E2 4.4.0.0 [110/20] via 12.1.1.2, 00:07:01, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.1.1.0 [110/128] via 12.1.1.2, 00:07:11, Serial1/0
R1上的链路状态数据库
R1#show ip ospf database
OSPF Router with ID (1.1.3.3) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.3.3 1.1.3.3 752 0x80000002 0x00F02C 5
23.1.1.1 23.1.1.1 753 0x80000002 0x002523 2
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
3.3.3.0 23.1.1.1 744 0x80000001 0x00C414
23.1.1.0 23.1.1.1 754 0x80000001 0x00E3E5
Summary ASB Link States (Area 0) (四类)
Link ID ADV Router Age Seq# Checksum
3.3.3.3 23.1.1.1 744 0x80000001 0x008E47
Type-5 AS External Link States (五类)
Link ID ADV Router Age Seq# Checksum Tag
4.4.0.0 3.3.3.3 755 0x80000001 0x00DDBD 0
34.1.1.0 3.3.3.3 767 0x80000001 0x00BAB5 0
分析R1学到R4环回口地址
要到达R4环回口4.4.0.0网段首先通过五类LSA到3.3.3.3,要到3.3.3.3就要通过四类LSA,但是由于使用的开销类型是2所以很为20。。
R1#show ip ospf database external
OSPF Router with ID (1.1.3.3) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 992
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 4.4.0.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xDDBD
Length: 36
Network Mask: /20
Metric Type: 2 (Larger than any link state path)//开销类型为2的情况下,内部开销就不累加。所以开销值很为20.疑问:在哪里修改类型
TOS: 0
Metric: 20 //R1到3.3.3.3的开销为20
Forward Address: 0.0.0.0
External Route Tag: 0
R1#show ip ospf database asbr-summary
OSPF Router with ID (1.1.3.3) (Process ID 1)
Summary ASB Link States (Area 0)
Routing Bit Set on this LSA
LS age: 1515
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 3.3.3.3 (AS Boundary Router address)
Advertising Router: 23.1.1.1
LS Seq Number: 80000001
Checksum: 0x8E47
Length: 28
Network Mask: /0
TOS: 0 Metric: 64