开发者社区> 余二五> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

在NBMA网络广播模式下配置OSPF实际案例(配图)+详细验证过程

简介:
+关注继续查看


广播式网络是一个渐进的操作过程,它可以定义所有邻居。当给一个接口配置广播时,这个接口就好像是连入了LAN中,网络中仍要选出DR和BDR,需特别保证路由器选出的DR/BDR与网络中所有路由器都有物理连接。
 
使用接口命令ip ospf network broadcast可以向所有路由器上设置网络类型。R2、R4的串行接口被配置成OSPF PRIORITY为0,这将保证R3成为DR。
 
// 帧交换机
frame-relay switching
 
int s2/0
  encapsulation frame-relay
  clock rate 64000
  frame-relay intf-type dce
  frame-relay route 200 int s3/0 300
 
int s3/0
  encapsulation frame-relay
  clock rate 64000
  frame-relay intf-type dce
  frame-relay route 300 int s2/0 200
  frame-relay route 399 int s4/0 400
 
int s4/0
  encapsulation frame-relay
  clock rate 64000
  frame-relay intf-type dce
  frame-relay route 400 int s2/0 399
 
 
// R2 //
int lo0
  ip ad 2.2.2.2 255.255.255.0
 
int s2/0
  encapsulation frame-relay
  ip ospf network broadcast    //将OSPF网络类型设置为广播模式
  ip ospf priority 0    //优先级为0,不参与DR选举
  ip ad 192.1.1.2 255.255.255.0
  frame-relay map ip 192.1.1.3 200 broadcast
  frame-relay map ip 192.1.1.4 200 broadcast
 
router os 1
  network 2.2.2.2 0.0.0.0 area 0
  network 192.1.1.2 0.0.0.0 area 0
 
 
// R3 //
int lo0
  ip ad 3.3.3.3 255.255.255.0
 
int s3/0
  encapsulation frame-relay
  ip ospf network broadcast    //将OSPF网络类型设置为广播模式
  ip address 192.1.1.3 255.255.255.0
  frame-relay map ip 192.1.1.2 300 broadcast
  frame-relay map ip 192.1.1.4 399 broadcast
 
router os 1
  network 3.3.3.3 0.0.0.0 area 0
  network 192.1.1.3 0.0.0.0 area 0
 
// R4 //
int lo0
  ip ad 4.4.4.4 255.255.255.0
 
int s4/0
  encapsulation frame-relay
  ip ad 192.1.1.4 255.255.255.0
  ip ospf network broadcast    //将OSPF网络类型设置为广播模式
  ip ospf priority 0    //优先级为0,不参与DR选举
  frame-relay map ip 192.1.1.2 400 broadcast
  frame-relay map ip 192.1.1.3 400 broadcast
 
router os 1
  network 4.4.4.4 0.0.0.0 area 0
  network 192.1.1.4 0.0.0.0 area 0
 
 
 
 
验证过程:
一、首先来检查DR选举是否按我们的设计,R3被选举为DR,R2、R4不参与选举,同时注意网络类型是否为NBMA,hello时间间隔是否为30秒。。。。。。
 
r3#sh ip os int s3/0
Serial3/0 is up, line protocol is up
  Internet Address 192.1.1.3/24, Area 0
  Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 3.3.3.3, Interface address 192.1.1.3
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:27
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 2, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 4.4.4.4
    Adjacent with neighbor 2.2.2.2
  Suppress hello for 0 neighbor(s)
 
 
r2#sh ip os int s2/0
Serial2/0 is up, line protocol is up
  Internet Address 192.1.1.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DROTHER, Priority 0
  Designated Router (ID) 3.3.3.3, Interface address 192.1.1.3
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 3.3.3.3  (Designated Router)
  Suppress hello for 0 neighbor(s)
 
 
r4#sh ip ospf int s4/0
Serial4/0 is up, line protocol is up
  Internet Address 192.1.1.4/24, Area 0
  Process ID 1, Router ID 4.4.4.4, Network Type BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DROTHER, Priority 0
  Designated Router (ID) 3.3.3.3, Interface address 192.1.1.3
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:05
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 3.3.3.3  (Designated Router)
  Suppress hello for 0 neighbor(s)
 
二、接下来观察各路由器邻居建立情况:
r2#sh ip os nei
Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           1   FULL/DR         00:01:50    192.1.1.3       Serial2/0
 
r3#sh ip os nei
Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/DROTHER    00:01:41    192.1.1.4       Serial3/0
2.2.2.2           0   FULL/DROTHER    00:01:30    192.1.1.2       Serial3/0
 
r3#sh ip os nei
Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           1   FULL/DR         00:01:48    192.1.1.3       Serial4/0
 
 
三、最后验证路由:
r2#sh ip ro   
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.1.1.3, 00:00:17, Serial2/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.1.1.4, 00:00:17, Serial2/0
C    192.1.1.0/24 is directly connected, Serial2/0
 
 
 
r3#sh ip ro
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 192.1.1.2, 00:00:38, Serial3/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.1.1.4, 00:00:38, Serial3/0
C    192.1.1.0/24 is directly connected, Serial3/0
 
 
 
r4#sh ip ro
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 192.1.1.2, 00:01:04, Serial4/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.1.1.3, 00:01:04, Serial4/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
C    192.1.1.0/24 is directly connected, Serial4/0
r4#
 
 
如果我们将R2路由器的优先级调整为10,重启后R2将成为DR,R3作为BDR,R4作为DROTHER,这样的结果会导致R4无法收到R2、R3的路由更新,原因如下:
 
r4#sh ip ospf database
            OSPF Router with ID (4.4.4.4) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         99          0x80000009 0xCF69   2
3.3.3.3         3.3.3.3         109         0x8000000B 0xDF4A   2
4.4.4.4         4.4.4.4         107         0x8000000C 0xFB1F   2
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.1.1.2       2.2.2.2         108         0x80000001 0x4910 
 
r4#sh ip os database router
            OSPF Router with ID (4.4.4.4) (Process ID 1)
                Router Link States (Area 0)
  Adv Router is not-reachable
  LS age: 124
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 2.2.2.2
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000009
  Checksum: 0xCF69
  Length: 48
  Number of Links: 2
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 192.1.1.2
     (Link Data) Router Interface address: 192.1.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 2.2.2.2
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

  Adv Router is not-reachable
  LS age: 198
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 3.3.3.3
  Advertising Router: 3.3.3.3
  LS Seq Number: 8000000B
  Checksum: 0xDF4A
  Length: 48
  Number of Links: 2
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 192.1.1.2
     (Link Data) Router Interface address: 192.1.1.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 3.3.3.3
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
         
  LS age: 215
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 4.4.4.4
  Advertising Router: 4.4.4.4
  LS Seq Number: 8000000C
  Checksum: 0xFB1F
  Length: 48
  Number of Links: 2
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 192.1.1.3
     (Link Data) Router Interface address: 192.1.1.4
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 4.4.4.4
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1









本文转自 ciscodocu51CTO博客,原文链接:http://blog.51cto.com/ciscodocu/52830,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
综合实验高级网络—— 配置三层 热备等网络技术2
配置三层 热备 生成树 ospf 和 rip 以及他们之间的重分发等将内网 全通 做pat 让 vlan 10 vlan 20 网段的用户可以访问外网 外网地址映射到路由器外接口地址 做静态nat 将 外部web 映射到 61.129.62.150 让外网终端可以访问内部的 "外部web" 做扩展acl 列表 让vlan 10 和 vlan 20 用户能够访问ftp 但不能ping 同ftp 也不能访问 内部web可以访问外部web 让管理区电脑可以访问所有 服务器 但不能访问ftp .
0 0
综合实验高级网络—— 配置三层 热备等网络技术1
一.高级网络应用大实验 1.实验要求: 配置三层 热备 生成树 ospf 和 rip 以及他们之间的重分发等将内网 全通 做pat 让 vlan 10 vlan 20 网段的用户可以访问外网 外网地址映射到路由器外接口地址 做静态nat 将 外部web 映射到 61.129.62.150 让外网终端可以访问内部的 "外部web" 做扩展acl 列表 让vlan 10 和 vlan 20 用户能够访问ftp 但不能ping 同ftp 也不能访问 内部web可以访问外部web 让管理区电脑可以访问所有 服务器 但不能访问ftp .
0 0
西门子S7-1200硬件的组态,设备配置、网络组态
今天我们来学习西门子S7-1200硬件的组态。在S7-1200中当用户新建一个项目时,应当先进行硬件组态,硬件组态是编写项目程序的基础。在STEP7 Basic中,硬件组态遵循所见即所得的原则,PLC和HMI设备都能在相同的环境以相同的方式插入列项目中。
0 0
嵌入式linux/鸿蒙开发板(IMX6ULL)开发(三)配置网络环境
嵌入式linux/鸿蒙开发板(IMX6ULL)开发(三)配置网络环境
0 0
Linux网络NAT配置和远程连接(CentOS7)
Linux网络NAT配置和远程连接(CentOS7)
0 0
环境搭建-01-配置网络和主机名|学习笔记
快速学习环境搭建-01-配置网络和主机名
0 0
在阿里云ESC的Windows Server 2012 R2 完成注册云服务器与为一个新网站配置网络端口的使用体验
为完成外教的作业,使用阿里云ESC的经历体验,和对未来发展的想法。
0 0
Hadoop快速入门——第二章、分布式集群(第一节、网络与ssh登录配置)(2)
Hadoop快速入门——第二章、分布式集群(第一节、网络与ssh登录配置)
0 0
Hadoop快速入门——第二章、分布式集群(第一节、网络与ssh登录配置)(1)
Hadoop快速入门——第二章、分布式集群(第一节、网络与ssh登录配置)
0 0
+关注
文章
问答
文章排行榜
最热
最新
相关电子书
更多
可预期数据中心网络
立即下载
可编程网络视角的网络创新研究
立即下载
思科软件定义访问:实现基于业务意图的园区网络
立即下载