zoukankan      html  css  js  c++  java
  • ospf路由认证


    一、基础配置

     1 1、配置ip地址,保证直连连通
     2 ip add 12.1.1.1
     3 
     4 2、部署ospf多区域,实现全网连通
     5 router ospf 1
     6 router-id 1.1.1.1
     7 network 192.168.1.0 0.0.0.255 area 0
     8 
     9 3、查看
    10 show ip ospf neighbor
    11 show  ip  ospf  interface  f0/0 
    12 
    13 4、清楚缓存
    14 clear ip ospf process
    15 
    16 AS间汇总(协议之间)
    17 Router ospf 100
    18 Summary-address+汇总路由
    19 ABR间汇总(区域之间)
    20 Router ospf 100
    21 Area O range+汇总路由

    二、认证分类

    1、链路认证

    又叫接口认证

    1.1、配置

    1 interface Serial1/0
    2 ip ospf authentication//开启明文认证
    3 ip ospf authentication-key cisco123//定义明文密码
    4 
    5 interface Serial1/0
    6 ip ospf authentication message-digest//开启MD5认证
    7 ip ospf message-digest-key 1 md5 cisco123//定义MD5密钥

    2、区域认证

    2.1、配置

    router ospf 100
    area 0 authentication message-digest  //在区域O的所有接口开启MD5认证
    int fo/0
    ip ospf message-digest-key 1 md5 cisco123  //为邻居路由器指定一个口令
    ip ospf authentication message-digest         //在接口指定特定的认证类型为MD5认证
    
    注明:
    不同接口的密钥可以不同
    一边开启认证,另一边邻居没开启,则认证失败

    三、默认路由

    配置

     1 方法一:
     2 ip route 0.0.0.0 0.0.0.0出口/IP地址
     3 Router ospf 100
     4 Default-information originate
     5 
     6 方法二:
     7 Router ospf 100
     8 Default-information originate always
     9 
    10 拓展参数
    11 default-information originate always metric 200 metric-type 1
    12 //不管本地是否有静态默认路由,本地都通告下去
    13 
    14 由其他路由导入进来的路由会由个E的标志
    15 E2 OSPF路由cost不累加,E1累加
    16 两条同样的路由出现时,E1优先于E2

    四、ospf的路由分组

    1、ospf的邻居建立

    1. Down:两边都处于“沉默”状态;

    2. Init:一边开始发送hello分组;

    3. 2 way:两边相互发送hello分组,并且处于“邻居状态” neighbor 此状态下在执行DR/BDR选举;

    4. Exstart:在执行Master/Slave选举;

    5. Exchange:交换DBD分组;

    6. Loading:相互加载对方链路状态信息;

    7. Full:表示数据库达到一致,此时处于"邻接状态".

    【邻居状态+链路状态交互==>邻接状态】

     2、ospf的DR/BDR选举

    DR:指定路由器

    BDR:备用路由器

     

    show ip ospf interface f0/0

    DR的选举∶ 1.选择优先级较大<0-255,默认为1>; 2.选择邻居RID较大

     

    DR/BDR特征: 1.不支持抢占; 2.DR/BDR是针对接口的概念, 不同接口角色可能不同. 3.若接口优先级为0,则表示退出选举.

     

    DR/BDR地址: DR/BDR对外发送路由条目,以224.0.0.5(表示DRother接收)发送; DRother对外发送路由条目,以224.0.0.6(表示DR/BDR接收)发送;

     

    接口优先级篡改:

    int f0/0

    ip ospf prioriyt 0-255

     

    3、ospf的主从选举

    主从机制的功能:用于实现DBD目录信息的可靠传输

    Master在每个DBD内置序列号(会递增),slave在每次收到DBD之后,下一次的DBD要内置这个序列号,用来表示收到上次的信息了

    主从选举表面只是一种关系选举,实际上时一种可靠更新机制,保证DBD数据库描述信息的可靠交互

    4、ospf的11种LSA

    LSDB(Link-state Database):链路状态数据数据库 一张地图

    LSU(Link-state Update):链路状态更新 地图的某条路径

    LSA(Link-state Advertisement):链路状态通告 某条路径的具体描述

    注:LUS包含了LSA的信息

     

     

  • 相关阅读:
    Codeforces467C George and Job
    Codeforces205E Little Elephant and Furik and RubikLittle Elephant and Furik and Rubik
    Codeforce205C Little Elephant and Interval
    51nod1829 函数
    51nod1574 排列转换
    nowcoder35B 小AA的数列
    Codeforce893E Counting Arrays
    gym101612 Consonant Fencity
    CodeForces559C Gerald and Giant Chess
    CodeForces456D A Lot of Games
  • 原文地址:https://www.cnblogs.com/eighty-five/p/13649048.html
Copyright © 2011-2022 走看看