85 OSPF Network Types
85 OSPF Network Types
The network type defines how the neighbor relationship will be formed. Behavior of OSPF when
operating in these different network types – whether hellos are multicast or unicast, if DR/BDR
are elected, and so on. There are five different OSPF network types on a Cisco router point-to-
point, broadcast, non-broadcast, point-to-multipoint non-broadcast and point-to-multipoint.
R1 Configuration
R1(config)#interface s1/0
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1#show ip ospf interface s1/0
R1#show ip ospf neighbor
R2 Configuration
R2(config)#interface s1/0
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2#show ip ospf interface s1/0
R2#show ip ospf neighbor
R3 Basic Configuration
R3(config)#interface FastEthernet0/0
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
R4 Basic Configuration
R4(config)#interface FastEthernet0/0
R4(config-if)#ip add 192.168.1.4 255.255.255.0
R4(config-if)#no shutdown
R5 Basic Configuration
R5(config)#interface FastEthernet0/0
R5(config-if)#ip add 192.168.1.5 255.255.255.0
R5(config-if)#no shutdown
OSPF Configuration
R3(config)#router ospf 1
R3(config-router)#network 192.168.1.0 0.0.0.255 area 0
R4(config)#router ospf 1
R4(config-router)# network 192.168.1.0 0.0.0.255 area 0
R5(config)#router ospf 1
R5(config-router)# network 192.168.1.0 0.0.0.255 area 0
R3#show ip ospf interface f0/0
R5#show ip ospf interface f0/0
R4#show ip ospf interface f0/0
R3# show ip ospf neighbor
Routers Configurations
R6(config)# interface Serial1/0
R6(config-if)# ip address 192.168.1.6 255.255.255.0
R6(config-if)#encapsulation frame-relay
R6(config-if)# no shutdown
R7(config)# interface Serial1/0
R7(config-if)# ip address 192.168.1.7 255.255.255.0
R7(config-if)#encapsulation frame-relay
R7(config-if)# no shutdown
R8(config)# interface Serial1/0
R8(config-if)# ip address 192.168.1.8 255.255.255.0
R8(config-if)#encapsulation frame-relay
R8(config-if)# no shutdown
R6(config)#router ospf 1 R7(config)#router ospf 1
R6(config-router)# network 192.168.1.0 R7(config-router)# network 192.168.1.0
0.0.0.255 area 0 0.0.0.255 area 0
R6(config-router)# neighbor 192.168.1.7 R7(config-router)# neighbor 192.168.1.6
R6(config-router)# neighbor 192.168.1.8 R7(config-router)# neighbor 192.168.1.8
R8(config)#router ospf 1
R8(config-router)# network 192.168.1.0 0.0.0.255 area 0
R8(config-router)# neighbor 192.168.1.6
R8(config-router)# neighbor 192.168.1.7
R6#show ip ospf interface s1/0 R7#show ip ospf interface s1/0
Routers Configurations
R6(config)# interface Serial1/0
R6(config-if)# ip address 192.168.1.6 255.255.255.0
R6(config-if)#encapsulation frame-relay
R6(config-if)# no shutdown
R6(config-if)#ip ospf network point-to-multipoint
R7(config)# interface Serial1/0
R7(config-if)# ip address 192.168.1.7 255.255.255.0
R7(config-if)#encapsulation frame-relay
R7(config-if)# no shutdown
R6(config-if)#ip ospf network point-to-multipoint
R8(config)# interface Serial1/0
R8(config-if)# ip address 192.168.1.8 255.255.255.0
R8(config-if)#encapsulation frame-relay
R8(config-if)# no shutdown
R6(config-if)#ip ospf network point-to-multipoint
R6,R7,R8(config)#router ospf 1
R6,R7,R8(config-router)# network 192.168.1.0 0.0.0.255 area 0
R6#show ip ospf interface s1/0 R7#show ip ospf interface s1/0
R8#show ip ospf interface s1/0 R6# show ip ospf neighbor
R7# show ip ospf neighbor R8# show ip ospf neighbor