Cisco CCNA mock exam questions sample test – Question 152

.Which Cisco Internetwork Operating System (IOS) command would be used to define a static route for network through default gateway

A. router(config)# ip route
B. router# ip route
C. router(config)# ip classless
D. router(config)# ip default gateway
E. router# ip default gateway

Correct Answer: A

The router(config)# ip route command would be used to define a static route for network through default gateway Static routing is used to manually configure routes to remote networks. The syntax of the ip route command is as follows:
ip route [destination_network] [mask] [next-hop_address or exit interface] [administrative_distance] [permanent]
The parameters of the command are as follows:
destination_network: Defines the network that needs to be added in the routing table.
mask: Defines the subnet mask used on the network.
next-hop_address: Defines the default gateway or next hop router that receives and forwards the packets to the remote network.
administrative_distance (AD): Static routes have an AD of 1, which can be changed to change the priority of the route.
Static routing is often implemented in small yet stable networks where the number of routes is small and manageable, and the network can benefit from the elimination of the traffic
that dynamic routing protocols would introduce. If this is the case, it is important that all routes be statically created, or else networking problems can occur. For example, if in the
diagram below no route to the network on Router 2 exists on Router 1, Host 1 will be unable to ping Host 2. The fact that Host 1 would still be able to ping the
S0/0 interface on Router 2 could obscure this missing route.
Host 1 will be able to ping the S0/0 interface of Router 2 because the network will be in the routing table of Router 1, being directly connected to Router 1. Directly
connected routes are automatically placed in the routing table. However, if you executed the show run command on Router 1, the output would indicate that no route to the exists:

interface Fa0/1
ip address
no shutdown
interface S0/0
ip address
no shutdown
The option router# ip route is incorrect because the ip route command should be configured in the global configuration mode.
The option router(config)# ip classless is incorrect because the ip classless global configuration mode command allows a router to accept and forward packets for
subnets that are not directly connected. The packets are forwarded to the best available supernet route.
The option router(config) # ip default gateway is incorrect because the ip default gateway command is used to define the default gateway
address when IP routing is disabled in the network.
Routing Fundamentals
Configure, verify, and troubleshoot IPv4 and IPv6 static routing
Cisco > Cisco ASDM User Guide, 6.1 > Configuring Dynamic And Static Routing > Field Information for Static Routes
Cisco > Support > IP > IP Routing > Design > Design TechNotes > Specifying a Next Hop IP Address for Static Routes > Document ID: 27082
Cisco > Cisco IOS IP Routing Protocols Command Reference > IP Routing Protocol-Independent Commands: A through R > ip route