LSA的TYPE

1、router LSA

  1.1传播范围:在一个区域内

  1.2通告者:每台路由器,每台路由器用RID来唯一标识一台路由器

  1.3内容:

     直连的链路信息-->拓扑信息

     网络前缀-->路由信息

实验拓扑图:

wKiom1MlO93io-beAABM64_lXb8383.jpg

配置:

R1

interface s0/1

ip add 12.1.1.1 255.255.255.0

no shut

interface lo0

ip add 1.1.1.1 255.255.255.0

no shut

router ospf 110

router-id 1.1.1.1

network 12.1.1.0 0.0.0.255 area 0

R2

interface s0/0

ip add 12.1.1.2 255.255.255.0

no shut

interface l0

ip add 2.2.2.2 255.255.255.0

no shut

router ospf 110

router-id 2.2.2.2

network 12.1.1.0 0.0.0.255 area 0

network 2.2.2.0 0.0.0.255 area 0

R1(config-router)#do 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         117         0x80000003 0x0067F8 3

2.2.2.2         2.2.2.2         157         0x80000002 0x000751 3

为了区分RID和环回接口IP地址,我们重新配置RID

R1:router-id 91.1.1.1

R2:router-id 92.2.2.2

重新配置router-id后,需要清除OSPF进程clear ip ospf process  yes

R2(config-router)#do show ip ospf dat


           OSPF Router with ID (92.2.2.2) (Process ID 110)


               Router Link States (Area 0)


Link ID         ADV Router      Age         Seq#       Checksum Link count

91.1.1.1        91.1.1.1        1401        0x80000002 0x005AF7 3

92.2.2.2        92.2.2.2        1401        0x80000001 0x00F950 3


       Link ID                    ADV router

LSA1    RID                        RID

R2#show ip ospf database router                        


           OSPF Router with ID (92.2.2.2) (Process ID 110)


               Router Link States (Area 0)


 LS age: 435

 Options: (No TOS-capability, DC)

 LS Type: Router Links

 Link State ID: 91.1.1.1

 Advertising Router: 91.1.1.1

 LS Seq Number: 80000002

 Checksum: 0x5AF7

 Length: 60

 Number of Links: 3


   Link connected to: a Stub Network//路由信息

    (Link ID) Network/subnet number: 1.1.1.1

    (Link Data) Network Mask: 255.255.255.255

     Number of TOS metrics: 0

      TOS 0 Metrics: 1


   Link connected to: another Router (point-to-point)//拓扑信息

    (Link ID) Neighboring Router ID: 92.2.2.2

    (Link Data) Router Interface address: 12.1.1.1

     Number of TOS metrics: 0

      TOS 0 Metrics: 64


   Link connected to: a Stub Network//路由信息

    (Link ID) Network/subnet number: 12.1.1.0

    (Link Data) Network Mask: 255.255.255.0

     Number of TOS metrics: 0

      TOS 0 Metrics: 64



 LS age: 436

 Options: (No TOS-capability, DC)

 LS Type: Router Links

 Link State ID: 92.2.2.2

 Advertising Router: 92.2.2.2

 LS Seq Number: 80000001

 Checksum: 0xF950

 Length: 60

 Number of Links: 3


   Link connected to: a Stub Network

    (Link ID) Network/subnet number: 2.2.2.2

    (Link Data) Network Mask: 255.255.255.255

     Number of TOS metrics: 0

      TOS 0 Metrics: 1


   Link connected to: another Router (point-to-point)

    (Link ID) Neighboring Router ID: 91.1.1.1

    (Link Data) Router Interface address: 12.1.1.2

     Number of TOS metrics: 0

      TOS 0 Metrics: 64


   Link connected to: a Stub Network

    (Link ID) Network/subnet number: 12.1.1.0

    (Link Data) Network Mask: 255.255.255.0

     Number of TOS metrics: 0

      TOS 0 Metrics: 64

2、LSA2 Network LSA,只有在MA网络类型才可以出现

  2.1传播范围:在一个区域内

  2.2通告者:DR

  2.3内容:MA网络以后多少台路由器 -->拓扑信息

           掩码信息

实验拓扑图:

wKioL1MlQjmwQxy4AAB7H4MJxkQ164.jpg

在第一个图中做如下添加:

R1:

interface e1/1

ip add 100.1.1.1 255.255.255.0

no shut

router ospf 110

network 100.1.1.0 0.0.0.255 area 0

R2:

interface e1/0

ip add 100.1.1.2 255.255.255.0

no shut

router ospf 110

network 100.1.1.0 0.0.0.255 area 0


R2#show ip ospf database network


           OSPF Router with ID (92.2.2.2) (Process ID 110)


               Net Link States (Area 0)


 Routing Bit Set on this LSA

 LS age: 140

 Options: (No TOS-capability, DC)

 LS Type: Network Links

 Link State ID: 100.1.1.2 (address of Designated Router)

 Advertising Router: 92.2.2.2

 LS Seq Number: 80000001

 Checksum: 0xC2EB

 Length: 32

 Network Mask: /24

       Attached Router: 92.2.2.2

       Attached Router: 91.1.1.1

总结:        LinkID         ADV router

   LSA2      DR's IP        DR’s RID

如果R2边上再接一个R3的话,试问100.1.1.0/24是以几类LSA传送给R3的啊?

不管R2和R3之间的链路是什么类型,都可以传送LSA1和LSA2,抓包确认

这样结合LSA1和LSA2的信息,得到100.1.1.0/24路由和拓扑信息


LSA3:summary LSA

1、传播范围:整个区域内

2、通告者:ABR

3、内容:域间路由

实验拓扑:

wKiom1MlWkCw-b2TAAEhoUwSrz4388.jpg

配置:接着上面的配置进行操作

R2

interface s0/1

ip add 24.1.1.2 255.255.255.0

no shut

router ospf 110

network 24.1.1.0 0.0.0.255 area 1

R1:

interface s0/0

ip add 13.1.1.1 255.255.255.0

no shut

router ospf 110

network 13.1.1.0 0.0.0.255 area 2

R3

interface s0/1

ip add 13.1.1.3 255.255.255.0

no shut

interface l0

ip add 3.3.3.3 255.255.255.0

no shut

router ospf 110

router-id 93.3.3.3

network 13.1.1.0 0.0.0.255 area 2

network 3.3.3.0 0.0.0.255 area 2

R4

interface s0/0

ip add 24.1.1.4 255.255.255.0

no shut

interface l0

ip add 4.4.4.4 255.255.255.0

noshut

router ospf 110

router-id 94.4.4.4

network 24.1.1.0 0.0.0.255 area 1

network 4.4.4.0 0.0.0.255 area 1

R4#show ip ospf database


           OSPF Router with ID (94.4.4.4) (Process ID 110)


               Router Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum Link count

92.2.2.2        92.2.2.2        54          0x80000003 0x001B21 2

94.4.4.4        94.4.4.4        46          0x80000002 0x00B45E 3


               Summary Net Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum

1.1.1.1         92.2.2.2        60          0x80000001 0x00606B

2.2.2.2         92.2.2.2        60          0x80000001 0x00CD04

3.3.3.3         92.2.2.2        60          0x80000001 0x0086FC

12.1.1.0        92.2.2.2        60          0x80000001 0x00EE9D

13.1.1.0        92.2.2.2        60          0x80000001 0x00463B

100.1.1.0       92.2.2.2        60          0x80000001 0x005416

这里的通告者是可变的,穿越过一个ABR,它的通告者就是这个ABR

          LinkID          ADV Router

LSA3       域间路由        ABR‘RID


LSA5 External LSA  域外路由

1、传播范围:整个AS域,但不属于任何一个区域

2、通告者:ASBR

3、内容:域外路由

R4#show ip ospf border-routers


OSPF Process 110 internal Routing Table


Codes: i - Intra-area route, I - Inter-area route


I 93.3.3.3 [138] via 24.1.1.2, Serial0/0, ASBR, Area 1, SPF 2

i 92.2.2.2 [64] via 24.1.1.2, Serial0/0, ABR, Area 1, SPF 2

用来查看ABR和ASBR的

实验拓扑:

wKiom1MlpfTigya9AAFX4TZ_ons630.jpg配置:在上面的基础上添加

R3

interface s0/0

ip add 35.1.1.3 255.255.255.0

no shut

router rip

version 2

no auto-summary

network 35.0.0.0

router ospf 110

redistribute rip subnets

R5

interface s0/1

ip add 35.1.1.5 255.255.255.0

no shut

interface lo0

ip add 5.5.5.5 255.255.255.0

no shut

router rip

version 2

no auto-summary

network 35.0.0.0

network 5.0.0.0

R4#show ip route | include E2

      E1 - OSPF external type 1, E2 - OSPF external type 2

O E2    35.1.1.0 [110/20] via 24.1.1.2, 00:55:54, Serial0/0

O E2    5.5.5.0 [110/20] via 24.1.1.2, 00:33:02, Serial0/0

         LinkID        ADV  Router

LSA5      域外路由      ASBR RID

由于不直连ASBR的路由器不知道ASBR在哪里,所以需要LSA4 summary ASB LSA来通告;

LSA4 summary ASB

1、传播范围:传播到除ASBR所在的区域的区域

2、通告者:ABR RID

3、内容

              LinkID               ADV Router

LSA4           ASBR RID             ABR RID


E2:E2的路由metric值一直时候默认的20

  20就叫做seed cost

  因重分布的两个协议的metric值不同

  而seed metric给予了标准的默认值seed cost

如果需要修改域外路由的类型的话或metric值的话

router ospf 110

redistribute rip subnets metric-type 1 metric 10

E1:E1的路由的metric具有可度量性,在需要选路的时候,体现metric的度量作用


LSDB overload protection(版本需要在IOS12.4以上哦)

在内存和处理器资源有限的条件下,可以通过该功能,当达到设定阈值的时候

发送报警信息或重置邻接关系。网络设计的时候,建议放在末节区域,不能放在中央区域。

实验拓扑:

wKiom1Mpj4uj4v_oAABJBYNQbXo191.jpg

配置:

R1

interface s1/0

ip add 12.1.1.1 255.255.255.0

no shut

interface l0

ip add 1.1.1.1 255.255.255.0

no shut

router ospf 110

router-id 91.1.1.1

network 12.1.1.0 0.0.0.255 area 0

network 1.1.1.0 0.0.0.255 area 0

R2

interface s1/1

ip add 12.1.1.2 255.255.255.0

no shut

interface l0

ip add 2.2.2.2 255.255.255.0

no shut

router ospf 110

router-id 92.2.2.2

network 12.1.1.0 0.0.0.255 area 0

network 2.2.2.0 0.0.0.255 area 0

在R2上show ip ospf database

R2(config-router)# do show ip ospf database


           OSPF Router with ID (92.2.2.2) (Process ID 110)


               Router Link States (Area 0)


Link ID         ADV Router      Age         Seq#       Checksum Link count

91.1.1.1        91.1.1.1        228         0x80000009 0x004FFA 3

92.2.2.2        92.2.2.2        202         0x80000003 0x00F552 3

因为在这个拓扑中就两个路由器,而LSA1类就只能有两个一类LSA

怎样增加更多的LSA的发送呢?

添加接口进行宣告

R1

interface lo8

ip add 192.168.8.1 255.255.255.0

interface lo9

ip add 192.168.9.1 255.255.255.0

interface lo10

ip add 192.168.10.1 255.255.255.0

interface lo11

ip add 192.168.11.1 255.255.255.0

router ospf 110

network 192.168.8.0 0.0.3.255 area 0

再show ip ospf database,结果还是没有变。

试着改变LSA的类型 3类吧

R1

router ospf 110

no network 192.168.8.0 0.0.3.255 area 0

network 192.168.8.0 0.0.3.255 area 1

R2#show ip ospf database


           OSPF Router with ID (92.2.2.2) (Process ID 110)


               Router Link States (Area 0)


Link ID         ADV Router      Age         Seq#       Checksum Link count

91.1.1.1        91.1.1.1        1134        0x80000009 0x004FFA 3

92.2.2.2        92.2.2.2        1108        0x80000003 0x00F552 3


               Summary Net Link States (Area 0)


Link ID         ADV Router      Age         Seq#       Checksum

192.168.8.1     91.1.1.1        1739        0x80000001 0x003437

192.168.9.1     91.1.1.1        1739        0x80000001 0x002941

192.168.10.1    91.1.1.1        1739        0x80000001 0x001E4B

192.168.11.1    91.1.1.1        1739        0x80000001 0x001355

看到了吧,多了四条3类LSA,我们再仔细看下详细的内容

R2#show ip ospf database summary


           OSPF Router with ID (92.2.2.2) (Process ID 110)


               Summary Net Link States (Area 0)


 Routing Bit Set on this LSA//一条LSA

 LS age: 1837

 Options: (No TOS-capability, DC, Upward)

 LS Type: Summary Links(Network)

 Link State ID: 192.168.8.1 (summary Network Number)

 Advertising Router: 91.1.1.1

 LS Seq Number: 80000001

 Checksum: 0x3437

 Length: 28

 Network Mask: /32

       TOS: 0  Metric: 1


 Routing Bit Set on this LSA//一条LSA

 LS age: 1837

 Options: (No TOS-capability, DC, Upward)

 LS Type: Summary Links(Network)

 Link State ID: 192.168.9.1 (summary Network Number)

 Advertising Router: 91.1.1.1

 LS Seq Number: 80000001

 Checksum: 0x2941

 Length: 28

 Network Mask: /32

       TOS: 0  Metric: 1


 Routing Bit Set on this LSA//一条LSA

 LS age: 1838

 Options: (No TOS-capability, DC, Upward)

 LS Type: Summary Links(Network)

 Link State ID: 192.168.10.1 (summary Network Number)

 Advertising Router: 91.1.1.1

 LS Seq Number: 80000001

 Checksum: 0x1E4B

 Length: 28

 Network Mask: /32

       TOS: 0  Metric: 1


 Routing Bit Set on this LSA//一条LSA

 LS age: 1838

 Options: (No TOS-capability, DC, Upward)

 LS Type: Summary Links(Network)

 Link State ID: 192.168.11.1 (summary Network Number)

 Advertising Router: 91.1.1.1

 LS Seq Number: 80000001

 Checksum: 0x1355

 Length: 28

 Network Mask: /32

       TOS: 0  Metric: 1

现在启用MAX-LSA功能 在R2

R2:

router ospf 110

max-lsa 4 ignore-time 1//设定的阈值是3=4*75%  ignore-time重置邻接关系时间为1分钟

R2(config-router)#

*Mar  1 00:29:13.227: %OSPF-5-ADJCHG: Process 110, Nbr 91.1.1.1 on Serial1/1 from FULL to DOWN, Neighbor Down: Interface down or detached

*Mar  1 00:29:13.335: %OSPF-4-OSPF_MAX_LSA_THR: Threshold for maximum number of non self-generated LSA has been reached "ospf 110" - 3 LSAs

*Mar  1 00:29:13.335: %OSPF-4-OSPF_MAX_LSA: Maximum number of non self-generated LSA has been exceeded "ospf 110" - 5 LSAs

R2(config-router)#

*Mar  1 00:29:13.339: %OSPF-5-ADJCHG: Process 110, Nbr 91.1.1.1 on Serial1/1 from LOADING to FULL, Loading Done

show ip ospf可以查看max-lsa的值

R2(config-router)#do show ip ospf

Routing Process "ospf 110" with ID 92.2.2.2

Start time: 00:01:27.968, Time elapsed: 00:59:38.028

Supports only single TOS(TOS0) routes

Supports opaque LSA

Supports Link-local Signaling (LLS)

Supports area transit capability

Maximum number of non self-generated LSA allowed 100

   Threshold for warning message 75%

   Ignore-time 1 minutes, reset-time 2 minutes

   Ignore-count allowed 5, current ignore-count 0

Router is not originating router-LSAs with maximum metric

Initial SPF schedule delay 5000 msecs

Minimum hold time between two consecutive SPFs 10000 msecs

Maximum wait time between two consecutive SPFs 10000 msecs

Incremental-SPF disabled

Minimum LSA interval 5 secs

Minimum LSA arrival 1000 msecs

LSA group pacing timer 240 secs

Interface flood pacing timer 33 msecs

Retransmission pacing timer 66 msecs

Number of external LSA 0. Checksum Sum 0x000000

Number of opaque AS LSA 0. Checksum Sum 0x000000

Number of DCbitless external and opaque AS LSA 0

Number of DoNotAge external and opaque AS LSA 0

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Number of areas transit capable is 0

External flood list length 0

IETF NSF helper support enabled

Cisco NSF helper support enabled

   Area BACKBONE(0)

       Number of interfaces in this area is 2 (1 loopback)

       Area has no authentication

       SPF algorithm last executed 00:00:09.296 ago

       SPF algorithm executed 1 times

       Area ranges are

       Number of LSA 6. Checksum Sum 0x0631BD

       Number of opaque link LSA 0. Checksum Sum 0x000000

       Number of DCbitless LSA 0

       Number of indication LSA 0

       Number of DoNotAge LSA 0

       Flood list length 0


COST值修改的两种方法:

1、ip ospf cost  接口模式下

R2#show ip ospf interface s1/1

Serial1/1 is up, line protocol is up

 Internet Address 12.1.1.2/24, Area 0

 Process ID 110, Router ID 92.2.2.2, Network Type POINT_TO_POINT, Cost: 100

 Transmit Delay is 1 sec, State POINT_TO_POINT

 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

   oob-resync timeout 40

   Hello due in 00:00:02

 Supports Link-local Signaling (LLS)

 Cisco NSF helper support enabled

 IETF NSF helper support enabled

 Index 1/1, flood queue length 0

 Next 0x0(0)/0x0(0)

 Last flood scan length is 1, maximum is 1

 Last flood scan time is 0 msec, maximum is 4 msec

 Neighbor Count is 1, Adjacent neighbor count is 1

   Adjacent with neighbor 91.1.1.1

 Suppress hello for 0 neighbor(s)

EIGRP 是怎么修改metric值的呢?

2、修改默认带宽参考值,默认10^8

  auto-cost reference-bandwidth  1000  //参考带宽为10^9 这是在进程模式下

  R2

  router ospf 110

  auto-cost reference-bandwidth 1000

  需要在域内的所有路由器都配置一致的配置

  R1

  router ospf 110

  auto-cost reference-bandwidth 1000

show ip ospf interface s1/1

R2(config-router)#do show ip ospf interface s1/1

Serial1/1 is up, line protocol is up

 Internet Address 12.1.1.2/24, Area 0

 Process ID 110, Router ID 92.2.2.2, Network Type POINT_TO_POINT, Cost: 100

 Transmit Delay is 1 sec, State POINT_TO_POINT

 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

   oob-resync timeout 40

   Hello due in 00:00:05

 Supports Link-local Signaling (LLS)

 Cisco NSF helper support enabled

 IETF NSF helper support enabled

 Index 1/1, flood queue length 0

 Next 0x0(0)/0x0(0)

 Last flood scan length is 1, maximum is 1

 Last flood scan time is 0 msec, maximum is 4 msec

 Neighbor Count is 1, Adjacent neighbor count is 1

   Adjacent with neighbor 91.1.1.1

 Suppress hello for 0 neighbor(s)

为什么是100,为什么不是647呢?想起来了,设置了ip ospf cost 100

看来这个优先级还是比较高的,no ip ospf cost 100

再show就可以了


OSPF 汇总:域间和域×××总

对于汇总我们需要关心的几个方面:

1、在什么模式下,例如在路由进程模式下的汇总

2、会不会产生Null0接口,OSPF是会的哦

3、汇总路由会在什么条件下消失,当然是在所有明细路由消失的时候

4、汇总后的cost值的选择,一般是明细路由当中最小的那个

实验基于上面的拓扑图来做

在R2上启用如下接口IP地址:

202.96.16.1/24

202.96.17.1/24

202.96.18.1/24

202.96.19.1/24

R2

interface loopback 16

ip add 202.96.16.1 255.255.255.0

interface loopback 17

ip add 202.96.17.1 255.255.255.0

interface loopback 18

ip add 202.96.18.1 255.255.255.0

interface loopback 19

ip add 202.96.19.1 255.255.255.0

router ospf 110

network 202.96.16.0 0.0.3.255 area 0

R4(config-router)#do show ip route ospf | include 202

    202.96.19.0/32 is subnetted, 1 subnets

O IA    202.96.19.1 [110/65] via 24.1.1.2, 00:10:56, Serial0/0

    202.96.18.0/32 is subnetted, 1 subnets

O IA    202.96.18.1 [110/65] via 24.1.1.2, 00:10:56, Serial0/0

    202.96.17.0/32 is subnetted, 1 subnets

O IA    202.96.17.1 [110/65] via 24.1.1.2, 00:10:56, Serial0/0

    202.96.16.0/32 is subnetted, 1 subnets

O IA    202.96.16.1 [110/65] via 24.1.1.2, 00:10:56, Serial0/0

我们看到了明细路由已经宣告给有邻接关系的R4了,如果需要汇总的话,该怎么做呢?

在哪里做呢?

R2

router ospf 110

area 0 rang 202.96.16.0 255.255.252.0


R4(config)#do show ip route ospf | include 202

O IA 202.96.16.0/22 [110/65] via 24.1.1.2, 00:00:09, Serial0/0

汇总效果已经出来

R2(config-router)#area 0 range 202.96.16.0 255.255.252.0 ?

 advertise      Advertise this range (default)

 cost           User specified metric for this range

 not-advertise  DoNotAdvertise this range

 <cr>

这里有三个参数

第一个参数我们就不说了,后面的default的已经很说明问题了

cost就是设置汇总路由的cost值的,默认为1

area 0 rang 202.96.16.0 255.255.252.0 cost 20

R4(config)#do show ip route ospf | include 202

O IA 202.96.16.0/22 [110/65] via 24.1.1.2, 00:00:09, Serial0/0

R4#show ip route | include 202

O IA 202.96.16.0/22 [110/84] via 24.1.1.2, 00:00:29, Serial0/0

看到了吧,加了20了哦!

not-advertise 就是不通告具体的明细路由,具体怎么用呢?

实验得知,在没有汇总前,可以将具体的明细路由不通告给对方

假如你不想让202.96.16.0/24、202.96.17.0/24不通告给邻居,就可以使用如下命令

area 0 range 202.96.16.0 255.255.254.0 not-advertise

R4#show ip route | include 202

    202.96.19.0/32 is subnetted, 1 subnets

O IA    202.96.19.1 [110/65] via 24.1.1.2, 00:00:47, Serial0/0

    202.96.18.0/32 is subnetted, 1 subnets

O IA    202.96.18.1 [110/65] via 24.1.1.2, 00:00:47, Serial0/0

上面是通过在进程下进行的路由汇总,现在通过接口模式下进行路由汇总(OSPF只支持进程下)


现在在R5上添加如下环回口198.8.8.5/24 198.8.9.5 /24

然后汇总

R5(config-if)#ip summary-address rip 198.8.8.0 255.255.254.0

Summary mask must be greater or equal to major net

呵呵,RIP不支持路由聚合哦!

所以举例的IP地址需要选好了

在此不赘述了


向OSPF中注入默认路由,通过配置R2向整个AS域中注入默认路由

R2

ip route 0.0.0.0 0.0.0.0 null0//因为没有模拟的外网接口,所以就让Null0接口代替了

router ospf 110

default-information originate

R2(config-router)#default-information originate ?

 always       Always advertise default route

 metric       OSPF default metric

 metric-type  OSPF metric type for default routes

 route-map    Route-map reference

 <cr>

R2(config-router)#default-information originate ?

 always       Always advertise default route

 metric       OSPF default metric

 metric-type  OSPF metric type for default routes

 route-map    Route-map reference

 <cr>

R2(config-router)#default-information originate ?

 always       Always advertise default route

 metric       OSPF default metric

 metric-type  OSPF metric type for default routes

 route-map    Route-map reference

 <cr>

R2(config-router)#default-information originate ?

 always       Always advertise default route

 metric       OSPF default metric

 metric-type  OSPF metric type for default routes

 route-map    Route-map reference

 <cr>

R2(config-router)#default-information originate ?

 always       Always advertise default route

 metric       OSPF default metric

 metric-type  OSPF metric type for default routes

 route-map    Route-map reference

 <cr>

O*E2 0.0.0.0/0 [110/1] via 24.1.1.2, 00:00:05, Serial0/0

这条就是默认路由,属于E2类型的,可以在上述命令的参数metric-type做出选择

而metric就是cost值,默认为1

always需要说明,看到上面是做了默认路由后,也就是需要两条命令

而always可以在没有默认路由的条件下,强制下放默认路由到OSPF域中

通过对metric和metric-type的灵活使用,可以实现双线接入的负载均衡和备份的作用哦!