天天看點

在NBMA網絡點到多點模式下配置OSPF實際案例(配圖)+詳細驗證過程

一個點到多點網絡被看作若幹具有一個或多個鄰居的點到點接口。當一個接口被配置給點到多點網絡,就不需要DR/BDR,不需要定義鄰居,這大大簡化了給NBMA網絡配置OSPF。

使用端口指令 ip ospa network point-to-multioint可以給所有路由器設定網絡類型。既不需要定義鄰居,也不需要設定優先級,因為網絡中沒有DR/BDR。

// 幀交換機

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

  frame-relay route 300 int s2/0 200

  frame-relay route 399 int s4/0 400

int s4/0

  frame-relay route 400 int s2/0 399

// R2 //

int lo0

  ip ad 2.2.2.2 255.255.255.0

  ip ad 192.1.1.2 255.255.255.0

  ip ospf network point-to-multipoint    //改變接口模式為點到多點

  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 //

  ip ad 3.3.3.3 255.255.255.0

  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

  network 3.3.3.3 0.0.0.0 area 0

  network 192.1.1.3 0.0.0.0 area 0

// R4 //

  ip ad 4.4.4.4 255.255.255.0

  ip ad 192.1.1.4 255.255.255.0

  frame-relay map ip 192.1.1.2 400 broadcast

  frame-relay map ip 192.1.1.3 400 broadcast

  network 4.4.4.4 0.0.0.0 area 0

  network 192.1.1.4 0.0.0.0 area 0

注意上述配置中沒有任何特别操作,比如使用neighbor指令指明鄰居,設定OSPF優先級等等,這就是點到多點模式下的特點。

驗證過程:

一、首先來檢查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 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

    Hello due in 00:00:18

  Index 2/2, flood queue length 0

  Next 0x0(0)/0x0(0)

  Last flood scan length is 1, 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 POINT_TO_MULTIPOINT, Cost: 64

    Hello due in 00:00:01

  Neighbor Count is 1, Adjacent neighbor count is 1

    Adjacent with neighbor 3.3.3.3

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 POINT_TO_MULTIPOINT, Cost: 64

    Hello due in 00:00:02

  Last flood scan length is 1, maximum is 1

二、接下來觀察各路由器鄰居建立情況:

r2#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface

3.3.3.3           1   FULL/  -        00:01:33    192.1.1.3       Serial2/0

r3#sh ip os nei

4.4.4.4           1   FULL/  -        00:01:56    192.1.1.4       Serial3/0

2.2.2.2           1   FULL/  -        00:01:36    192.1.1.2       Serial3/0

r4#sh ip os nei

3.3.3.3           1   FULL/  -        00:01:37    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:08:30, Serial2/0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/129] via 192.1.1.3, 00:08:30, Serial2/0

     192.1.1.0/24 is variably subnetted, 3 subnets, 2 masks

C       192.1.1.0/24 is directly connected, Serial2/0

O       192.1.1.3/32 [110/64] via 192.1.1.3, 00:08:30, Serial2/0

O       192.1.1.4/32 [110/128] via 192.1.1.3, 00:08:30, 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:08:54, Serial3/0

     3.0.0.0/24 is subnetted, 1 subnets

C       3.3.3.0 is directly connected, Loopback0

O       4.4.4.4 [110/65] via 192.1.1.4, 00:08:54, Serial3/0

C       192.1.1.0/24 is directly connected, Serial3/0

O       192.1.1.2/32 [110/64] via 192.1.1.2, 00:08:54, Serial3/0

O       192.1.1.4/32 [110/64] via 192.1.1.4, 00:08:54, Serial3/0

r4#sh ip ro

O       2.2.2.2 [110/129] via 192.1.1.3, 00:09:20, Serial4/0

O       3.3.3.3 [110/65] via 192.1.1.3, 00:09:20, 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

O       192.1.1.2/32 [110/128] via 192.1.1.3, 00:09:20, Serial4/0

O       192.1.1.3/32 [110/64] via 192.1.1.3, 00:09:20, Serial4/0

注意,在點到多點或點到點模式下,路由表中會自動生成32位主機路由。

本文轉自 ciscodocu51CTO部落格,原文連結:http://blog.51cto.com/ciscodocu/52831,如需轉載請自行聯系原作者