实验拓扑:
试验要求:
R4 R2 R3
通过R1-
FR
相连,形成
hub and spoke
网络拓扑,
R1
为模拟帧中继交换机,R4为
hub
路由器,
R2 R3
为
spoke
路由器,
R4 R3 R2
采用点对多点接口。全部用物理接口并全起
OSPF
。
实验目的:接口静态映射、点到多点模式特征、配置和调试。
一、帧中继交换机配置
在
R1
上进行如下配置
hostname FRS
frame-relay switching
interface Serial1/0
no ip address
encapsulation frame-relay ------接口封装为帧中继
clock rate 2016000 ------配置时钟
frame-relay intf-type dce
frame-relay route 201 interface Serial1/3 102 ----路由设置
interface Serial1/2
no ip address
encapsulation frame-relay
no ip route-cache
clock rate 2016000
frame-relay intf-type dce
frame-relay route 301 interface Serial1/3 103
interface Serial1/3
no ip address
encapsulation frame-relay
no ip route-cache
clock rate 2016000
frame-relay intf-type dce
frame-relay route 102 interface Serial1/0 201
frame-relay route 103 interface Serial1/2 301
二、远程路由器上的配置
R4
配置:
hostname HQ
interface Loopback1
ip address 10.1.1.1 255.255.255.0
ip ospf network point-to-point
interface Serial1/3
ip address 10.1.123.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint ----- the default network type is non-broadcast
frame-relay map ip 10.1.123.1 102 ----
使得可以
Ping
通自己
frame-relay map ip 10.1.123.2 102 broadcast ----
帧中继静态映射
frame-relay map ip 10.1.123.3 103 broadcast
no frame-relay inverse-arp ----
关闭动态
ARP
映射
!
router ospf 1
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
network 10.1.123.0 0.0.0.255 area 0
--------------------------------------------------------------
R2
配置:
hostname EAST
interface Loopback2
ip address 10.1.2.1 255.255.255.0
ip ospf network point-to-point
interface Serial1/0
ip address 10.1.123.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint -----/指明为点到多点模式。
注:如此设为
ip ospf nei broadcast
则为
BMA
模式/
frame-relay map ip 10.1.123.1 201 broadcast
frame-relay map ip 10.1.123.2 201
frame-relay map ip 10.1.123.3 201 broadcast
no frame-relay inverse-arp
interface Serial1/1
ip address 10.1.23.2 255.255.255.0
router ospf 1
network 10.1.2.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
network 10.1.123.0 0.0.0.255 area 0
--------------------------------------------------------------
R3
配置:
hostname WEST
interface Loopback3
ip address 10.1.3.1 255.255.255.0
ip ospf network point-to-point
interface Serial1/1
ip address 10.1.23.3 255.255.255.0
interface Serial1/2
ip address 10.1.123.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
frame-relay map ip 10.1.123.1 301 broadcast
frame-relay map ip 10.1.123.2 301 broadcast
frame-relay map ip 10.1.123.3 301
no frame-relay inverse-arp
router ospf 1
network 10.1.3.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
network 10.1.123.0 0.0.0.255 area 0
三、调试
HQ#sh ip route ----查看路由表,O代表通过OSPF学到
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O 10.1.3.0/24 [110/65] via 10.1.123.3, 00:00:28, Serial1/3
O 10.1.2.0/24 [110/65] via 10.1.123.2, 00:00:28, Serial1/3
C 10.1.1.0/24 is directly connected, Loopback1
O 10.1.23.0/24 [110/128] via 10.1.123.3, 00:00:28, Serial1/3
[110/128] via 10.1.123.2, 00:00:28, Serial1/3
C 10.1.123.0/24 is directly connected, Serial1/3
O 10.1.123.2/32 [110/64] via 10.1.123.2, 00:00:28, Serial1/3
O 10.1.123.3/32 [110/64] via 10.1.123.3, 00:00:28, Serial1/3
HQ#sh ip ospf int s1/3 -----查看接口
Serial1/3 is up, line protocol is up
Internet Address 10.1.123.1/24, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT ----点到多点
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:15
……
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 10.1.2.1
Adjacent with neighbor 10.1.3.1
Suppress hello for 0 neighbor(s)
HQ#sh ip ospf data
OSPF Router with ID (10.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.1.1.1 10.1.1.1 146 0x80000003 0x007039 4
10.1.2.1 10.1.2.1 147 0x80000005 0x00E2B1 5
10.1.3.1 10.1.3.1 146 0x80000007 0x002F5E 5
HQ#sh ip ospf nei -----查看邻居关系,可见没有DR和BDR关系存在
Neighbor ID Pri State Dead Time Address Interface
10.1.2.1 0 FULL/ - 00:01:58 10.1.123.2 Serial1/3
10.1.3.1 0 FULL/ - 00:01:57 10.1.123.3 Serial1/3
AST#sh ip ospf data
OSPF Router with ID (10.1.2.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.1.1.1 10.1.1.1 191 0x80000003 0x007039 4
10.1.2.1 10.1.2.1 189 0x80000005 0x00E2B1 5
10.1.3.1 10.1.3.1 191 0x80000007 0x002F5E 5
EAST#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
10.1.1.1 0 FULL/ - 00:01:57 10.1.123.1 Serial1/0
10.1.3.1 0 FULL/ - 00:00:10 10.1.23.3 Serial1/1
实验总结:
在采用点对多点接口的时候OSPF路由协议的配置,帧中继接口在同一子网,并且邻居关系是自动建立,无需手动指定邻居,无DR/BDR选举,默认的HELLO时间间隔为30秒,等待时间和死亡时间为HELLO时间间隔的4倍,120秒。