Configuring Basic OSPF

Configuring Basic OSPF 

Routing protocol configuration occurs in Global Configuration mode. On Router, to configure OSPF:
Router(config)#  router ospf 1
Router(config-router)#  router-id 1.1.1.1
Router(config-router)#  network 172.16.0.0 0.0.255.255 area 1
Router(config-router)#  network 172.17.0.0 0.0.255.255 area 0  
Explanation 
  • The first command, router ospf 1, enables the OSPF process. The “1” indicates the OSPF process ID, and can be unique on each router. The process ID allows multiple OSPF processes to run on the same router. 
  • The router-id command assigns a unique OSPF ID of 1.1.1.1 for this router.
  • Here in OSPF we use wild card mask along with network statement to assagin an interface to a specific area
To change OSPF bandwidth
Router(config)#  interface s0
Router(config-if)#  bandwidth 64 
To change OSPF Cost
Router(config)#  interface fa 0/0
Router(config-if)#  ip ospf cost 10
Changing the cost of an interface can alter which path OSPF selected as “shortest,” and thus should be used with great care.

To alter how OSPF calculates its default metrics for interfaces:  
Router(config)#  router ospf 1
Router(config-router)#  ospf auto-cost reference-bandwidth 100
The above ospf auto-cost command has a value of 100 configured, which is actually the default. This indicates that a 100Mbps link will have a cost of 1 (because 100/100 is 1).Lowest cost is better

OSPF passive interface
As in EIGRP,OSPF will not form neighbor ship,If the Passive interface command is configured
Router(config)#  router ospf 1
Router(config-router)#  network 10.4.0.0 0.0.255.255 area 0
Router(config-router)#  passive-interface default
Router(config-router)#  no passive-interface fa 0/0 
"Passive-interface default" command make all interface passive and "no passive-interface fa 0/0" command will remove passive interface from fa 0/0 interface

0 comments:

Post a Comment