before you start configure OSPF ip routing cmd need to be enabled on the router
Now from the global configuration prompt type:
# router ospf processID
The Autonomous System number for the OSPF network is 15615. Use this number for the processID. This will create an OSPF routing process on the router. It will also give you a new prompt, the router configuration prompt:
routername(config-router)#
You now need to tell the router which networks it should advertise routes for. This is done with the command
network network_address wildcard_mask area areaID
network_address is the IP address for the network you wish to add. The wildcard_mask is similar to the reverse of the subnet mask. For our purposes where we are using network addresses like 156.156.subnet.host we can use a wildcard_mask of 0.0.0.255
For example:
ospf4(config-router)#network 156.156.32.0 0.0.0.255 area 0
Would tell the router to advertise the network 156.156.128.0. OSPF can be divided into multiple areas, each of which must be connected to the backbone area, area 0. Since we are configuring just four routers to use OSPF we will place them all in the backbone area and thus assign them all to area 0. You should use the network command for each of the networks that the router is connected to and is a part of the OSPF network.
Unless this router is the exit router it will not know how to get to locations outside of the AS. In order to reach these destinations we need to give the router a default route over which the router will send packets that it does not have a route for in the routing table. Type exit to return to global configuration mode. We will now add a static route to the routing table using the command
ip route prefix mask address
where prefix is the address of the network you are creating a route for, mask is the mask for this network, and address is the IP address of the interface you are routing the packets to. For all of the eigrp routers except the exit router (the one connected to the core) use the following command to create the default route.
ospf3(config)# ip route 0.0.0.0 0.0.0.0 156.156.26.2
You have now completed a basic configuration of OSPF on the router!
There are many more configuration options available to you, such as modifying the metrics for each of the interfaces, adjusting the timers and delays for when updates are sent, routes are declared invalid, etc.
You can also turn on or off various features such as authentication and split-horizon. To find out more about other commands just type a question mark at the router configuration prompt or read the references listed at the end of the page.
It would be a good idea to save your configuration! To do this type the following at the privileged mode prompt:
write
This will save the currently running configuration to the NVRAM. If the router gets rebooted for some reason ( it shouldn't happen, but it could!) it will use the configuration that is stored in the NVRAM. So save often!
You can view the currently running configuration by typing:
write terminal
This will print the configuration to the screen, but it will not save it.
to verify the OSPF use the following cmds
# show ip route OSPF processID
# show ip route network
# show ip ospf ?
Wednesday, June 11, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment