ospf多区域实例配置
需求:是pc1,pc2,pc3直接可以相互通信,ip分别pc1:192.168.1.2 pc2:192.168.3.2 pc3:192.168.5.2

LSW1配置:
首先划分vlan,vlan中配置ip,把端口划分到vlan中,给端口配置ip,ospf宣告网段,IP段是根据子网划分的,这里划分的是192.168.2.1 255.255.255.252 30位掩码
[Huawei]dis current-configuration
#
sysname Huawei
#
vlan batch 10
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
ip address 192.168.1.1 255.255.255.0
#
interface Vlanif10
ip address 192.168.2.1 255.255.255.252
#
interface MEth0/0/1
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
#
interface Ethernet0/0/2
port link-type access
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ospf 1
area 0.0.0.100
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.3
#
user-interface con 0
user-interface vty 0 4
#
return
学习到的网段
<Huawei>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif1
192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif1
192.168.2.0/30 Direct 0 0 D 192.168.2.1 Vlanif10
192.168.2.1/32 Direct 0 0 D 127.0.0.1 Vlanif10
192.168.2.4/30 OSPF 10 2 D 192.168.2.2 Vlanif10
192.168.3.0/24 OSPF 10 3 D 192.168.2.2 Vlanif10
192.168.4.0/24 OSPF 10 3 D 192.168.2.2 Vlanif10
192.168.5.0/24 OSPF 10 4 D 192.168.2.2 Vlanif10
LSW2配置:
首先划分vlan,vlan中配置ip,把端口划分到vlan中,给端口配置ip,ospf宣告网段,IP段是根据子网划分的,这里划分的是192.168.2.4/5 255.255.255.252 30位掩码
<Huawei>dis current-configuration
#
sysname Huawei
#
vlan batch 10 20
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif10
ip address 192.168.2.2 255.255.255.252
#
interface Vlanif20
ip address 192.168.2.5 255.255.255.252
#
interface MEth0/0/1
#
interface Ethernet0/0/1
port link-type access
port default vlan 20
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ospf 1
area 0.0.0.100
network 192.168.2.4 0.0.0.3
network 192.168.2.0 0.0.0.255
#
user-interface con 0
user-interface vty 0 4
#
return
学习到的网段
<Huawei>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 2 D 192.168.2.1 Vlanif10
192.168.2.0/30 Direct 0 0 D 192.168.2.2 Vlanif10
192.168.2.2/32 Direct 0 0 D 127.0.0.1 Vlanif10
192.168.2.4/30 Direct 0 0 D 192.168.2.5 Vlanif20
192.168.2.5/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.3.0/24 OSPF 10 2 D 192.168.2.6 Vlanif20
192.168.4.0/24 OSPF 10 2 D 192.168.2.6 Vlanif20
192.168.5.0/24 OSPF 10 3 D 192.168.2.6 Vlanif20
CE1配置:
首先划分vlan,vlan中配置ip,把端口划分到vlan中,给端口配置ip,ospf宣告网段,IP段是根据子网划分的,这里划分的是192.168.2.6 255.255.255.252 30位掩码
[~HUAWEI]dis current-configuration
!Software Version V800R013C00SPC560B560
!Last configuration was updated at 2019-04-02 23:57:11+00:00
#
sysname HUAWEI
#
device board 17 board-type CE-MPUB
device board 1 board-type CE-LPUE
#
vlan batch 20 30 40
#
aaa
#
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
domain default_admin
#
interface Vlanif20
ip address 192.168.2.6 255.255.255.252
#
interface Vlanif30
ip address 192.168.3.1 255.255.255.0
#
interface Vlanif40
ip address 192.168.4.1 255.255.255.0
#
interface MEth0/0/0
undo shutdown
#
interface GE1/0/0
undo shutdown
port default vlan 30
#
interface GE1/0/1
undo shutdown
port default vlan 40
#
interface GE1/0/2
undo shutdown
port default vlan 20
#
interface NULL0
#
ospf 1
area 0.0.0.0
network 192.168.4.0 0.0.0.255
area 0.0.0.100
network 192.168.2.4 0.0.0.3
network 192.168.3.0 0.0.0.255
#
ssh authorization-type default aaa
#
user-interface con 0
#
vm-manager
#
return
学习到的网段:
[~HUAWEI]dis ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 16 Routes : 16 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 3 D 192.168.2.5 Vlanif20
192.168.2.0/30 OSPF 10 2 D 192.168.2.5 Vlanif20
192.168.2.4/30 Direct 0 0 D 192.168.2.6 Vlanif20
192.168.2.6/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.2.7/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.3.0/24 Direct 0 0 D 192.168.3.1 Vlanif30
192.168.3.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
192.168.3.255/32 Direct 0 0 D 127.0.0.1 Vlanif30
192.168.4.0/24 Direct 0 0 D 192.168.4.1 Vlanif40
192.168.4.1/32 Direct 0 0 D 127.0.0.1 Vlanif40
192.168.4.255/32 Direct 0 0 D 127.0.0.1 Vlanif40
192.168.5.0/24 OSPF 10 2 D 192.168.4.2 Vlanif40
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
CE2配置:
首先划分vlan,vlan中配置ip,把端口划分到vlan中,给端口配置ip,ospf宣告网段
[~HUAWEI-GE1/0/1]dis current-configuration
!Software Version V800R013C00SPC560B560
!Last configuration was updated at 2019-04-02 23:52:32+00:00
#
sysname HUAWEI
#
device board 17 board-type CE-MPUB
device board 1 board-type CE-LPUE
#
vlan batch 40 50
#
aaa
#
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
domain default_admin
#
interface Vlanif40
ip address 192.168.4.2 255.255.255.0
#
interface Vlanif50
ip address 192.168.5.1 255.255.255.0
#
interface MEth0/0/0
undo shutdown
#
interface GE1/0/0
undo shutdown
port default vlan 50
#
interface GE1/0/1
undo shutdown
port default vlan 40
#
interface NULL0
#
ospf 1
area 0.0.0.0
network 192.168.4.0 0.0.0.255
network 192.168.5.0 0.0.0.255
#
ssh authorization-type default aaa
#
user-interface con 0
#
vm-manager
#
return
学习到的网段:
[~HUAWEI-GE1/0/1]dis ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 14 Routes : 14 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 4 D 192.168.4.1 Vlanif40
192.168.2.0/30 OSPF 10 3 D 192.168.4.1 Vlanif40
192.168.2.4/30 OSPF 10 2 D 192.168.4.1 Vlanif40
192.168.3.0/24 OSPF 10 2 D 192.168.4.1 Vlanif40
192.168.4.0/24 Direct 0 0 D 192.168.4.2 Vlanif40
192.168.4.2/32 Direct 0 0 D 127.0.0.1 Vlanif40
192.168.4.255/32 Direct 0 0 D 127.0.0.1 Vlanif40
192.168.5.0/24 Direct 0 0 D 192.168.5.1 Vlanif50
192.168.5.1/32 Direct 0 0 D 127.0.0.1 Vlanif50
192.168.5.255/32 Direct 0 0 D 127.0.0.1 Vlanif50
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
总结:
IP段是根据子网掩码划分的,如果不在同一个vlan中需要用到192.168.2.0段的话
这就要划分出互联ip,子网掩码是252的话,就是30位掩码,这样划分就是一个网
络地址一个广播地址,剩下两个为可用地址,如果不这样划分,掩码是255.255.255.0
的话,在其他vlan段中配置ip的192.168.2.0段ip的话会提示地址冲突(不同交换机) 同一设备不同的口子是直连
优先级:直连 >静态>动态
ospf多区域实例配置的更多相关文章
- OSPF相关知识与实例配置【第一部分】
OSPF相关知识与实例配置[基本知识及多区域配置] OSPF(开放式最短路径优先协议)是一个基于链路状态的IGP,相比于RIP有无环路:收敛快:扩展性好等优点,也是现在用的最多的:所以这次实验就针对于 ...
- OSPF多区域配置
1.配置三台路由器IP R1(config)#INTER S1/0 R1(config-if)#IP ADDress 192.1.12.1 255.255.255.0 R1(config-if)#no ...
- OSPF单区域配置
OSPF单区域配置 实验环境:华为模拟器eNSP 现在有这样一个拓扑图: 我想要让R1可以ping通R3,显然目前是不行的: <R1>ping 192.168.2.2 PING 192.1 ...
- OSPF但区域配置
原理概述 实验内容 实验拓扑 实验编址 实验步骤1.基本配置配置完成后,使用ping命令检测 2.部署单区域OSPF网络使用命令ospf创建并运行OSPF 其中1是进程号,如果没有写明进程号,则默认为 ...
- GNS3(1)——OSPF多区域配置
GNS3(1)——OSPF多区域配置 RIP适用于中小网络,比较简单.没有系统内外.系统分区,边界等概念,用到不是分类的路由. OSPF适用于较大规模网络.它把自治系统分成若干个区域,通过系列内外路由 ...
- OSPF多区域原理与配置
OSPF多区域原理与配置 目录 一.OSPF多区域生成 1.1.生成OSPF多区域的原因 二.OSPF的三种通信量 2.1.域内通信量 2.2.域间通信量 2.3.外部通信量 三.OSPF的路由器类型 ...
- CCNA学习指南 -开放最短路径优先OSPF(多区域部分)
在之前的介绍中,可以看到单区域OSPF对于古老的RIP的优点: 路由选择更新流量减小 使用与大型网络和链路速度不一样的网络 OSPF能够在LSDB中呈现网络拓扑结构,这使得它汇聚的速度远快于RIP. ...
- OSPF协议介绍及配置 (下)
4.特殊区域详解 为了让我们的讲解更加的通俗易懂,我们看上面这个拓扑,这是一个根据客户业务逻辑结构所涉及的OSPF网络,共有三个区域(实际上远远不止),骨干区域area0为一级行及二级行所部署,*** ...
- OSPF协议介绍及配置 (上)
OSPF协议介绍及配置 (上) 一.OSPF概述 回顾一下距离矢量路由协议的工作原理:运行距离矢量路由协议的路由器周期性的泛洪自己的路由表,通过路由的交互,每台路由器都从相邻的路由器学习到路由,并且加 ...
随机推荐
- python右键Edit with IDLE
在windows下试用python,Py文件的右键菜单有个Edit with IDLE,虽然这个ide不是那么功能强大,但是胜在方便.对于脚本语言的一般使用来说是足够了.但是有时候,这个菜单就消失了, ...
- 6 - 编码解码器-一种channelHandler
6.1 解码器 6.1.1 抽象类-ByteToMessageDecoder decode(ChannelHandlerContext ctx, ByteBuf in, List<Object& ...
- 一般的linux系统默认安装的vim是精简版
一般的linux系统默认安装的vim是精简版(vim-tiny),所以不能配置语法检查等属性或获取在线帮助.需要安装vim-x:x.x.x,vim-common,vim-runtime. :synta ...
- mybatis使用说明
起步:1.创建一个maven项目工程.2.打开pom.xml配置文件,3.设置源代码编码方式为UTF-8.4.设置编译源代码的JDK版本.最好大于1.6版本.5. 重点--添加Mybatis的相关依赖 ...
- jquery jquery选择器总结 转自(永远的麦子)
jQuery选择器总结 阅读目录 1, 基本选择器? 2, 层次选择器? 3, 过滤选择器? 4, 表单选择器? jQuery选择器共有四大类,分别为基本选择器,层次选择器,过滤选择器和表单选择器.下 ...
- EasyUI Combobox 的 onChange,onSelect,onClick 事件
EasyUI 中 Combobox 选项发生改变时会触发 onChange,onSelect,onClick,3 个事件.最近要做一个级联的 Combo 菜单,类似于选择地址时让用户填写省,市,区的菜 ...
- mybatis-动态sql2
mybatis的动态sql中常用的有 if where foreach set 项目沿用之前的. 1.dao层添加接口: package com.java1234.map ...
- mybatis-动态sql1
在多条件查询的情况下必须用到动态sql 沿用之前的项目 1.在dao中添加多添件查询方法 package com.java1234.mappers; import java.util.List;imp ...
- 进程peb结构、获得peb的方法
PEB :进程环境块TEB.ProcessEnvironmentBlock成员就是PEB的结构体地址TEB结构体位于FS段选择符所指的段内存的起始地址处,且ProcessEnvironmentBloc ...
- 500 Days Of Summer
<和莎莫的500天>,一部爱情片. Summer和Tom两人不同的爱情观走在了一起,或许真的就是爱情观不同,或许是Summer爱Tom爱的不够深,最终的结局是那么不尽人意. 有人愿意把秘密 ...