设为首页收藏本站language 语言切换
查看: 1689|回复: 0
收起左侧

[分享] OSPF的外部路由

[复制链接]
发表于 2022-8-17 16:45:02 | 显示全部楼层 |阅读模式
65BCC310-1135-4157-8827-69A3E450BC4D_4_5005_c.jpeg
HCIEv3.0
1.vlink
还可以作为一种路由的临时手段
只有同一级别的路由才会对比cost
区域内部的路由优于区域之间的路由,区域之间优于外部路由,外部路由类型1优于外部类型2

2.外部路由
[R6-ospf-1]import-route direct
<R1>dis ospf lsdb ase 6.6.6.6

         OSPF Process 1 with Router ID 0.0.0.1
                 Link State Database


  Type      : External
  Ls id     : 6.6.6.6 //路由
  Adv rtr   : 0.0.0.6 //ASBR的RID
  Ls age    : 109
  Len       : 36
  Options   :  E  
  seq#      : 80000001
  chksum    : 0xc5ec
  Net mask  : 255.255.255.255
  TOS 0  Metric: 1 //度量值默认为1,OSPF外部路由类型2,cost在域内不累加
  E type    : 2 //类型为外部类型2,类型1在区域内累加
  Forwarding Address : 0.0.0.0 //转发地址,即下一跳,如果是0.0.0.0的话就参照正常的路由(指向ASBR)
  Tag       : 1
  Priority  : Medium
5类LSA,
通告者:ASBR
传输范围:整个OSPF domain(域)
内容和功能:描述外部路由
如果外部类型类型相同,cost相同,会优选较大的区域ID
[R1-ospf-1]import-route direct cost 10 tag 11 type 1
dis ip rou 1.1.1.1 ver
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1

Destination: 1.1.1.1/32
     Protocol: O_ASE            Process ID: 1
   Preference: 150                    Cost: 59
      NextHop: 10.1.35.5         Neighbour: 0.0.0.0
        State: Active Adv              Age: 00h00m15s
          Tag: 11                 Priority: medium
        Label: NULL                QoSInfo: 0x0
   IndirectID: 0x0              
RelayNextHop: 0.0.0.0           Interface: GigabitEthernet0/0/0
     TunnelID: 0x0                   Flags:  D
4类LSA,
通告者:ASBR所在区域的ABR
传输范围:除了ASBR所在区域,整个OSPF domain(域)
内容和功能:描述ASBR的RID
ospf 1 router-id 5.5.5.5
peer 10.1.1.1
area 0.0.0.0
area 0.0.0.15
area 0.0.0.35
area 0.0.0.56
  network 10.1.56.5 0.0.0.0
---------------------------
普通区域的转发地址

[R1]dis ospf lsdb ase 6.6.6.6

         OSPF Process 1 with Router ID 0.0.0.1
                 Link State Database


  Type      : External
  Ls id     : 6.6.6.6
  Adv rtr   : 10.1.15.3  
  Ls age    : 216
  Len       : 36
  Options   :  E  
  seq#      : 80000001
  chksum    : 0x90eb
  Net mask  : 255.255.255.255
  TOS 0  Metric: 1
  E type    : 2
  Forwarding Address : 10.1.15.5 //非0,路由表的下一跳为转发地址,实现了转发的优化
  Tag       : 1
  Priority  : Medium
某些监管下,一定要求流量从一个接入、再转出
interface Vlanif15
ip address 10.1.15.3 255.255.255.0
ospf network-type p2p
ospf enable 1 area 0.0.0.15
[R1-GigabitEthernet0/0/1]dis ospf lsdb ase 6.6.6.6

         OSPF Process 1 with Router ID 0.0.0.1
                 Link State Database


  Type      : External
  Ls id     : 6.6.6.6
  Adv rtr   : 10.1.15.3  
  Ls age    : 68
  Len       : 36
  Options   :  E  
  seq#      : 80000002
  chksum    : 0xa90
  Net mask  : 255.255.255.255
  TOS 0  Metric: 1
  E type    : 2
  Forwarding Address : 0.0.0.0 //转发地址为0.0.0.0
  Tag       : 1
  Priority  : Medium
[R1-GigabitEthernet0/0/1]dis ip rou 6.6.6.6
Route Flags: R - relay, D - download to fib
作业:验证转发的地址两种场景0.0.0.0和非0
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

3.特殊区域
WHY?更有效率的管理OSPF的LSA
STUB区域(末节),不能接收外部的LSA,E=0,取而代之用一条默认路由去访问外部网络
官方微信.jpeg
添加客服了解更多~

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-29 23:15 , Processed in 0.117710 second(s), 25 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表