NBMA網絡:非廣播(non-broadcast)多路通路,不支援廣播/多點傳播
MA網絡:即廣播(broadcast)多路通路(支援廣播群組播)
實驗拓撲:
幀中繼交換機配置
指令行
AR1
ospf 1 router-id 1.1.1.1
peer 10.1.1.4
peer 10.1.1.5
area 0.0.0.0
interface Serial1/0/0
link-protocol fr
ip address 10.1.1.1 255.255.255.0
ospf enable 1 area 0.0.0.0
interface LoopBack0
ip address 11.1.1.1 255.255.255.255
ospf enable 1 area 0.0.0.0
AR4
ospf 1 router-id 4.4.4.4
peer 10.1.1.1
area 0.0.0.0
interface Serial1/0/0
link-protocol fr
ip address 10.1.1.4 255.255.255.0
ospf enable 1 area 0.0.0.0
interface LoopBack0
ip address 44.1.1.1 255.255.255.255
ospf enable 1 area 0.0.0.0
AR5
ospf 1 router-id 5.5.5.5
peer 10.1.1.1
area 0.0.0.0
interface Serial1/0/0
link-protocol fr
ip address 10.1.1.5 255.255.255.0
ospf enable 1 area 0.0.0.0
interface LoopBack0
ip address 55.1.1.1 255.255.255.255
ospf enable 1 area 0.0.0.0
<AR1>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Serial1/0/0
10.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.1.1.4/32 Direct 0 0 D 10.1.1.4 Serial1/0/0
10.1.1.5/32 Direct 0 0 D 10.1.1.5 Serial1/0/0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
11.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
55.1.1.1/32 OSPF 10 48 D 10.1.1.5 Serial1/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[AR4]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.4 Serial1/0/0
10.1.1.1/32 Direct 0 0 D 10.1.1.1 Serial1/0/0
10.1.1.4/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
44.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[AR5]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.5 Serial1/0/0
10.1.1.1/32 Direct 0 0 D 10.1.1.1 Serial1/0/0
10.1.1.5/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
11.1.1.1/32 OSPF 10 48 D 10.1.1.1 Serial1/0/0
55.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
//因為幀中繼AR4、AR5無法通信,且AR1不是DR是以AR4和AR5沒有彼此的路由資訊
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=290 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=130 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=130 ms
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=120 ms
--- 10.1.1.1 ping statistics ---
4 packet(s) transmitted
4 packet(s) received
0.00% packet loss
round-trip min/avg/max = 120/167/290 ms
<AR5>ping 10.1.1.4
PING 10.1.1.4: 56 data bytes, press CTRL_C to break
Request time out
Request time out
//由于NBMA網絡必須是全連通的,是以網絡中任意兩台路由器之間都必須直接可達。但在很多情況下,這個要求無法滿足,此時必須通過指令強制改變網絡的類型為P2MP
檢視OSPF接口資訊
<AR5>dis ospf interface s1/0/0
OSPF Process 1 with Router ID 5.5.5.5
Interfaces
Interface: 10.1.1.5 (Serial1/0/0)
Cost: 48 State: DR Type: NBMA MTU: 1500
Priority: 1
Designated Router: 10.1.1.5
Backup Designated Router: 10.1.1.1
Timers: Hello 30 , Dead 120 , Poll 120 , Retransmit 5 , Transmit Delay 1
修改OSPF 接口優先級,選舉為DR
[AR1-Serial1/0/0]ospf dr-priority ?
INTEGER<0-255> Router priority value
[AR1-Serial1/0/0]ospf dr-priority 255
<AR5>dis ospf peer
OSPF Process 1 with Router ID 5.5.5.5
Neighbors
Area 0.0.0.0 interface 10.1.1.5(Serial1/0/0)'s neighbors
Router ID: 1.1.1.1 Address: 10.1.1.1
State: Full Mode:Nbr is Slave Priority: 255
DR: 10.1.1.1 BDR: 10.1.1.5 MTU: 0
Dead timer due in 100 sec
Retrans timer interval: 5
Neighbor is up for 00:00:37
Authentication Sequence: [ 0 ]
<AR5>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.5 Serial1/0/0
10.1.1.1/32 Direct 0 0 D 10.1.1.1 Serial1/0/0
10.1.1.5/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
11.1.1.1/32 OSPF 10 48 D 10.1.1.1 Serial1/0/0
44.1.1.1/32 OSPF 10 48 D 10.1.1.4 Serial1/0/0
55.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
修改接口網絡類型
[AR1]interface s1/0/0
[AR1-Serial1/0/0]ospf network-type ?
broadcast Specify OSPF broadcast network
nbma Specify OSPF NBMA network
p2mp Specify OSPF point-to-multipoint network
p2p Specify OSPF point-to-point network
[AR1-Serial1/0/0]ospf network-type p2mp
[AR4]interface s1/0/0
[AR4-Serial1/0/0]ospf network-type p2mp
[AR5]interface s1/0/0
[AR5-Serial1/0/0]ospf network-type p2mp
[AR4-Serial1/0/0]ping 10.1.1.5
PING 10.1.1.5: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.5: bytes=56 Sequence=1 ttl=254 time=210 ms
Reply from 10.1.1.5: bytes=56 Sequence=2 ttl=254 time=110 ms
Reply from 10.1.1.5: bytes=56 Sequence=3 ttl=254 time=100 ms
Reply from 10.1.1.5: bytes=56 Sequence=4 ttl=254 time=130 ms