三、BMA网络
1、默认网络类型(BROADCAST)
R1(config)#int lo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f1/0
R1(config-if)#ip add 10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 1.1.1.1 0.0.0.255 a 0
R1(config-router)#network 10.1.1.1 0.0.0.255 a 0
R2(config)#int lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int f1/0
R2(config-if)#ip add 10.1.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 2.2.2.2 0.0.0.255 a0
R2(config-router)#network 2.2.2.2 0.0.0.255 a 0
R2(config-router)#network 10.1.1.2 0.0.0.255 a 0
R3(config)#int lo 0
R3(config-if)#ip add 3.3.3.3
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#int f1/0
R3(config-if)#ip add 10.1.1.3 255.255.255.0
R3(config-if)#no shut
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 3.3.3.3 0.0.0.255 a 0
R3(config-router)#network 10.1.1.3 0.0.0.255 a 0
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:31 10.1.1.2 FastEthernet1/0
3.3.3.3 1 FULL/DROTHER 00:00:35 10.1.1.3 FastEthernet1/0
R1#show ip ospf in
R1#show ip ospf interface f1/0
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
Backup Designated router (ID) 2.2.2.2, Interface address 10.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:05
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, 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 2, Adjacent neighbor count is 2
Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
Adjacent with neighbor 3.3.3.3
Suppress hello for 0 neighbor(s)
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:38 10.1.1.1 FastEthernet1/0
2.2.2.2 1 FULL/BDR 00:00:32 10.1.1.2 FastEthernet1/0
总结:BMA网络中的默认类型是broadcast,自动建立邻居关系,选DR、BDR, Hello 10, Dead 40
2、point-to-point类型
R1#show ip route
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
L 1.1.1.1/32 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 10.1.1.3, 00:00:09, FastEthernet1/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet1/0
L 10.1.1.1/32 is dire
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 EXSTART/ - 00:00:35 10.1.1.2 FastEthernet1/0
R1#show ip ospf interface f1/0
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:05
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, 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 3.3.3.3
Suppress hello for 0 neighbor(s)
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:38 10.1.1.1 FastEthernet1/0
总结:point-to-point自动建立邻居关系,不选DR、BDR。Hello 10, Dead 40, Wait 40,
3、point-to-multipoint类型
R1#show ip route
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
L 1.1.1.1/32 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 10.1.1.2, 00:00:31, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 10.1.1.3, 00:00:09, FastEthernet1/0
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet1/0
L 10.1.1.1/32 is directly connected, FastEthernet1/0
O 10.1.1.2/32 [110/1] via 10.1.1.2, 00:00:31, FastEthernet1/0
O 10.1.1.3/32 [110/1] via 10.1.1.3, 00:00:09, FastEthernet1/0
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:01:37 10.1.1.3 FastEthernet1/0
2.2.2.2 0 FULL/ - 00:01:42 10.1.1.2 FastEthernet1/0
R1#show ip ospf in
R1#show ip ospf interface f1/0
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
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:20
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, 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 2, Adjacent neighbor count is 2
Adjacent with neighbor 3.3.3.3
Adjacent with neighbor 2.2.2.2
Suppress hello for 0 neighbor(s)
总结;point-to-multipoint 自动发现邻居,不选DR、BDR,Hello 30, Dead 120
4、point-to-multipoint none-broadcast类型
R1#show ip route
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
L 1.1.1.1/32 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/3] via 10.1.1.3, 00:00:34, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 10.1.1.3, 00:02:39, FastEthernet1/0
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet1/0
L 10.1.1.1/32 is directly connected, FastEthernet1/0
O 10.1.1.2/32 [110/2] via 10.1.1.3, 00:00:34, FastEthernet1/0
O 10.1.1.3/32 [110/1] via 10.1.1.3, 00:02:39, FastEthernet1/0
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:10 10.1.1.2 FastEthernet1/0
3.3.3.3 0 FULL/ - 00:01:05 10.1.1.3 FastEthernet1/0
R1#show ip ospf in
R1#show ip ospf interface f1/0
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
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:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, 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 3.3.3.3
总结:point-to-multipoint none-broadcast类型的 Network Type为POINT_TO_MULTIPOINT
不选DR、BDR,自动建立邻居关系。Hello 30, Dead 120
5、broadcast类型
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:31 10.1.1.2 FastEthernet1/0
3.3.3.3 1 FULL/DR 00:00:38 10.1.1.3 FastEthernet1/0
R1#show ip ospf in
R1#show ip ospf interface f1/0
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 3.3.3.3, Interface address 10.1.1.3
Backup Designated router (ID) 2.2.2.2, Interface address 10.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, 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 2, Adjacent neighbor count is 2
Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
Adjacent with neighbor 3.3.3.3 (Designated Router)
Suppress hello for 0 neighbor(s)
总结:broadcast类型需要手动指定邻居,选DR、BDR,Hello 10, Dead 40
6、None-broadcast类型
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:01:49 10.1.1.2 FastEthernet1/0
3.3.3.3 1 FULL/DROTHER 00:01:51 10.1.1.3 FastEthernet1/0
R1#show ip ospf interface f1/0
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 2.2.2.2, Interface address 10.1.1.2
Backup Designated router (ID) 1.1.1.1, Interface address 10.1.1.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:00
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 2.2.2.2 (Designated Router)
Adjacent with neighbor 3.3.3.3
Suppress hello for 0 neighbor(s)
总结:(BMA以太网)
none-broadcast需要手动指邻居,选DR/BDR,Hello 30, Dead 120
BMA网络中的默认类型是broadcast,自动建立邻居关系,选DR、BDR, Hello 10, Dead 40
point-to-point自动建立邻居关系,不选DR、BDR。Hello 10, Dead 40, Wait 40,
point-to-multipoint 自动发现邻居,不选DR、BDR,Hello 30, Dead 120
point-to-multipoint none-broadcast类型的 Network Type为POINT_TO_MULTIPOINT
不选DR、BDR,自动建立邻居关系。Hello 30, Dead 120
broadcast类型需要手动指定邻居,选DR、BDR,Hello 10, Dead 40
none-broadcast需要手动指邻居,选DR、BDR,Hello 30, Dead 120