14-高級路由:OSPF 5 種LSA
二、命令部署:
1、1類、2類LSA命令
R1#show ip ospf int f0/0 看接口類型
R1#show ip ospf database 查看路由器所學習到的完成的網絡拓撲
R1#show ip ospf database router 查看ospf數據庫路由器
R1(config)#int lo1
R1(config-if)#ip ospf network point-to-point 修改為點對點類型,這樣Lo1發送到對面是24位的。
2、3類LSA查看命令:
R3#show ip ospf database
R3#show ip route 可以看到3類LSA標記:O IA
3、5類LSA:
R3(config)#router ospf 110
R3(config-router)#redistribute eigrp 90 subnets 重分發
R2#show ip ospf database external 可以看到OSPF區域內5類LSA通告者都是R3
4、4類LSA
R4#show ip ospf border-routers 查看邊界路由器
5、修改OE 2為OE 1
R3(config)#router ospf 110
R3(config-router)#redistribute eigrp 90 subnets metric-type 1 必須要在ASBR:R3路由器上做
三、驗證:
1、1類、2類LSA
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 428 0x80000003 0x00C332 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
12.1.1.1 1.1.1.1 428 0x80000001 0x004AD0
2、3類LSA
R3#show ip ospf database
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
1.1.1.0 1.1.1.1 215 0x80000001 0x0051E3
2.2.2.2 1.1.1.1 215 0x80000001 0x00230C
4.4.4.4 1.1.1.1 32 0x80000001 0x00D055
12.1.1.0 1.1.1.1 215 0x80000001 0x00C168
24.1.1.0 1.1.1.1 32 0x80000003 0x002BEF
3、5類LSA
R3#show ip ospf database
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
5.0.0.0 3.3.3.3 55 0x80000001 0x004C43 0
35.1.1.0 3.3.3.3 57 0x80000001 0x00ADC1 0
R4#show ip route
O E2 5.0.0.0/8 [110/20] via 24.1.1.2, 00:03:15, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
C 24.1.1.0 is directly connected, FastEthernet0/0
R4#show ip ospf database external
OSPF Router with ID (4.4.4.4) (Process ID 110)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 546
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 5.0.0.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x4C43
Length: 36
Network Mask: /8
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
4、4類LSA
R4#show ip ospf border-routers
OSPF Process 110 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 2.2.2.2 [1] via 24.1.1.2, FastEthernet0/0, ABR, Area 2, SPF 4
I 3.3.3.3 [3] via 24.1.1.2, FastEthernet0/0, ASBR, Area 2, SPF 4
R4#show ip ospf database
Summary ASB Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
3.3.3.3 2.2.2.2 948 0x80000001 0x00C85D
5、修改OE 2為OE 1
R1#show ip route
O E1 35.1.1.0 [110/21] via 13.1.1.3, 00:01:28, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets
O E1 5.0.0.0/8 [110/21] via 13.1.1.3, 00:01:30, FastEthernet1/0
R1#show ip route
O E1 35.1.1.0 [110/2] via 13.1.1.3, 00:00:36, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets
O E1 5.0.0.0/8 [110/2] via 13.1.1.3, 00:00:38, FastEthernet1/0
24.0.0.0/24 is subnetted, 1 subnets
14-高級路由:OSPF 5 種LSA