Вы находитесь на странице: 1из 11

Journal chapter 6: Static routing

Static Routing 6.1 Introduction


Routing is fundamental to any data network as it transfers data across an
internetwork from source to destination. Routers are devices that are
responsible for transferring packets from one network to the next.
Routers discover remote networks dynamically by routing protocols,
manually, or through static routes. In many cases, routers use a combination of
dynamic routing protocols and static routes. This chapter discusses static
routing.
Static routes are very common and do not require the same amount of
processing overhead and dynamic routing protocols.
In this chapter, sample topologies will be used to configure IPv4 and IPv6
static routes and present problem solving techniques. Throughout the process,
several important IOS commands and the results generated will be analyzed.
an introduction to the routing table with directly connected networks and static
routes will be included.

6.2.1 Implementation of static routing Static Routing


A router can discover remote networks in two ways:
Manually: remote networks are entered manually in the routing table via
static routes.
Dynamically: remote routes are discovered automatically using a dynamic
routing protocol.
A network administrator can configure a static route manually to reach a
specific network. Unlike a dynamic routing protocol, static routes are not
updated automatically and must be reconfigured manually each time you
change the topology of the network. A static route will not change until the
administrator reconfigures manually.

Static routing provides some advantages over dynamic routing, for example:
Static routes are not advertised through the network, which increases
safety.
Static routes use less bandwidth than dynamic routing protocols. no CPU
cycle is not used to calculate and communicate routes.
The route that uses a static route to send data is known.
The static routing has the following disadvantages:
Initial setup and maintenance are prolonged.
The configuration is prone to errors, especially in large networks.
administrator intervention is required to maintain changing route
information.
not well suited to growing networks; maintenance becomes increasingly
complicated.
Requires a thorough knowledge of the entire network for proper
implementation.
Static routes are useful for smaller networks with only one path to an outside
network. They also provide a larger security for certain types of traffic or links
to other networks that need more control network. It is important to
understand that the static routing and dynamic routing are not mutually
exclusive. However, most networks use a combination of dynamic routing
protocols and static routes. This can cause the router has multiple paths to a
destination network through static routes and dynamic routes discovered.
However, the administrative distance (AD) is a static route 1. Therefore, a
static route will take precedence over all dynamically discovered routes.
The static routing has three main uses:
Facilitate the maintenance of the routing table into smaller networks which
are not expected to grow significantly.
Provides routing to internal networks and from these routes. A network of
domestic routes is one to which is accessed through a single route one whose
router has only one neighbor.

Use a single default route to represent a route to any network that does not
have a more specific match with another route in the routing table. Default
routes are used to send traffic to any destination that is beyond the next
upstream router.
Types of static routes
Static routes are often used most often to connect to a specific network or to
provide a gateway of last resort for a network of domestic routes. Also they
are used for the following:
Reduce the number of routes announced by summarizing several
contiguous networks as a single static route.
Create a backup path if a link fails the main route.
The following types of IPv4 and IPv6 static routes will be analyzed:
standard static route
static default route
Static route Summary
floating static route
IPv4 and IPv6 support configuring static routes. Static routes are useful to
connect to a specific remote network

A static default route is one that matches all packets. A default route identifies
the gateway IP address to which the router sends all IP packets for which no
route has discovered or static. A static default route is simply a static route
with 0.0.0.0/0 as IPv4 destination address. When configuring a static default
route, a gateway of last resort is created.
Note: All paths that identify a specific destination with a larger subnet mask
override the default path.
Default static routes are used in the following cases:
When no other route to the routing table matches the packet's destination IP
address. In other words, when there is no more specific match. They are

commonly used when a peripheral router from one company to the ISP
network is connected.
When a router has another single router to which it is connected. This
condition is known as a stub router

Another type of floating static route is a static route. Floating static routes are
static routes that are used to provide a backup path to a static main dynamic, in
the case of a link failure or route. The floating static route is used only when
the main route is unavailable.
To achieve this, the floating static route is configured with a greater
administrative distance than the main route. Remember that the administrative
distance represents the reliability of a route. If there are multiple routes to the
destination, the router will choose to have a lower administrative distance.
For example, suppose an administrator wants to create a floating static route
as a backup route discovered by EIGRP. The floating static route must be
configured with more than EIGRP administrative distance. EIGRP has an
administrative distance of 90. If the floating static route is configured with an
administrative distance of 95, the dynamic route discovered by EIGRP to the
floating static route is preferred. If the route discovered by EIGRP instead the
floating static route is used is lost.
Configuring static routes and default routes 6.3.1 Configuring Static IPv4
Static routes are configured with the ip route global configuration command.
The command syntax is as follows:
Router (config) # ip network routedireccin-mask-Subnet {ip-address |
nmerointerfaz-type interface [ip-address]} [distance] [name name]
[permanent] [tag tag]
The following parameters are required to configure static routing:
-network address: network address of the remote network destination that is
added to the routing table, also called a "prefix".
mask-subnet: subnet mask, or simply mask of the remote network that is
added to the routing table. The subnet mask can be modified to summarize a
group of networks.

In addition, you must use one of the following parameters or both:


ip-address: IP address of the router connection to be used to forward the
packet to the destination network remotely. It is often called the "next hop".
-output interface: output interface to be used to forward the packet to the
next hop.
In a static route next hop, only the IP address of the next hop specified. The
output interface is derived from the next hop.
Before a router forwards a packet, the process of the routing table to determine
which output interface used to forward the packet. This is known as route
resolution. The resolution process of the route varies depending on the type of
forwarding mechanism used by the router. CEF (Cisco Express Forwarding) is
the default on most platforms running IOS 12.0 or later behavior.

fully specified static route


A fully specified static route has determined both the output interface as the
next hop IP address. This is another type of static route that is used in older
versions of IOS before CEF. This form of static route is used when the output
interface is a multi-access interface and must be explicitly identified the next
hop. The next hop must be connected directly to the specified output interface.
Suppose the network link between R1 and R2 is an Ethernet link and the
GigabitEthernet 0/1 interface R1 is connected to the network.
However, this can cause inconsistent or unexpected results. The difference
between an Ethernet multiaccess network and a serial point-to-point network
is that the latter only has a device on the network, the router is on the other
end of the link. With Ethernet networks, there may be many different devices
sharing the same multi-access network, including hosts and even multiple
routers. The designation of the Ethernet interface from the static route alone
router does not provide enough information to determine which device is the
device the next hop.
Depending on the topology and configurations of other routers, this static
route may or may not work. When the output interface is an Ethernet network,

it is recommended to use a fully specified static route that includes the


outgoing interface and next-hop address.

Setting default IPv4 routes


A default route is a static route that matches all packets. Instead of storing all
routes to all networks in the routing table, a router can store a single default
route that represents any network that is not in the routing table.
The routers often use default routes configured locally or discovered by
another router, using a dynamic routing protocol. A default route is used when
no other route to the routing table matches the IP destination address of the
packet. That is, if there is no more specific match, then the default path as the
gateway of last resort is used.
In general, default static routes are used to connect:
A perimeter network router to a service provider
A stub router (the one with only one neighbor router ascending)
Configuring Static Routes IPv6
IPv6 static routes are configured with the command ipv6 route global
configuration. In Figure 1, a simplified version of the syntax of the command:
Router (config) # ipv6 route ipv6-prefix / prefix-length-ipv6 address {|
interface-output}
Most parameters are identical to the IPv4 version of the command. IPv6 static
routes can also be implemented as:
standard IPv6 static route
default IPv6 static route
IPv6 Static Route summary
floating static route IPv6
As with IPv4, these routes can be configured as recursive, connected directly
or fully specified.

The global configuration command ipv6 unicast-routing must be configured to


enable the router to forward IPv6 packets.

A fully specified static route has determined both the output interface as the
next hop IPv6 address. Similar to the fully specified static routes that are used
with IPv4 mode, this would be used if CEF was not enabled on the router and
the output interface was on a multi-access network. With CEF, a static route
that uses only IPv6 next hop address would be the preferred even when the
output interface is a multi-access network method.
Unlike IPv4, IPv6 is a situation that occurs when you should use a fully
specified static route. If the static route IPv6 uses an IPv6 link-local address as
the next hop address, a fully specified static route must be used that includes
the output interface

The reason why you should use a fully specified static route is that IPv6 linklocal addresses are not included in the IPv6 routing table. The link-local
addresses are only unique in a given network or link. The link-local address of
the next hop can be a valid address in several networks connected to the
router. Therefore, it is necessary that the output interface is included.

Configuring IPv6 default routes


A default route is a static route that matches all packets. Instead of storing
routes for all networks on the Internet, routers can store a single default route
that represents any network that is not in the routing table.

The routers often use default routes configured locally or discovered by


another router, using a dynamic routing protocol. They are used when no other
route matches the IP destination address of the packet in the routing table.
That is, if there is no more specific match, then the default path as the gateway
of last resort is used.
In general, default static routes are used to connect:

The perimeter router from one company to the network of a service


provider.
A router with only one upstream neighbor router. The router has no other
neighbors and therefore is called "stub router".
CIDR and VLSM Review 6.4.1 Addressing classy
Launched in 1981, RFC 790 and RFC 791 describe how initially assigned
IPv4 network addresses according to a classification system. In the original
IPv4 specification, the authors established classes to provide three different
sizes of networks for large, medium and small organizations. Therefore, they
address Class A, B and C with a specific format for high-order bits defined.
The high order bits are the bits in the leftmost 32-bit address.
CIDR
Just as the Internet was growing at an exponential rate in the early nineties, the
size of the routing tables of Internet routers also kept growing under the IP
address classy. For this reason, the IETF introduced in RFC 1517 CIDR in
1993.
The CIDR replaced assignments and class network address classes (A, B, C)
became obsolete. With CIDR, the value of the first octet no longer determines
the network address. Instead, the network portion of the address is determined
by the subnet mask, also known as "network prefix" or "prefix length" (ie, /
8, / 19, etc.).
ISPs are no longer limited to a subnet mask of / 8, / 16 or / 24. Now you can
assign address space more effectively by using any prefix length beginning
with / 8 and higher values (ie, / 8, / 9, / 10, etc.).
CIDR also reduces the size of routing tables and manages the IPv4 address
space more effectively by:
route summarization: also known as "aggregation prefix". The routes are
summarized in a single path to help reduce the size of routing tables. For
example, a static route summary can replace multiple instructions specific
static routes.
Creating superlattices: occurs when the mask route summarization is less
than the traditional default class mask value.

VLSM
With the subnet mask fixed length (FLSM), the same number of addresses is
assigned to each subnet. If all subnets have the same requirements as to the
number of hosts, these address blocks fixed size would suffice. However, this
is not what usually happens.

While traditional division subnets satisfy the needs of the larger LAN and
divides the address space into a suitable number of subnets, results in a
significant waste of unused addresses.
For example, only two addresses are needed on each subnet for the three WAN
links. Since each subnet has 30 addresses usable, there are 28 unused
addresses in each of these subnetworks.
Applying a scheme of division in traditional subnets to this situation is not
very efficient and generates waste. In fact, this is a successful example to
show how subnetting a subnet can be used to maximize the use of the
management model. The subdivision of subnetworks, or using a subnet mask
of variable length (VLSM), was designed to prevent wasted addresses.

Setting short routes and floating static routes summary 6.5.1 Configuring IPv4
Route summarization, also known as "route aggregation" is the process of
advertising a set of contiguous addresses as a single address with a mask
shorter and less specific subnet. CIDR is a form of route summarization and is
synonymous with the term "Supernetting".
CIDR ignores the classy boundary restriction and allows summarization with
smaller than the default class mask masks. This type of summarization helps
reduce the number of entries in the routing updates and lowers the number of
entries in local routing tables. Also reduces the use of bandwidth for routing
updates and speeds up searches in the routing tables.

IPv6 configuration summary routes

Apart from the fact that IPv6 addresses are 128 bits long and are written in
hexadecimal, the summary of IPv6 addresses is very similar to the summary
of IPv4 addresses. Only it requires a few more steps because IPv6 addresses
abbreviated and the hexadecimal conversion.
Several IPv6 static routes can be summarized in a single static route if IPv6:
The destination networks are contiguous and can be summarized in a single
network address.
All static routes use the same exit interface or next-hop IPv6 address.
Configuring floating static routes
Floating static routes are static routes that have an administrative distance
greater than another static route or dynamic routes. They are very useful for
providing a backup to a primary link, as shown in the illustration.
By default, static routes have an administrative distance of 1, which makes
them preferable to routes discovered by dynamic routing protocols. For
example, some administrative distances protocols common dynamic routing
are:
EIGRP = 90
IGRP = 100
OSPF = 110
IS-IS = 115
RIP = 120
The administrative distance of a static route can be increased to make the
route less desirable than the path of another static route or route discovered by
a dynamic routing protocol. Thus, the static route "floats" and is not used
when active route with the best administrative distance. However, if the
preferred route is lost, the floating static route can take over, and you can send
traffic through this alternative route.

A floating static route can be used to provide a backup path to multiple


interfaces or networks on a router. It is also independent of encapsulation,
which means that can be used to forward packets from any interface,
regardless of the type of encapsulation.
It is important to note that the convergence time affects a floating static route.
A route that loses and reestablishes a connection continuously can make the
backup interface is unnecessarily activated.

Вам также может понравиться