Static Routing Summary and Answered Questions
Static Routing Summary and Answered Questions
1. A PC user opens a command prompt and uses the ipconfig command to see that the
The IP address and the mask of the PC are 192.168.4.77 and 255.255.255.224. The user then
Run a test with the command ping 192.168.4.117. Which of the following responses is the
more likely to happen?
The PC sends packets directly to the host with the address 192.168.4.117.
The PC sends an ARP looking for the MAC address of the DHCP server.
Mask
C. Subnet ID
e. Outgoing interface
3. Router 1 has a Fast Ethernet 0/0 interface with IP address 10.1.1.1. The interface is
connected to a switch. Then, this connection is migrated to use the 802.1Q trunk link.
Which of the following commands could be part of a valid configuration for the
router?
b. enable dot1q
C. enable dot1q 4
d. enable trunking
e. trunking enable 4
F. dot1q encapsulation 4
4. A layer 3 switch was configured to route IP packets between VLAN 1, 2 and
3, which are connected to the subnets 172.20.1.0/25, 172.20.2.0/25, and 172.20.3.0/25,
respectively. The engineer issues a command show ip route on the layer 3 switch, which
list connected routes. Which of the following answers lists a data that must be
in at least one of the routes?
C. VLAN Interface 2
d. Mask 255.255.255.0
5. An engineer configures a static IPv4 route on the router R1. Which of the following
a. Destination subnet ID
The routes for the subnet 10.1.1.0/24 appear in the output. Which of the following could be
right?
a. The ip route command has incorrect syntax and was rejected in mode.
configuration.
Static routes are configured with the ip route command from global configuration. The syntax
The basics of the command are shown below:
Parameter Description
Network address Destination network address of the remote network that will be added to the
routing table subnet-mask
Subnet mask of the remote network that will be added to the routing table.
It is usually used for connecting to a broadcast medium (Ethernet) and generally, to create a
recursive search. exit-int
The following parameters are required to configure static routing: network address:
destination network address of the remote network that is added to the routing table, also
called "prefix". subnet mask: subnet mask, or simply mask, of the network
remote that is added to the routing table. The subnet mask can be modified to
summarize a group of networks.
IP address: IP address of the connection router that will be used to forward the packet to
the remote destination network. It is often referred to as 'next hop'.
Exit-int: output interface that will be used to forward the packet to the next hop.
Summary of routes to reduce the size of the routing table
The creation of smaller routing tables makes the search process in the
the routing table is more efficient as there are fewer routes to search for. If possible
to use a static route instead of multiple static routes, the size of the table of
routing will be reduced. In many cases, a single static route can be used to
to represent dozens, hundreds or even thousands of routes.
We can use a single network address to represent multiple subnets. For example,
the networks 10.0.0.0/16, 10.1.0.0/16, 10.2.0.0/16, 10.3.0.0/16, 10.4.0.0/16, 10.5.0.0/16, up to
10.255.0.0/16 can be represented with a single network address: 10.0.0.0/8.
Summary of routes
The multiple static routes can be summarized into a single static route if:
The destination networks can be summarized into a single network address, and
All the multiple static routes use the same outgoing interface or IP address.
next jump.
In our example, R3 has three static routes. The three routes send traffic from the same
Serial0/0/1 interface. The three static routes of R3 are:
If possible, we would like to summarize all these routes into a single static route. 172.16.1.0/24,
172.16.2.0/24 and 172.16.3.0/24 can be summarized in the network 172.16.0.0/22. Because the three
routes use the same output interface, they can be summarized into the single network 172.16.0.0
255.255.252.0 and we can create a single summary route.
Calculation of a summary route
This is the process to create the summary route 172.16.1.0/22, as shown in the figure:
2. If you want to find the subnet mask for the summary, start with the bit that is
find more to the left.
4. When you find a column of bits that do not match, stop. You are at the
summary limit.
5. Now, count the number of bits that match and that are furthest to the left.
our example is 22. This number becomes its subnet mask for the route of
summary, /22 or 255.255.252.0
6. If you want to find the network address for the summary, copy the 22 matching bits and
add at the end all the necessary 0 bits until obtaining 32 bits.
If we follow these steps, we can discover that the three static routes of R3 can
summarize into a single static route using the summary network address 172.16.0.0
255.255.252.0
To implement the summary route, we must first remove the three static routes.
current:
R3(config)#no ip route 172.16.1.0 255.255.255.0 serial0/0/1
To verify the new static route, analyze the routing table of R3 with the command
show ip route, as shown:
With this summary route, the destination IP address of a packet must only match the
22 bits that are located furthest to the left of the network address 172.16.0.0. Any
packet with a destination IP address that belongs to the network 172.16.1.0/24, 172.16.2.0/24
The 172.16.3.0/24 matches this summary route.
As can be seen, we can test the reconfiguration using the ping command.
We verify that we still have the proper connectivity throughout the network.
Note: As of March 2007, there are more than 200,000 routes in the core routers.
Internet. Most of these routes are summary routes.
DEFAULT STATIC ROUTE
It is possible for the destination IP address of a packet to match multiple routes in the table.
of routing. For example, what would happen if we had the following two static routes
in the routing table?:
Note: This process applies to all routes in the routing table, including the routes
states, the routes learned from a routing protocol and the connected networks
directly.
The default static route matches all packets. A default static route is
a route that will match all packets. Default static routes are used in
the following cases:
When no other route in the routing table matches the destination IP address
from the package. In other words, when there is no more specific match. They are used
commonly when the company's edge router is connected to the ISP network.
When a router only connects to another router that it is connected to. This condition is known as
as a single connection router.
Configuration of a default static route
The syntax for a default static route is similar to any other static route, except
that the network address is 0.0.0.0 and the subnet mask is 0.0.0.0
The mask and network address 0.0.0.0 0.0.0.0 is called a 'quad-zero' route.
R1 is a single connection router. It is only connected to R2. Currently, R1 has three routes.
statues that are used to reach all the remote networks of our topology. The three
static routes on the Serial 0/0/0 interface output that sends packets to router R2
next jump. The three static routes of R1 are:
R1 is an ideal candidate for all its static routes to be replaced with a single route.
by default. First, delete the three static routes:
Next, configure the only default static route using the same Serial interface.
0/0/0 output of the three previous static routes:
R1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0
Check the change in the routing table with the command show ip route:
Notice the * or asterisk next to the S. As can be seen in the table of Codes in the figure,
The asterisk indicates that this static route is a default candidate route. This is why it ...
denominates route 'static by default'. The key for this configuration is the mask /0.
Previously, we said that the subnet mask of the routing table is the one that
determine how many bits must match between the destination IP address of the packet and the route
the routing table. A /0 mask indicates that no bits should match. Always and
when there is no more specific match, the default static route will match with
all the packages.
Default routes are very common in routers. Instead of storing routes for all
In Internet networks, routers can store a single default route that represents
to any network that is not in the routing table.