您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页帧中继上的OSPF:OSPF在非广播型网络拓扑下的五种工作模式详解及典型配置

帧中继上的OSPF:OSPF在非广播型网络拓扑下的五种工作模式详解及典型配置

来源:华佗小知识
 OSPF over Frame-Relay: Five Modes of OSPF Operation in NBMA Topology & Their Typical Configurations

帧中继上的OSPF: OSPF在非广播型网络拓扑下的五种工作模式详解及典型配置

Content

PART I: INTRODUCTION TO OSPF NETWORK TYPES·························2 PART II: SPECIFICATIONS OF OSPF OPERATION MODES OVER NBMA NETWORK & CONFIGURATION INSTANCES·······························3

TOPOLOGY OF THE EXPERIMENTAL LAB ENVIRONMENT··················································3 1>NON-BROADCAST MODE····································································································4 2>BROADCAST MODE·············································································································7 3>POINT-TO-POINT MODE···································································································10 4>POINT-TO-MULTIPOINT MODE························································································14 5>POINT-TO-MULTIPOINT NON-BROADCAST MODE·························································17

1 /20

Part I:

Introduction to OSPF Network Types

There are three types of networks defined by OSPF:

 Point-to-point: A network that joins a single pair of routers, e.g. serial link

 Broadcast or Broadcast Multiple Access (BMA): A multi-access broadcast network, such as

Ethernet

 Non-broadcast Multi-Access (NBMA): A network that connects more than two routers but

that has no broadcast capability, e.g. X.25, ATM, and Frame-relay

A point-to-point link is usually a serial interface running either PPP or HDLC protocol, yet may also be a point-to-point sub-interface running Frame-Relay or ATM. There is no DR/BDR election required in point-to-point network. OSPF auto-detects this interface type and uses multicast address 224.0.0.5 to send packets.

Generally, Broadcast Multi-access networks are LAN technologies like Ethernet and Token Ring. DR/BDR Election is required in these networks. DR uses multi-access address 224.0.0.5 sending packets to all the other routers. DRothers use multi-access address 224.0.0.6 sending packets to DR and BDR.

Non-broadcast Multi-access topologies usually interconnect multiple sites but with no broadcasting capability. There are five modes of operation of OSPF over NBMA topology in all, including two modes defined by RFC 2328 and three additional modes from Cisco. They are:  Non-broadcast (RFC 2328)  Broadcast (Cisco)  Point-to-point (Cisco)

 Point-to-multipoint (RFC 2328)

 Point-to-multipoint non-broadcast (Cisco)

2 /20

Part II:

Specifications of OSPF Operation Modes over NBMA Network & Configuration Instances

这一部分将详述这五种模式并以一个具有代表性的Frame-Relay网络拓扑图为例给出它们的典型配置

Topology of the Experimental Lab Environment

拓扑图概要

这是一个典型的Hub-Spoke结构的构建于Frame-Relay之上的网络,现在需要在中心节点和所有分支节点之间运行OSPF路由协议以保证全网互通,各路由器的身份如下: R1-客户端设备,扮演Hub-Spoke结构的中心节点 R2-运营商设备,提供Frame-Relay服务 SW-运营商设备,扮演运营商传输网络 R3-运营商设备,提供Frame-Relay服务

R4-客户设备,扮演Hub-Spoke结构的一个分支节点 R5-客户设备,扮演Hub-Spoke结构的一个分支节点

3 /20

1> Non-broadcast Mode

Non-broadcast模式模仿广播网络中OSPF的工作方式,即所有接口同属于一个IP网络/子网,须要进行DR/BDR选举,但由于不能支持广播,所以邻居只能使用单播Hello的方式来建立,即至少须要在建立邻居关系的双方之中的一方手工指定邻居接口的IP地址。DR/BDR选举过程也可能须要干预,即在非全网状拓扑下应通过配置接口优先级使得中心节点被选举为DR,所有分支节点一律为DRothers,才能保证网络正常工作。另外,在Non-broadcast模式下,分支之间学习到的路由不是指向中心节点而是直接指向其它分支节点,必须保证分支节点之间的互通性。另外,Non-broadcast模式下默认的OSPF Hello Interval为30秒,Dead Interval为120秒,邻居关系的建立过程也因此比较缓慢。可见,在问题的规模较大时Non-broadcast模式的实用性不强,配置也相对繁琐。尽管如此,Non-broadcast模式是NMBA网络(X.25,ATM和Frame-Relay)中接口的OSPF默认工作模式,也是使用multipoint的subinterfaces的OSPF默认工作模式。

在上面的Frame-Relay网络中配置一个Non-broadcast工作模式的OSPF网络典型配置如下:

! Configuration on R1 R1(config)#interface serial 1/0 R1(config-if)#encapsulation frame-relay R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#frame-relay lmi-type ansi R1(config-if)#frame-relay intf-type dte R1(config-if)#no frame-relay inverse-arp R1(config-if)#frame-relay map ip 192.168.1.4 104 R1(config-if)#frame-relay map ip 192.168.1.5 105 R1(config-if)#ip ospf network non-broadcast

R1(config)#interface loopback 0 R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#ip ospf network point-to-point

R1(config)#router ospf 101 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 1.1.1.1 0.0.0.0 area 1 R1(config-router)#network 192.168.1.1 0.0.0.0 area 0 R1(config-router)#neighbor 192.168.1.4 priority 0 R1(config-router)#neighbor 192.168.1.5 priority 0

! Configuration on R2 R2(config)#frame-relay switching

4 /20

批注 [MT1]: 默认的lmi-type值是cisco,如果使用此默认值,则不需要显式地配置此命令。另外,lmi-type只需要在链路两端一致即可,不必保证所有设备都一致,在本例中,R1与R2之间、R3与R5之间链路配置为ansi,R2与R4之间链路配置为cisco,是为了突显这一点,下同 批注 [MT2]: 此命令可以省略,dte是默认的intf-type值。显式地写出命令只是一种帮助记忆个明确思路的方法。下同 批注 [MT3]: Non-broadcast是NBMA网络中默认的接口工作模式,所以此命令可以省略,下同 批注 [MT4]: 此命令的目的仅仅在于让OSPF不要把环回口识别为末梢网络,通告的时候也就不会把环回口地址作为一条主机路由,下同 批注 [MT5]: 此命令是手工指定邻居的接口IP,并指定了邻居的接口优先级为0,禁止对方参选DR/BDR,以保证中心节点被选为DR,分支为DRothers。实验证明,仅仅做这一条配置不能保证选举过程的正确,还需要在接口下调整优先级。下同

R2(config)#interface fastethernet 0/0

R2(config-if)#ip address 172.16.23.2 255.255.255.248 R2(config-if)#no shutdown

R2(config-if)#interface tunnel 203 R2(config-if)# no ip address

R2(config-if)#tunnel source fastethernet 0/0 R2(config-if)#tunnel destination 172.16.23.3

R2(config)#interface serial 1/0 R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type ansi R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 000

R2(config-if)#frame-relay route 104 interface serial 1/1 401 R2(config-if)#frame-relay route 105 interface tunnel 203 1005

R2(config)#interface serial 1/1

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type cisco R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 128000

R2(config-if)#frame-relay route 401 interface serial 1/0 104

! Configuration on R3

R3(config)#frame-relay switching

R3(config)#interface fastethernet 0/0

R3(config-if)#ip address 172.16.23.3 255.255.255.248 R3(config-if)#no shutdown

R3(config-if)#interface tunnel 302 R3(config-if)# no ip address

R3(config-if)#tunnel source fastethernet 0/0 R3(config-if)#tunnel destination 172.16.23.2

R3(config)#interface serial 1/0

R3(config-if)#encapsulation frame-relay

5 /20

批注 [MT6]: Tunnel interface number的数值只有本地意义,也就是说在Tunnel的另一端可以使用不同的号码。本例中R2一端为203,R3的一端为302,是为了突显这一点 R3(config-if)#no ip address R3(config-if)#no shutdown

R3(config-if)#frame-relay lmi-type ansi R3(config-if)#frame-relay intf-type dce R3(config-if)#clock rate 000

R3(config-if)#frame-relay route 501 interface tunnel 302 1005

! Configuration on R4

R4(config)#interface serial 1/1

R4(config-if)#encapsulation frame-relay

R4(config-if)#ip address 192.168.1.4 255.255.255.0 R4(config-if)#no shutdown

R4(config-if)#frame-relay lmi-type cisco R4(config-if)#frame-relay intf-type dte R4(config-if)#no frame-relay inverse-arp

R4(config-if)#frame-relay map ip 192.168.1.1 401 R4(config-if)#ip ospf network non-broadcast R4(config-if)#ip ospf priority 0

R4(config)#interface loopback 0 R4(config-if)#ip address 4.4.4.4 255.255.255.0 R4(config-if)#ip ospf network point-to-point

R4(config)#router ospf 104

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 4.4.4.4 0.0.0.0 area 4

R4(config-router)#network 192.168.1.4 0.0.0.0 area 0 R4(config-router)#neighbor 192.168.1.1

! Configuration on R5 R5(config)#interface serial 1/0 R5(config-if)#encapsulation frame-relay R5(config-if)#ip address 192.168.1.5 255.255.255.0 R5(config-if)#no shutdown

R5(config-if)#frame-relay lmi-type ansi R5(config-if)#frame-relay intf-type dte R5(config-if)#no frame-relay inverse-arp

R5(config-if)#frame-relay map ip 192.168.1.1 501 R5(config-if)#ip ospf network non-broadcast

R5(config)#interface loopback 0

R5(config-if)#ip address 5.5.5.5 255.255.255.0

6 /20

批注 [MT7]: 此命令禁止本接口参选DR/BDR,直接成为DRothers,这是一条特殊的命令,无须clear ip ospf process而是在配置后立即生效 批注 [MT8]: 此命令可以省略,建立邻居的双方只需要有一方手动指定邻居即可。故在中心节点指定所有分支节点即可。下同 R5(config-if)#ip ospf network point-to-point

R5(config)#router ospf 105

R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 5.5.5.5 0.0.0.0 area 5

R5(config-router)#network 192.168.1.5 0.0.0.0 area 0 R5(config-router)#neighbor 192.168.1.1

! Configuration on SW

SW(config)#interface range fastehternet 1/0 - 15 SW(config-if-range)#no shutdown

2> Broadcast Mode

Broadcast模式是Cisco为Non-broadcast模式提供的改进解决方案,配置成broadcast模式后,OSPF按照广播网络中的方式工作,即所有接口在同一IP网络/子网中,须要进行DR/BDR选举,可以通过组播Hello包自动发现邻居。与Non-broadcast模式相同,DR/BDR选举过程也可能须要干预,即在非全网状拓扑下应通过配置接口优先级使得中心节点被选举为DR,所有分支节点一律为DRothers,才能保证网络正常工作。分支之间学习到的路由不是指向中心节点而是直接指向其它分支节点,必须保证分支节点之间的互通性。此模式的Hello/Dead Interval默认是10/40秒。为了保证对组播方式的支持,在做PVC映射时必须加上broadcast关键字。

在图示的Frame-Relay网络中配置一个Broadcast工作模式的OSPF网络典型配置如下:

! Configuration on R1

R1(config)#interface serial 1/0

R1(config-if)#encapsulation frame-relay

R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown

R1(config-if)#frame-relay lmi-type ansi R1(config-if)#frame-relay intf-type dte R1(config-if)#no frame-relay inverse-arp R1(config-if)#frame-relay map ip 192.168.1.4 104 broadcast R1(config-if)#frame-relay map ip 192.168.1.5 105 broadcast R1(config-if)#ip ospf network broadcast

R1(config)#interface loopback 0 R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#ip ospf network point-to-point

R1(config)#router ospf 101

7 /20

批注 [MT9]: Broadcast关键字保证了PVC对广播和组播的支持,也就保证了组播Hello包的自动发现邻居能力,下同 R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 1.1.1.1 0.0.0.0 area 1

R1(config-router)#network 192.168.1.1 0.0.0.0 area 0

! Configuration on R2

R2(config)#frame-relay switching

R2(config)#interface fastethernet 0/0

R2(config-if)#ip address 172.16.23.2 255.255.255.248 R2(config-if)#no shutdown

R2(config-if)#interface tunnel 203 R2(config-if)# no ip address

R2(config-if)#tunnel source fastethernet 0/0 R2(config-if)#tunnel destination 172.16.23.3

R2(config)#interface serial 1/0

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type ansi R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 000

R2(config-if)#frame-relay route 104 interface serial 1/1 401 R2(config-if)#frame-relay route 105 interface tunnel 203 1005

R2(config)#interface serial 1/1

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type cisco R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 128000

R2(config-if)#frame-relay route 401 interface serial 1/0 104

! Configuration on R3

R3(config)#frame-relay switching

R3(config)#interface fastethernet 0/0

R3(config-if)#ip address 172.16.23.3 255.255.255.248 R3(config-if)#no shutdown

8 /20

R3(config-if)#interface tunnel 302 R3(config-if)# no ip address

R3(config-if)#tunnel source fastethernet 0/0 R3(config-if)#tunnel destination 172.16.23.2

R3(config)#interface serial 1/0

R3(config-if)#encapsulation frame-relay R3(config-if)#no ip address R3(config-if)#no shutdown

R3(config-if)#frame-relay lmi-type ansi R3(config-if)#frame-relay intf-type dce R3(config-if)#clock rate 000

R3(config-if)#frame-relay route 501 interface tunnel 302 1005

! Configuration on R4

R4(config)#interface serial 1/1

R4(config-if)#encapsulation frame-relay

R4(config-if)#ip address 192.168.1.4 255.255.255.0 R4(config-if)#no shutdown

R4(config-if)#frame-relay lmi-type cisco R4(config-if)#frame-relay intf-type dte R4(config-if)#no frame-relay inverse-arp

R4(config-if)#frame-relay map ip 192.168.1.1 401 broadcast R4(config-if)#frame-relay map ip 192.168.1.5 401 broadcast R4(config-if)#ip ospf network broadcast

R4(config)#interface loopback 0

R4(config-if)#ip address 4.4.4.4 255.255.255.0 R4(config-if)#ip ospf network point-to-point

R4(config)#router ospf 104

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 4.4.4.4 0.0.0.0 area 4

R4(config-router)#network 192.168.1.4 0.0.0.0 area 0

! Configuration on R5

R5(config)#interface serial 1/0

R5(config-if)#encapsulation frame-relay

R5(config-if)#ip address 192.168.1.5 255.255.255.0 R5(config-if)#no shutdown

R5(config-if)#frame-relay lmi-type ansi R5(config-if)#frame-relay intf-type dte

9 /20

R5(config-if)#no frame-relay inverse-arp

R5(config-if)#frame-relay map ip 192.168.1.1 501 broadcast R5(config-if)#frame-relay map ip 192.168.1.4 501 broadcast R5(config-if)#ip ospf network broadcast

R5(config)#interface loopback 0

R5(config-if)#ip address 5.5.5.5 255.255.255.0 R5(config-if)#ip ospf network point-to-point

R5(config)#router ospf 105

R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 5.5.5.5 0.0.0.0 area 5

R5(config-router)#network 192.168.1.5 0.0.0.0 area 0

! Configuration on SW

SW(config)#interface range fastehternet 1/0 - 15 SW(config-if-range)#no shutdown

3> Point-to-point Mode

Point-to-point模式是将每一条PVC/SVC连接看作一个单独的point-to-point网络,通过point-to-point型的subinterefaces来完成配置。一旦串行口上起用了point-to-point型的subinterfaces,那么它的OSPF网络类型就默认为Point-to-point模式。Point-to-point模式与真正的point-to-point链路工作方式类似,即不选举DR/BDR,使用组播Hello自动发现邻居,Hello/Dead Interval默认为10/40秒。另外Point-to-point模式下分支节点之间学习到的路由下一跳自动指向中心节点。Point-to-point模式具有配置和管理简单的优点,但也有一个明显的缺点就是每一条PVC/SVC都需要一个子网地址空间,会消耗比较多的IP地址,不过这也可以通过使用ip unnumbered的方式来解决。另外,使用子接口会消耗更多的路由器内存,可能会给一些内存有限的小型路由器带来负担。

在图示的Frame-Relay网络中配置一个Point-to-point工作模式的OSPF网络典型配置如下:

! Configuration on R1

R1(config)#interface serial 1/0

R1(config-if)#encapsulation frame-relay R1(config-if)#no ip address R1(config-if)#no shutdown

R1(config-if)#frame-relay lmi-type ansi R1(config-if)#frame-relay intf-type dte R1(config-if)#no frame-relay inverse-arp

10 /20

R1(config)# interface serial 1/0.104 point-to-point

R1(config-subif)#ip address 192.168.14.1 255.255.255.248 R1(config-subif)#description -----------------------------------to R4 R1(config-subif)#frame-relay interface-dlci 104 R1(config-subif)#ip ospf network point-to-point

R1(config)#interface serial 1/0.105 point-to-point R1(config-subif)#ip address 192.168.15.1 255.255.255.248 R1(config-subif)#description -----------------------------------to R5 R1(config-subif)#frame-relay interface-dlci 105 R1(config-subif)#ip ospf network point-to-point

R1(config)#interface loopback 0 R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#ip ospf network point-to-point

R1(config)#router ospf 101

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 1.1.1.1 0.0.0.0 area 1

R1(config-router)#network 192.168.14.1 0.0.0.0 area 0 R1(config-router)#network 192.168.15.1 0.0.0.0 area 0

! Configuration on R2

R2(config)#frame-relay switching

R2(config)#interface fastethernet 0/0

R2(config-if)#ip address 172.16.23.2 255.255.255.248 R2(config-if)#no shutdown

R2(config-if)#interface tunnel 203 R2(config-if)# no ip address

R2(config-if)#tunnel source fastethernet 0/0 R2(config-if)#tunnel destination 172.16.23.3

R2(config)#interface serial 1/0

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type ansi R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 000

R2(config-if)#frame-relay route 104 interface serial 1/1 401 R2(config-if)#frame-relay route 105 interface tunnel 203 1005

11 /20

批注 [MT10]: 此命令用于输入注释,以便管理,下同 批注 [MT11]: 在point-to-point型的子接口下frame-relay map命令无效,必须使用frame-relay interface-dlci命令来指定DLCI号,下同 批注 [MT12]: 此命令可以省略,因为Point-to-point是此种子接口下默认的模式,下同

R2(config)#interface serial 1/1

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type cisco R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 128000

R2(config-if)#frame-relay route 401 interface serial 1/0 104

! Configuration on R3

R3(config)#frame-relay switching

R3(config)#interface fastethernet 0/0

R3(config-if)#ip address 172.16.23.3 255.255.255.248 R3(config-if)#no shutdown

R3(config-if)#interface tunnel 302 R3(config-if)# no ip address

R3(config-if)#tunnel source fastethernet 0/0 R3(config-if)#tunnel destination 172.16.23.2

R3(config)#interface serial 1/0

R3(config-if)#encapsulation frame-relay R3(config-if)#no ip address R3(config-if)#no shutdown

R3(config-if)#frame-relay lmi-type ansi R3(config-if)#frame-relay intf-type dce R3(config-if)#clock rate 000

R3(config-if)#frame-relay route 501 interface tunnel 302 1005

! Configuration on R4

R4(config)#interface serial 1/1

R4(config-if)#encapsulation frame-relay

R4(config-if)#ip address 192.168.1.4 255.255.255.0 R4(config-if)#no shutdown

R4(config-if)#frame-relay lmi-type cisco R4(config-if)#frame-relay intf-type dte R4(config-if)#no frame-relay inverse-arp

R4(config)#interface serial s1/1.401 point-to-point R4(config-subif)#ip address 192.168.14.4 255.255.255.248

12 /20

批注 [MT13]: 分支节点只须要与中心节点建立邻居关系,所以在分支节点上可以起用子接口也可以不起用子接口。本例中R4起用了子接口而R5没有起用 R4(config-subif)#description -----------------------------------to R1 R4(config-subif)#frame-relay interface-dlci 401 R4(config-subif)#ip ospf network point-to-point

R4(config)#interface loopback 0

R4(config-if)#ip address 4.4.4.4 255.255.255.0 R4(config-if)#ip ospf network point-to-point

R4(config)#router ospf 104

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 4.4.4.4 0.0.0.0 area 4

R4(config-router)#network 192.168.14.4 0.0.0.0 area 0

! Configuration on R5

R5(config)#interface serial 1/0

R5(config-if)#encapsulation frame-relay

R5(config-if)#ip address 192.168.15.5 255.255.255.248 R5(config-if)#no shutdown

R5(config-if)#frame-relay lmi-type ansi R5(config-if)#frame-relay intf-type dte R5(config-if)#no frame-relay inverse-arp R5(config-if)#frame-relay map ip 192.168.15.1 501 broadcast R5(config-if)#ip ospf network point-to-point

R5(config)#interface loopback 0 R5(config-if)#ip address 5.5.5.5 255.255.255.0 R5(config-if)#ip ospf network point-to-point

R5(config)#router ospf 105 R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 5.5.5.5 0.0.0.0 area 5

R5(config-router)#network 192.168.15.1 0.0.0.0 area 0

! Configuration on SW

SW(config)#interface range fastehternet 1/0 - 15 SW(config-if-range)#no shutdown

批注 [MT14]: R5没有起用子接口,所以仍须要手工配置映射,且由于Point-to-point模式需要组播支持,所以broadcast关键字不可少 批注 [MT15]: 没有起用子接口的情况下此命令不可省略

13 /20

4> Point-to-multipoint Mode

Point-to-multipoint模式把NBMA网络看作多条点到点链路的集合,因此类似于Point-to-point网络的工作方式,没有DR/BDR选举,通过组播Hello方式自动发现邻居。但它也有显著不同于Point-to-point模式的一些特点,包括Hello/Dead Interval默认为30/120秒,所有接口都在同一IP网络/子网内,所有接口都作为一条带32位掩码的路由被其他接口学习到(下一跳都指向中心节点),分支之间学习到的路由下一跳自动指向中心节点。由于此模式是RFC规定的,具有多厂商兼容性,又具有配置和管理简单的优点,所以在多厂商环境下Point-to-multipoint模式是最佳的选择。

在图示的Frame-Relay网络中配置一个Point-to-multipoint工作模式的OSPF网络典型配置如下:

! Configuration on R1

R1(config)#interface serial 1/0

R1(config-if)#encapsulation frame-relay

R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown

R1(config-if)#frame-relay lmi-type ansi R1(config-if)#frame-relay intf-type dte R1(config-if)#frame-relay inverse-arp R1(config-if)#ip ospf network point-to-multipoint

R1(config)#interface loopback 0 R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#ip ospf network point-to-point

R1(config)#router ospf 101 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 1.1.1.1 0.0.0.0 area 1

R1(config-router)#network 192.168.1.1 0.0.0.0 area 0

! Configuration on R2

R2(config)#frame-relay switching

R2(config)#interface fastethernet 0/0

R2(config-if)#ip address 172.16.23.2 255.255.255.248 R2(config-if)#no shutdown

R2(config-if)#interface tunnel 203 R2(config-if)# no ip address

R2(config-if)#tunnel source fastethernet 0/0 R2(config-if)#tunnel destination 172.16.23.3

14 /20

批注 [MT16]: 此命令可以省略,inverse-arp默认情况下是开启的。本例中R1、R4采用动态的DLCI映射,事实上,如果愿意,仍然可以采用前几例的静态映射方案,要注意的是,如果使用静态影射,broadcast关键字是必须的 R2(config)#interface serial 1/0

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type ansi R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 000

R2(config-if)#frame-relay route 104 interface serial 1/1 401 R2(config-if)#frame-relay route 105 interface tunnel 203 1005

R2(config)#interface serial 1/1

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type cisco R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 128000

R2(config-if)#frame-relay route 401 interface serial 1/0 104

! Configuration on R3

R3(config)#frame-relay switching

R3(config)#interface fastethernet 0/0

R3(config-if)#ip address 172.16.23.3 255.255.255.248 R3(config-if)#no shutdown

R3(config-if)#interface tunnel 302 R3(config-if)# no ip address

R3(config-if)#tunnel source fastethernet 0/0 R3(config-if)#tunnel destination 172.16.23.2

R3(config)#interface serial 1/0

R3(config-if)#encapsulation frame-relay R3(config-if)#no ip address R3(config-if)#no shutdown

R3(config-if)#frame-relay lmi-type ansi R3(config-if)#frame-relay intf-type dce R3(config-if)#clock rate 000

R3(config-if)#frame-relay route 501 interface tunnel 302 1005

! Configuration on R4

R4(config)#interface serial 1/1

15 /20

R4(config-if)#encapsulation frame-relay

R4(config-if)#ip address 192.168.1.4 255.255.255.0 R4(config-if)#no shutdown

R4(config-if)#frame-relay lmi-type cisco R4(config-if)#frame-relay intf-type dte R4(config-if)#frame-relay inverse-arp

R4(config-if)#ip ospf network point-to-multipoint

R4(config)#interface loopback 0

R4(config-if)#ip address 4.4.4.4 255.255.255.0 R4(config-if)#ip ospf network point-to-point

R4(config)#router ospf 104

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 4.4.4.4 0.0.0.0 area 4

R4(config-router)#network 192.168.1.4 0.0.0.0 area 0

! Configuration on R5

R5(config)#interface serial 1/0

R5(config-if)#encapsulation frame-relay

R5(config-if)#ip address 192.168.1.5 255.255.255.0 R5(config-if)#no shutdown

R5(config-if)#frame-relay lmi-type ansi R5(config-if)#frame-relay intf-type dte R5(config-if)#no frame-relay inverse-arp R5(config-if)#frame-relay map ip 192.168.1.1 501 broadcast R5(config-if)#ip ospf network point-to-multipoint

R5(config)#interface loopback 0 R5(config-if)#ip address 5.5.5.5 255.255.255.0 R5(config-if)#ip ospf network point-to-point

R5(config)#router ospf 105

R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 5.5.5.5 0.0.0.0 area 5

R5(config-router)#network 192.168.1.5 0.0.0.0 area 0 R5(config-router)#neighbor 192.168.1.1

! Configuration on SW

SW(config)#interface range fastehternet 1/0 - 15 SW(config-if-range)#no shutdown

16 /20

批注 [MT17]: 本例中R5仍采用静态影射,注意broadcast关键字是必须的

5> Point-to-multipoint Non-broadcast Mode

Point-to-multipoint Non-broadcast模式是Cisco对Point-to-multipoint模式的扩展,目的是解决在SVC这类动态链路上不能支持广播和组播时仍希望使用Point-to-Multipoint模式的问题,因此它兼具Point-to-multipoint模式和Non-broadcast模式的特点。此模式下不进行DR/BDR选举,不能组播Hello自动发现邻居,邻居需要手工指定。Hello/Dead Interval默认为30/120秒。所有接口同处于一个IP网络/子网中,所有接口都作为一条带32位掩码的路由被其他接口学习到(下一跳都指向中心节点),分支之间学习到的路由下一跳自动指向中心节点。

在图示的Frame-Relay网络中配置一个Point-to-multipoint Non-broadcast工作模式的OSPF网络典型配置如下:

! Configuration on R1

R1(config)#interface serial 1/0

R1(config-if)#encapsulation frame-relay

R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown

R1(config-if)#frame-relay lmi-type q933a R1(config-if)#frame-relay intf-type dte R1(config-if)#no frame-relay inverse-arp R1(config-if)#frame-relay map ip 192.168.1.4 104 R1(config-if)#frame-relay map ip 192.168.1.5 105 R1(config-if)#ip ospf network point-to-multipoint non-broadcast

R1(config)#interface loopback 0

R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#ip ospf network point-to-point

R1(config)#router ospf 101

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 1.1.1.1 0.0.0.0 area 1

R1(config-router)#network 192.168.1.1 0.0.0.0 area 0 R1(config-router)#neighbor 192.168.1.4 R1(config-router)#neighbor 192.168.1.5

! Configuration on R2

R2(config)#frame-relay switching

R2(config)#interface fastethernet 0/0

R2(config-if)#ip address 172.16.23.2 255.255.255.248 R2(config-if)#no shutdown

17 /20

批注 [MT18]: 在此模式下,静态影射不需要broadcast关键字

R2(config-if)#interface tunnel 203 R2(config-if)# no ip address

R2(config-if)#tunnel source fastethernet 0/0 R2(config-if)#tunnel destination 172.16.23.3

R2(config)#interface serial 1/0

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type q933a R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 000

R2(config-if)#frame-relay route 104 interface serial 1/1 401 R2(config-if)#frame-relay route 105 interface tunnel 203 1005

R2(config)#interface serial 1/1

R2(config-if)#encapsulation frame-relay R2(config-if)#no ip address R2(config-if)#no shutdown

R2(config-if)#frame-relay lmi-type q933a R2(config-if)#frame-relay intf-type dce R2(config-if)#clock rate 128000

R2(config-if)#frame-relay route 401 interface serial 1/0 104

! Configuration on R3

R3(config)#frame-relay switching

R3(config)#interface fastethernet 0/0

R3(config-if)#ip address 172.16.23.3 255.255.255.248 R3(config-if)#no shutdown

R3(config-if)#interface tunnel 302 R3(config-if)# no ip address

R3(config-if)#tunnel source fastethernet 0/0 R3(config-if)#tunnel destination 172.16.23.2

R3(config)#interface serial 1/0

R3(config-if)#encapsulation frame-relay R3(config-if)#no ip address R3(config-if)#no shutdown

R3(config-if)#frame-relay lmi-type q933a R3(config-if)#frame-relay intf-type dce

18 /20

R3(config-if)#clock rate 000

R3(config-if)#frame-relay route 501 interface tunnel 302 1005

! Configuration on R4

R4(config)#interface serial 1/1

R4(config-if)#encapsulation frame-relay

R4(config-if)#ip address 192.168.1.4 255.255.255.0 R4(config-if)#no shutdown

R4(config-if)#frame-relay lmi-type q933a R4(config-if)#frame-relay intf-type dte R4(config-if)#no frame-relay inverse-arp

R4(config-if)#frame-relay map ip 192.168.1.1 401

R4(config-if)#ip ospf network point-to-multipoint non-broadcast

R4(config)#interface loopback 0

R4(config-if)#ip address 4.4.4.4 255.255.255.0 R4(config-if)#ip ospf network point-to-point

R4(config)#router ospf 104

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 4.4.4.4 0.0.0.0 area 4

R4(config-router)#network 192.168.1.4 0.0.0.0 area 0 R4(config-router)#neighbor 192.168.1.1

! Configuration on R5

R5(config)#interface serial 1/0

R5(config-if)#encapsulation frame-relay

R5(config-if)#ip address 192.168.1.5 255.255.255.0 R5(config-if)#no shutdown

R5(config-if)#frame-relay lmi-type q933a R5(config-if)#frame-relay intf-type dte R5(config-if)#no frame-relay inverse-arp

R5(config-if)#frame-relay map ip 192.168.1.1 501

R5(config-if)#ip ospf network point-to-multipoint non-broadcast

R5(config)#interface loopback 0

R5(config-if)#ip address 5.5.5.5 255.255.255.0 R5(config-if)#ip ospf network point-to-point

R5(config)#router ospf 105

R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 5.5.5.5 0.0.0.0 area 5

19 /20

R5(config-router)#network 192.168.1.5 0.0.0.0 area 0 R5(config-router)#neighbor 192.168.1.1

! Configuration on SW

SW(config)#interface range fastehternet 1/0 - 15 SW(config-if-range)#no shutdown

20 /20

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务