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概述 回顾一下距离矢量路由协议的工作原理:运行距离矢量路由协议的路由器周期性的泛洪自己的路由表,通过路由的交互,每台路由器都从相邻的路由器学习到路由,并且加 ...
随机推荐
- 文件系统满的话(filesystem full),该如何处理。(du and ls)
#!/bin/bash function ergodic(){ ` do "/"$file ] then ergodic $"/"$file else loca ...
- Hie with the Pie(poj3311)
题目链接:http://poj.org/problem?id=3311 学习博客:https://blog.csdn.net/u013480600/article/details/19692985 H ...
- (转)Linux之split命令详解
Linux之split命令详解 原文:http://m.jb51.net/article/73632.htm Linux split命令用于将一个文件分割成数个,该指令将大文件分割成较小的文件,在默认 ...
- 为什么有人会觉得IT门槛低,工资高?
今天在高铁上,翻着逼乎,被一个话题勾住了,"为什么很多人会觉得IT门槛低?" 我一惊,还真是,身边朋友都觉得"IT赚的多","程序员工资高" ...
- Asp.NET MVC+WebAPI跨域调用
使用jQuery调用WebApi有时会遇到跨域的问题,今天介绍一种可以简单解决跨域问题的方法. 当我们跨域请求WebAPI的时候会提示以下信息: XMLHttpRequest cannot load ...
- clipboard JS(剪切板)的使用
引入js(根据路径需要修改url) <script src="lib/clipboard/clipboard.min.js" type="text/javascri ...
- elasticsearch.yml基本配置说明
一.基本配置 elasticsearch的config文件夹里面有两个配置文 件:elasticsearch.yml和logging.yml,第一个是es的基本配置文件,第二个是日志配置文件,es也是 ...
- .net 中的托管与非托管
托管代码 托管代码就是Visual Basic .NET和C#编译器编译出来的代码.编译器把代码编译成中间语言(IL),而不是能直接在你的电脑上运行的机器码.中间语言被封装在一个叫程序集(assemb ...
- 处理 wait millis 60009, active 50 ,maxactive 200 异常 过程
处理 wait millis 60009, active 50 ,maxactive 200 异常 过程2018年04月19日 16:48:46 守望dfdfdf 阅读数:1910 标签: druid ...
- Java中的do-while循环——通过示例学习Java编程(11)
作者:CHAITANYA SINGH 来源:https://www.koofun.com/pro/kfpostsdetail?kfpostsid=22&cid=0 在上一篇教程中,我们讨论了w ...