基于帧中继point-to-multipoint的单区域OSPF的配置

 标签:    [ 推送到技术圈]

 R4 R3 R2 通过 R1 相连,形成 hub and spoke 网络拓扑, R1 为模拟帧中继交换机, R4 hub 路由器, R2 R3 spoke 路由器, R4 R3 R2 采用点对多点接口。所有路由器均使用物理接口连接并启用 OSPF
 
1 、使用 R1 模拟帧中继交换机 :
Router(config)#hostname FRS
FRS(config)# frame-relay switching
FRS(config)#interface Serial1/0
FRS(config-if)# no ip address
FRS(config-if)# encapsulation frame-relay
FRS(config-if)# clock rate 2016000
FRS(config-if)# frame-relay intf-type dce
FRS(config-if)# frame-relay route 201 interface Serial1/3 102
FRS(config-if)#no shutdown
FRS(config-if)#exit
FRS(config)#interface Serial1/2
FRS(config-if)#no ip address
FRS(config-if)#encapsulation frame-relay
FRS(config-if)#no ip route-cache
FRS(config-if)#clock rate 2016000
FRS(config-if)#frame-relay intf-type dce
FRS(config-if)#frame-relay route 301 interface Serial1/3 103
FRS(config-if)#no shutdown
FRS(config-if)#exit
FRS(config)#interface Serial1/3
FRS(config-if)#no ip address
FRS(config-if)#encapsulation frame-relay
FRS(config-if)#no ip route-cache
FRS(config-if)#clock rate 2016000
FRS(config-if)#frame-relay intf-type dce
FRS(config-if)#frame-relay route 102 interface Serial1/0 201
FRS(config-if)#frame-relay route 103 interface Serial1/2 301
FRS(config-if)#no shutdown
FRS(config-if)#exit
 
-----------------------------------------------------------------------------------------------------------------------
 
2 R4 的配置如下:
Routerconfig)#hostname HQ
HQ(config)#interface Loopback1
HQ(config-if)#ip address 10.1.1.1 255.255.255.0
HQ(config-if)#ip ospf network point-to-point
HQ(config-if)#exit
HQ(config)#interface Serial1/3
HQ(config-if)#ip address 10.1.123.1 255.255.255.0
HQ(config-if)#encapsulation frame-relay
HQ(config-if)#ip ospf network point-to-multipoint #the default network type is non-broadcast
HQ(config-if)#frame-relay map ip 10.1.123.1 102    # 使得 HQ 可以 Ping 通自己
HQ(config-if)#frame-relay map ip 10.1.123.2 102 broadcast   # 帧中继静态映射
HQ(config-if)#frame-relay map ip 10.1.123.3 103 broadcast
HQ(config-if)#no frame-relay inverse-arp   # 关闭动态 ARP 映射
HQ(config-if)#no shutdown
HQ(config-if)#exit
HQ(config)#router ospf 1
HQ(config-router)#log-adjacency-changes
HQ(config-router)#network 10.1.1.0 0.0.0.255 area 0
HQ(config-router)#network 10.1.123.0 0.0.0.255 area 0
HQ(config-router)#exit
 
-----------------------------------------------------------------------------------------------------------------------
 
3 R2 的配置如下:
Router(config)#hostname EAST
EAST(config)#interface Loopback2
EAST(config-if)#ip address 10.1.2.1 255.255.255.0
EAST(config-if)#ip ospf network point-to-point
EAST(config-if)#exit
EAST(config)#interface Serial1/0
EAST(config-if)#ip address 10.1.123.2 255.255.255.0
EAST(config-if)#encapsulation frame-relay
EAST(config-if)#ip ospf network point-to-multipoint
EAST(config-if)#frame-relay map ip 10.1.123.2 201
EAST(config-if)#frame-relay map ip 10.1.123.1 201 broadcast
EAST(config-if)#frame-relay map ip 10.1.123.3 201 broadcast
EAST(config-if)#no frame-relay inverse-arp
EAST(config-if)#no shutdown
EAST(config-if)#exit
EAST(config)#interface Serial1/1
EAST(config-if)#ip address 10.1.23.2 255.255.255.0
EAST(config-if)#ip ospf hello-interval 5  # 更改定时器 timer
EAST(config-if)#ip ospf dead-interval 15
EAST(config-if)#no shutdown
EAST(config-if)#exit
EAST(config)#router ospf 1
EAST(config-router)#network 10.1.2.0 0.0.0.255 area 0
EAST(config-router)#network 10.1.23.0 0.0.0.255 area 0
EAST(config-router)#network 10.1.123.0 0.0.0.255 area 0
EAST(config-router)#exit
 
-----------------------------------------------------------------------------------------------------------------------
 
4 R3 的配置如下:
Router(config)#hostname WEST
WEST(config)#interface Loopback3
WEST(config-if)#ip address 10.1.3.1 255.255.255.0
WEST(config-if)#ip ospf network point-to-point
WEST(config-if)#exit
WEST(config)#interface Serial1/1
WEST(config-if)#ip address 10.1.23.3 255.255.255.0
WEST(config-if)#ip ospf hello-interval 5
WEST(config-if)#ip ospf dead-interval 15
WEST(config-if)#no shutdown
WEST(config-if)#exit
WEST(config)#interface Serial1/2
WEST(config-if)#ip address 10.1.123.3 255.255.255.0
WEST(config-if)#encapsulation frame-relay
WEST(config-if)#ip ospf network point-to-multipoint
WEST(config-if)#frame-relay map ip 10.1.123.3 301
WEST(config-if)#frame-relay map ip 10.1.123.1 301 broadcast
WEST(config-if)#frame-relay map ip 10.1.123.2 301 broadcast
WEST(config-if)#no frame-relay inverse-arp
WEST(config-if)#no shutdown
WEST(config-if)#exit
WEST(config)#router ospf 1
WEST(config-router)#network 10.1.3.0 255.255.255.0 area 0
WEST(config-router)#network 10.1.23.0 255.255.255.0 area 0
WEST(config-router)#network 10.1.123.0 255.255.255.0 area 0
WEST(config-router)#exit
 
三、验证配置:
 
EAST:
 
EAST#show ip ospf interface Serial1/0
Serial1/0 is up, line protocol is up
  Internet Address 10.1.123.2/24, Area 0
  Process ID 1, Router ID 10.1.2.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:10
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 3/3, 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 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.1.1.1
  Suppress hello for 0 neighbor(s)
 
EAST#show ip ospf neighbor  # DRBDR的选举!
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:01:54    10.1.123.1      Serial1/0
10.1.3.1          0   FULL/  -        00:00:10    10.1.23.3       Serial1/1
 
EAST#show ip route ospf
     10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O       10.1.3.0/24 [110/65] via 10.1.23.3, 00:02:30, Serial1/1
O       10.1.1.0/24 [110/65] via 10.1.123.1, 00:02:30, Serial1/0
O       10.1.123.1/32 [110/64] via 10.1.123.1, 00:02:30, Serial1/0
O       10.1.123.3/32 [110/64] via 10.1.23.3, 00:02:30, Serial1/1
 
WEST:
 
WEST#show ip ospf interface Serial1/2
Serial1/2 is up, line protocol is up
  Internet Address 10.1.123.3/24, Area 0
   Process ID 1, Router ID 10.1.3.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:07
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 3/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 4 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.1.1.1
  Suppress hello for 0 neighbor(s)
 
WEST#show ip ospf neighbor  # DRBDR的选举!
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:01:46    10.1.123.1      Serial1/2
10.1.2.1          0   FULL/  -        00:00:11    10.1.23.2       Serial1/1
 
WEST#show ip route ospf
     10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O       10.1.2.0/24 [110/65] via 10.1.23.2, 00:07:16, Serial1/1
O       10.1.1.0/24 [110/65] via 10.1.123.1, 00:07:16, Serial1/2
O       10.1.123.1/32 [110/64] via 10.1.123.1, 00:07:16, Serial1/2
O       10.1.123.2/32 [110/64] via 10.1.23.2, 00:07:16, Serial1/1
 
 
总结:
帧中继交换机:
1.       全局模式: frame-relay switching
2.       接口模式:
a)         No ip address
b)        Encapsulation frame-relay
c)        Clock + dce
d)        Frame-relay route 配置路由
 
路由器配置:
1.         encapsulation frame-relay
2.         ospf network 类型
3.         frame-relay map ip
4.         全互联情况下,可以不用加 no frame-relay inverse-arp

你可能感兴趣的:(职场,休闲)