CCNA Guide to Cisco Networking Fourth Edition Ch.8 Answer: OSPF is configured using the router ospf [process id] command.
ip default gateway
When you have routing enabled then you need default route (also calleddefault network or Gateway of Last Resort). You do not need default routeif you don't use routing. For example if you just have one router in your network there is no need for default route. When you have more than one router in a network you need default route.Note: If you connect to WAN (Internet) you need default route. The default route allows connection with Internet. If you are not using WAN and have one router than there is not need for default route but in these days everyone connects to the Internet so most likely your router has default route. When using router to connect to the Internet using DHCP this happens automatically so there will no need to configure default route manually. If you need to manually set default route then use the commands IP default-network or IP route 0.0.0.0 0.0.0.0 .More info can be found at Cisco's site - see the related link below.
default-information originate
ip classless
--> If the destination network is directly connected, the router forwards the packet to the destination host. --> If no route exists for the destination network and a default route is present, the packet is forwarded to the next-hop router. --> If the originating host has a default gateway configured, the packet for a remote network can be forwarded using that route.
Router> enableRouter# config tRouter(config)# ip default route [IP address]
router(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.1
Default Route
the default gateway is the most common static route used in a host computer. netstat -r is the command line command to obtain the routing table.
A host uses a default route to transfer data to a host outside the local network when no other route to the destination exists. You may configure the gateway of last resort to achieve this functionality especially if there is a need to route packets outside the LAN. The way to configure a default route to a Cisco Layer 3 device is as follows: Router(config)# ip route <network-address> <subnet-mask> <next-hop-address> Example: Router(config)# ip route 0.0.0.0 0.0.0.0 172.18.3.1
You would only need a default gateway address if you wanted to route packets outside your local area network.
ip route prefix mask address