LSA类型的配置与查看

1基本配置
R1(config)#NO IP DO LO
R1(config)#NO ENAble PAssword
R1(config)#LINe COnsole 0
R1(config-line)#LOGGing SYnchronous
R1(config-line)#EXEC-Timeout 0 0
R1(config-line)#LOGIn

R2(config)#NO IP DO LO
R2(config)#NO ENAble PAssword
R2(config)#LINe COnsole 0
R2(config-line)#LOGGing syn
R2(config-line)#exec-timeout 0 0
R2(config-line)#login

R3(config)#NO IP DO LO
R3(config)#line con 0
R3(config-line)#logging syn
R3(config-line)#exec-time 0 0
R3(config-line)#login

SW(config)#no ip do lo

R1#wr //保存
R2#wr
R3#wr

一、——类型1
配置连线
R1(config)#inter s1/0
R1(config-if)#ip address 192.1.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#inter lo 1
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point

R1(config-if)#inter s1/1
R1(config-if)#ip add 192.1.13.1 255.255.255.0
R1(config-if)#n shu

R2(config)#inter s1/0
R2(config-if)#ip add 192.1.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#inter lo 1
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#ip ospf network point-to-point

R3(config)#inter s1/1
R3(config-if)#ip add 192.1.13.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#inter lo 1
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#ip ospf network point-to-point

3、可以查看下接口
R1#show ip inter brief
R2#show run inter s1/0(排错使用)

4、启用OSPF协议
R1(config)#router ospf 100
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.1.12.0 0.0.0.255 a 0
R1(config-router)#network 192.1.13.0 0.0.0.255 a 0
R1(config-router)#network 1.1.1.0 0.0.0.255 a 0

R2(config)#router ospf 100
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 192.1.12.0 0.0.0.255 a 0
R2(config-router)#network 2.2.2.0 0.0.0.255 a 0

R3(config)#router ospf 100
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 192.1.13.0 0.0.0.255 a 0
R3(config-router)#network 3.3.3.0 0.0.0.255 a 0

5、查看邻居
R3#show ip ospf neighbor  (会显示1.1.1.1的邻居)

6、测试连通
R1#ping 2.2.2.2
R1#ping 3.3.3.3

7查看路由连接类型
R1#show ip ospf database ?
  adv-router        Advertising Router link states
  asbr-summary      ASBR summary link states
  database-summary  Summary of database
  external          External link states
  network           Network link states
  nssa-external     NSSA External link states
  opaque-area       Opaque Area link states
  opaque-as         Opaque AS link states
  opaque-link       Opaque Link-Local link states
  router            Router link states
  self-originate    Self-originated link states
  summary           Network summary link states
  |                 Output modifiers

R1#show ip ospf database router

查看路由
R1#SHOW IP ROUte

R2#show ip ospf database(他们之间的数据是一样的)

二、——查看NETWORKLSA

配置交换机连线
R1(config)#INTER FA0/0
R1(config-if)#IP ADD 192.168.1.1 255.255.255.0
R1(config-if)#NO SHUT

R2(config)#inter fa0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut

R3(config)#inter fa0/0
R3(config-if)#ip add 192.168.1.3 255.255.255.0
R3(config-if)#no shut

其中会提示不匹配,这时可以配置为100兆
R3(config-if)#speed 100
R3(config-if)#duplex full (改为全双工)

R1(config-if)#speed 100
R1(config-if)#duplex full

R2(config-if)#speed 100
R2(config-if)#duplex full

查看广播地址
R1#show ip inter brief
测试连通
R1#ping 192.168.1.2
R1#ping 192.168.1.3

宣告在一个网络中(宣告的同时会进行BDR选择)
R3(config-if)#router ospf 100
R3(config-router)#network 192.168.1.0 0.0.0.255 a 0

R1(config)#router ospf 100
R1(config-router)#network 192.168.1.0 0.0.0.255 a 0

R2(config-if)#router ospf 100
R2(config-router)#network 192.168.1.0 0.0.0.255 a 0

查看他们之间的状态
R1#   show ip ospf neighbor

R1#show ip ospf interface fa0/0

查看类型
R1#show ip ospf database network

三、——查看类型三

配置
R2(config)#inter lo 1
R2(config-if)#inter lo 11
R2(config-if)#ip add 20.20.20.1 255.255.255.0
R2(config-if)#ip ospf network point-to-p(类型为点到点)
宣告到区域1中
R2(config-router)#network 20.20.20.0 0.0.0.255 a 1

R3(config-router)#inter lo 11
R3(config-if)#ip add 30.30.30.1 255.255.255.0
R3(config-if)#ip ospf network point-to-p
R3(config-if)#router ospf 100
R3(config-router)#network 30.30.30.0 0.0.0.255 a 2

配置好后就形成了多区域
查看数据库
R1#show ip ospf database(此时有三个类型)
单独查看——比如查看类型三
R1#show ip ospf database summary
此时路由表中就有OIA(区域1和2的)
R1#show ip route

测试PING一下
R1#ping 20.20.20.1
R1#ping 30.30.30.1

四、——查看类型4(要产生类型4首先需要其他的类型协议涉及进来)
R1(config)#inter lo 2
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#ip ospf network point-to-p

使用一条重分发命令,重分发直连的路由
R1(config-router)#redistribute connected subnets

查看数据库(此时已经存在类型5)
R1#show ip ospf database
R1#show ip ospf database external(查看类型5详细信息)

查看ASBR及类型4
只有在区域1或2中查看
R2#show ip ospf database
R2#show ip ospf database asbr-summary(查看详细)

查看路由表
R2#show ip route(此时可以看到会有OE2这条外部陆游)

R2#ping 10.10.10.1

查看R3的路由表(同样存在OE2)
R3#show ip rou
R3#ping 10.10.10.1

OSPF LSA的详解的更多相关文章

  1. 《OSPF和IS-IS详解》

    <OSPF和IS-IS详解> 基本信息 作者: (美)Jeff Doyle 译者: 孙余强 出版社:人民邮电出版社 ISBN:9787115347886 上架时间:2014-4-25 出版 ...

  2. 《OSPF和IS-IS详解》一1.5 ARPANET内的路由选择

    本节书摘来异步社区<OSPF和IS-IS详解>一书中的第1章,第1.5节,作者: [美]Jeff Doyle 译者: 孙余强 责编: 傅道坤,更多章节内容可以访问云栖社区"异步社 ...

  3. 动态路由 - OSPF 一文详解

    动态路由 在之前的文章中,介绍了基于距离矢量的路由协议.而在今天这这一部分中会主要讲解链路状态的路由协议,对于动态的路由协议来说,需要具备如下的能力: 发现远端网络 路由器可以直接获得直连路由,这是由 ...

  4. OSPF外部实验详解

  5. 动态选路、RIP协议&&OSPF协议详解

    动态选路.RIP协议&&OSPF协议详解 概念 当相邻路由器之间进行通信,以告知对方每个路由器当前所连接的网络,这时就出现了动态选路.路由器之间必须采用选路协议进行通信,这样的选路协议 ...

  6. OSPF协议详解

    CCNP OSPF协议详解 2010-02-24 20:30:22 标签:CCNP 职场 OSPF 休闲 OSPF(Open Shortest Path Fitst,ospf)开放最短路径优先协议,是 ...

  7. OSPF详解

    OSPF 详解 (1) [此博文包含图片] (2013-02-04 18:02:33) 转载 ▼ 标签: 端的 第二 以太 第一个 正在 目录 序言 初学乍练 循序渐进学习OSPF 朱皓 入门之前 了 ...

  8. Cisco路由技术基础知识详解

    第一部分 请写出568A的线序(接触网络第一天就应该会的,只要你掐过,想都能想出来) .网卡MAC地址长度是(  )个二进制位(16进制与2进制的换算关系,只是换种方式问,不用你拿笔去算) A.12  ...

  9. TCP/IP详解 (转)

    TCP/IP详解学习笔记(1)-基本概念 为什么会有TCP/IP协议 在世界上各地,各种各样的电脑运行着各自不同的操作系统为大家服务,这些电脑在表达同一种信息的时候所使用的方法是千差万别.就好像圣经中 ...

随机推荐

  1. 【M33】将非尾端类设计为抽象类

    1.考虑下面的需求,软件处理动物,Cat与Dog需要特殊处理,因此,设计Cat和Dog继承Animal.Animal有copy赋值(不是虚方法),Cat和Dog也有copy赋值.考虑下面的情况: Ca ...

  2. linux C(undefined reference to `sqrt')

    那是因为没有链接到math库 可以这样来做,在后面加上-lm. 代码如下: gcc 10.c -o 10 -lm

  3. k-means聚类JAVA实例

    <mahout in action>第六章. datafile/cluster/simple_k-means.txt数据集例如以下: 1 1 2 1 1 2 2 2 3 3 8 8 8 9 ...

  4. Foundation框架之NSArray、NSDictionary、NSSet及其Mutable类型

    Foundation框架之NSArray.NSDictionary.NSSet及其Mutable类型 目录 概述——对Foundation框架集合类的理解 NSArray NSDictionary N ...

  5. 0c-34-自动释放池

    #import <Foundation/Foundation.h> #import "Person.h" Person * creatPerson() { Person ...

  6. Orm图解教程

    entity framework框架生成摘要文档为空(没有元数据文档可用)的bug解决方案 西安.王磊 2012-10-25 10:47 阅读:1234 评论:2   ORM for Net主流框架汇 ...

  7. 创建MS Office 和 WPS 兼容插件

    在工作中我们要实现一个功能,需要创建MS Office 和 WPS 兼容插件,也就是创建一个DLL,可以同时兼容office和wps.这样带来的好处就是只需要维护同一份代码,大大降低维护的工作! 1. ...

  8. HTTP权威指南学习心得

    一.HTTP请求的步骤: 1.从url中读取主机名 2.利用DNS(domain name service)对主机名进行转换,得到IP地址 3.如果有端口号的话,读取端口号 4.根据IP地址和端口号, ...

  9. C# 之 HttpWebResponse类

    提供 WebResponse 类的 HTTP 特定的实现.       继承层次结构 ,"System.Object→System.MarshalByRefObject→System.Net ...

  10. java邮件发送 qq与163邮箱互发和qq和163邮箱发送其他邮箱实例

    研究了近一天的时间,通过查阅相关资料,终于对java发送邮件的机制,原理有了一点点的理解,希望能够帮到大家! 1.首先要向你的项目里导入1个jar包:mail-1.4.4.jar即可(实现qq和163 ...