OSPF LSA的详解
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的详解的更多相关文章
- 《OSPF和IS-IS详解》
<OSPF和IS-IS详解> 基本信息 作者: (美)Jeff Doyle 译者: 孙余强 出版社:人民邮电出版社 ISBN:9787115347886 上架时间:2014-4-25 出版 ...
- 《OSPF和IS-IS详解》一1.5 ARPANET内的路由选择
本节书摘来异步社区<OSPF和IS-IS详解>一书中的第1章,第1.5节,作者: [美]Jeff Doyle 译者: 孙余强 责编: 傅道坤,更多章节内容可以访问云栖社区"异步社 ...
- 动态路由 - OSPF 一文详解
动态路由 在之前的文章中,介绍了基于距离矢量的路由协议.而在今天这这一部分中会主要讲解链路状态的路由协议,对于动态的路由协议来说,需要具备如下的能力: 发现远端网络 路由器可以直接获得直连路由,这是由 ...
- OSPF外部实验详解
- 动态选路、RIP协议&&OSPF协议详解
动态选路.RIP协议&&OSPF协议详解 概念 当相邻路由器之间进行通信,以告知对方每个路由器当前所连接的网络,这时就出现了动态选路.路由器之间必须采用选路协议进行通信,这样的选路协议 ...
- OSPF协议详解
CCNP OSPF协议详解 2010-02-24 20:30:22 标签:CCNP 职场 OSPF 休闲 OSPF(Open Shortest Path Fitst,ospf)开放最短路径优先协议,是 ...
- OSPF详解
OSPF 详解 (1) [此博文包含图片] (2013-02-04 18:02:33) 转载 ▼ 标签: 端的 第二 以太 第一个 正在 目录 序言 初学乍练 循序渐进学习OSPF 朱皓 入门之前 了 ...
- Cisco路由技术基础知识详解
第一部分 请写出568A的线序(接触网络第一天就应该会的,只要你掐过,想都能想出来) .网卡MAC地址长度是( )个二进制位(16进制与2进制的换算关系,只是换种方式问,不用你拿笔去算) A.12 ...
- TCP/IP详解 (转)
TCP/IP详解学习笔记(1)-基本概念 为什么会有TCP/IP协议 在世界上各地,各种各样的电脑运行着各自不同的操作系统为大家服务,这些电脑在表达同一种信息的时候所使用的方法是千差万别.就好像圣经中 ...
随机推荐
- Codeforces Round #245 (Div. 1) 429D - Tricky Function 最近点对
D. Tricky Function Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 codeforces.com/problemset/problem/42 ...
- loading-show-hide
https://github.com/eltld/loading-show-hide
- 都是类型惹的祸——小心unsigned
正如我们所知道的,编程语句都有很多的基本数据类型,如char,inf,float等等,而在C和C++中还有一个特殊的类型就是无符号数,它由unsigned修饰,如unsigned int等.大家有没想 ...
- poj - 2774 - Long Long Message
题意:输入2个长度不超过100000的字符串,问它们最长公共子串的长度. 题目链接:http://poj.org/problem?id=2774 ——>>后缀数组!后缀数组!-从LJ的&l ...
- java 验证码图片处理类,为验证码识别做准备
/* * To change this template, choose Tools | Templates * and open the template in the editor. */pack ...
- iOS开发——多线程OC篇&(十一)多线程NSOperation高级用法
自定义NSOperation 一.实现一个简单的tableView显示效果 实现效果展示: 代码示例(使用以前在主控制器中进行业务处理的方式) 1.新建一个项目,让控制器继承自UITableViewC ...
- Php-SPL库中的迭代器类详解(转)
SPL提供了多个迭代器类,分别提供了迭代访问.过滤数据.缓存结果.控制分页等功能.,因为php总是在不断壮大,我尽可能列出SPL中所有的迭代类.下面其中一些迭代器类是需要php5.4,另外一些如Sea ...
- DP之矩阵连乘问题
最优二叉查找树的一道思考习题 同最优二叉查找树一样,矩阵连乘问题也是一个卡特兰数问题(其动态规划的构造过程都很像) 分析解答: a,铺垫的数学知识首先要搞清楚矩阵相乘是怎么乘的: 1)对于连续的n个矩 ...
- MySQL · 特性分析 · 内部临时表
http://mysql.taobao.org/monthly/2016/06/07/#rd MySQL中的两种临时表 外部临时表 通过CREATE TEMPORARY TABLE 创建的临时表,这种 ...
- Linux 测试网速
Linux 测试网速 1.直接wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip 一个10M的文件, ...