广播式网络是一个渐进的操作过程,它可以定义所有邻居。当给一个接口配置广播时,这个接口就好像是连入了LAN中,网络中仍要选出DR和BDR,需特别保证路由器选出的DR/BDR与网络中所有的路由器都有物理连接。
使用接口命令ip ospf network broadcat可以向所有路由器上设置网络类型命令。路由器A和C的串行接口被配置的OSPF优先级为0,这将保证路由器B成为DR
//帧交换机
frame-relay switching
int s0/0
no ip addr
encap frame-relay ietf
clockrate 500000
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 100 int s0/1 100
int s0/1
no ip addr
encap frame-relay ietf
clockrate 500000
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 100 int s0/0 100
frame-relay route 200 int s1/0 200
int s1/0
no ip addr
encap frame-relay ietf
clockrate 500000
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 200 interface s0/1 200
//router a
int lo0
ip addr 1.1.1.1 255.255.255.0
int s0/0
ip addr 192.1.1.1 255.255.255.0
encap frame-relay ietf
ip ospf network broadcast //定义网络类型为广播
ip ospf priority 0 //设定特定接口的优先级,以用于DR选举。OSPF优先级为0意味着该路由器在DR选举过程中是不合格的。
frame-relay map ip 192.1.1.2 100 broadcast
frame-relay map ip 192.1.1.3 100 broadcast
frame-relay lmi-type ansi
router ospf 64
netw 192.1.1.0 0.0.0.255 area 0 //指定运行OSPF的接口以及该接口位于的区域
netw 1.1.1.1 0.0.0.0 area 0
//route b
int lo0
ip addr 2.2.2.2 255.255.255.0
int s0/0
ip addr 192.1.1.2 255.255.255.0
encap frame-relay ietf
ip ospf network broadcast
frame-relay map ip 192.1.1.1 100 broadcast
frame-relay map ip 192.1.1.3 200 broadcast
frame-realy lmi-type ansi
router ospf 64
netw 192.1.1.0 0.0.0.255 area 0
netw 2.2.2.2 0.0.0.0 area 0
//router c
int lo0
ip addr 3.3.3.3 255.255.255.0
int s0/0
ip addr 192.1.1.3 255.255.255.0
encap frame-relay ietf
ip ospf network broadcast
ip ospf priority 0 //设定特定接口的优先级,以用于DR选举。OSPF优先级为0意味着该路由器在DR选举过程中是不合格的。
frame-relay map ip 192.1.1.1 200 broadcast
frame-relay map ip 192.1.1.2 200 broadcast
frame-realy lmi-type ansi
router ospf 64
netw 192.1.1.0 0.0.0.255 area 0
netw 3.3.3.3 0.0.0.0 area 0
//监视和测试配置
show ip ospf interface s0/0
network type broadcast priority 0
在broadcast模式下,如果把A的priority调高,它将成为BDR,此时从A看 show ip ospf neighbor中显示B为DR,看不到C,因为A与C没有物理连接。同样C也看不到A成为BDR,因为他们没有物理连接。
加载中,请稍候......