Which of the following is the correct command to define…

Which of the following is the correct command to define a default route using a gateway address of
172.16.0.254?

Which of the following is the correct command to define a default route using a gateway address of
172.16.0.254?

A.
ip default-route 172.16.0.254 255.255.0.0

B.
ip route 0.0.0.0 0.0.0.0 172.16.0.254

C.
default-gateway 172.16.0.254

D.
ip route default 172.16.0.254

Explanation:
The ip route command is used to manually define a static route to a destination network. The syntax of the
command is as follows:
ip route [destination_network] [mask] [next-hop_address or exit interface] [administrative_distance]
[permanent]
The attributes 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): States the administrative distance. Static routes have an AD of 1, which can
be changed to change the priority of the route.
Creating a default route is accomplished by substituting 0.0.0.0 for both the [destination_network] and [mask]
fields, yielding the following command to create a default route through host 172.16.0.254:
router(config)# ip route 0.0.0.0 0.0.0.0 172.16.0.254
Any route configured manually is considered a static route. Another example of a command that creates a nondefault route is shown below:
router(config)# ip route 192.168.12.0 255.255.255.0 172.65.3.1
This command would instruct the router on which the command was executed to send any traffic for the
192.168.12.0/24 network to the router located at 172.65.3.1.
You can also affect the route by changing the administrative distance of the route. By default, all static routes
have an AD of 1, making them preferable to routes learned from routing protocols. However, you can add the
AD parameter at the end of the command as shown below, making the static route less desirable than one
learned from a routing protocol such as RIP:
router(config)# ip route 192.168.12.0 255.255.255.0 172.65.3.1 150
One reason to configure the routes this way could be to make the static route a backup route to the route
learned by RIP, such as when the static route is a less desirable route through a distant office.
Once the ip route command has been used to add either a static route or a static default route to a router, the
routes should appear in the routing table. They will be indicated with an S next to a static route and an S* for a
default static route. The first two examples from the explanation above would appear in the routing table as
follows:
S*0.0.0.0/0 [1/0] via 172.16.0.254
S 192.168.12.0/24 [1/0] via 172.65.3.1
The ip default-route, default-gateway, and ip route default commands are incorrect because they are not valid
Cisco IOS commands.
Objective:
Routing Fundamentals
Sub-Objective:
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



Leave a Reply 0

Your email address will not be published. Required fields are marked *