12/11/2024
OUTLINE
• How to reach remote networks
• Configure standard Static Routes
Routing • Types of Static routes: Configuring Static Routes Types
• Troubleshoot Static and Default Route Issues
• Static routing Summary
• Difference between Static and Dynamic routing
By Dr.Eng. Ines DJOUELA
1 2
Static Routing Static Routing
How to reach remote networks Static route
A router can learn about remote networks in one of two ways: • A static route is created, maintained, and updated by a network
Manually - Remote networks are manually entered into the route table administrator, manually.
using static routes.
• A static route to every network must be configured on every router
Dynamically - Remote networks are automatically learned using a for full connectivity.
dynamic routing protocols (RIP, OSPF, EIGRP etc.).
3 4
1
12/11/2024
Configure IPv4 Static Routes
Static Routing
When to Use Static Routes ip route Command
Static routing has three primary uses: Next hop
Small networks:
Providing ease of routing table maintenance in smaller networks that are not
expected to grow significantly.
Default route:
Using a single default route to represent a path 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 beyond the next upstream router.
Routing to and from stub networks
A stub network is a network accessed by a single route, and the router has no other
neighbors (only one router). 5 6
Configure IPv4 Static Routes Configure IPv4 Static Routes
Next-Hop Options Configure a Next-Hop Static Route
The next hop can be identified by an IP address, exit interface, or both.
How the destination is specified creates one of the three following route types:
When only the next-hop IP address is specified Next-hop static route.
When only the router exit interface is specified Directly connected static
route.
When the next-hop IP address and exit interface are specified Fully
specified static route.
7 8
2
12/11/2024
Configure IPv4 Static Routes Configure IPv4 Static Routes
Configure a Next-Hop Static Route Configure Directly Connected Static Route
When configuring a static route, another
• In a next-hop static route, only the next-hop IP address is specified. option is to use the exit interface to specify
the next-hop address.
• The output interface is derived from the next hop.
• The router performs multiple lookups in the routing table before
forwarding a packet( a recursive lookup).
• Because recursive lookups consume router resources, they should be
avoided when possible.
9 10
Configure IPv4 Static Routes Configure IPv4 Static Routes
Configure Directly Connected Static Route Configure a Fully Specified Static Route
• Configuring a directly connected static route with an exit interface
allows the routing table to resolve the exit interface in a single search,
In a fully specified static route, both the output interface and the next-
instead of two searches. hop IP address are specified.
• Note: For point-to-point interfaces, you can use static routes that point This form of static route is used when the output interface is a multi-
to the exit interface or to the next-hop address. For access interface and it is necessary to explicitly identify the next hop.
multipoint/broadcast interfaces, it is more suitable to use static routes The next hop must be directly connected to the specified exit
that point to a next-hop address. interface.
11 12
3
12/11/2024
Configure IPv4 Static Routes
Configure IPv4 Static Routes
Configure a Fully Specified Static Route Verify a Static Route
Along with ping and traceroute, useful commands to verify static
routes include:
show ip route
show ip route static
show ip route network
13 14
Configure IPv4 Static Routes Types of Static Routes
Verify a Static Route Static Route Applications
Static Routes are often used to:
1. Standard static route - Connect to a specific network
2. Default Static Route - Provide a Gateway of Last Resort for a
network
3. Summarize static Route - Summarize routing table entries
4. Floating Static Route - Create a backup route in case a
primary route link fails
15 16
4
12/11/2024
Types of Static Routes
1- Standard Static Route Types of Static Routes
2- Default Static Route
Static route can be used to connect to a specific network ( like for example
a stub network)
Static route can be used to configure default route.
A default route identifies the gateway IP address to which the router sends all
IP packets that it does not have a learned or static route.
A default static route is simply a static route with 0.0.0.0/0 as the destination
IPv4 address a route that matches all packets.
Configuring a default static route creates a Gateway of Last Resort.
17 18
Types of Static Routes Configure IPv4 Default Routes
Default Static Route Default Static Route syntax
• Default static routes are used:
• When no other routes in the routing table match the packet destination IP
address.
• When a router has only one other router to which it is connected. This
condition is known as a stub router.
19 20
5
12/11/2024
Configure IPv4 Default Routes
Configure IPv4 Default Routes
Verify a Default Static Route
Configure a Default Static Route
Note the asterisk (*)next to the route with code ‘S’.
The asterisk indicates that this static route is a candidate default route, which is
21
selected as the Gateway of Last Resort. 22
Static Routing Types of Static Routes
Standard and Default Static route Scenario 3- Summary Static Route
23 24
6
12/11/2024
Types of Static Routes Configure IPv4 Summary Routes
Summary Static Route Summary Static Route Example
To reduce the number of routing table entries, multiple static routes
can be summarized into a single static route if:
• The destination networks are contiguous and can be summarized into
a single network address.
• The multiple static routes all use the same exit interface or next-hop
IP address.
25 26
Types of Static Routes
Types of Static Routes
Activity - Determine the Summary Network Address and Prefix 4- Floating Static Route
Floating static routes are static routes that are used to provide a backup path
to a primary static or dynamic route, in the event of a link failure.
The floating static route is only used when the primary route is not available.
In order to accomplish this, the floating static route is configured with a
higher administrative distance than the primary route.
27 28
7
12/11/2024
Types of Static Routes Configure Floating Static Routes
4- Floating Static Route Floating Static Routes
Administrative distance (AD) or route preference is a number of arbitrary unit
assigned to dynamic routes, static routes and directly-connected routes. The
value is used in routers to rank routes from most preferred (low AD value) to The administrative distance is increased to make the route less desirable
least preferred (high AD value). than that of another static route or a route learned through a dynamic routing
protocol.
In this way, the static route “floats” and is not used when the route with the
better administrative distance is active.
However, if the preferred route is lost, the floating static route can take over,
and traffic can be sent through this alternate route.
29 30
Configure Floating Static Routes Configure Floating Static Routes
Configure a Floating Static Route Test the Floating Static Route
Use a show ip route command to verify that the routing table is using
the default static route.
Use a traceroute command to follow the traffic flow out the primary
route.
Disconnect the primary link or shutdown the primary exit interface.
Use a show ip route command to verify that the routing table is using
the floating static route.
Use a traceroute command to follow the traffic flow out the backup
Default static route route.
Floating default static route
31 32
8
12/11/2024
Types of Static Routes
Troubleshoot IPv4 Static and Default Route Configuration
Activity - Identify the Type of Static Route
Troubleshoot a Missing Route
Common IOS troubleshooting commands include:
ping
traceroute
show ip route
show ip interface brief
show cdp neighbors detail
6.5.2.1
33 34
Summary Summary (continued)
Static routes can be configured with a next-hop IP address, which is A static route is only entered in the routing table if the next-hop IP address
commonly the IP address of the next-hop router. can be resolved through an exit interface.
When a next-hop IP address is used, the routing table process must resolve Whether the static route is configured with a next-hop IP address or exit
this address to an exit interface. interface, if the exit interface that is used to forward that packet is not in the
routing table, the static route is not included in the routing table.
On point-to-point serial links, it is usually more efficient to configure the static
route with an exit interface. In many cases, several static routes can be configured as a single
summary route.
On multi-access networks, such as Ethernet, both a next-hop IP address
and an exit interface can be configured on the static route. If there is not a more specific match in the routing table, the routing table
uses the default route to forward the packet to another router.
Static routes have a default administrative distance of "1".
A floating static route can be configured to back up a main link by
manipulating its administrative value.
35 36
9
12/11/2024
Static Routing
Static Routing
Why Use Static Routing? Why Use Static Routing? (continued)
Static routing has the following disadvantages:
Static routing provides some advantages over dynamic routing, Initial configuration and maintenance is time-consuming.
including:
Configuration is error-prone, especially in large networks.
Static routes are not advertised over the network, resulting in better
security. Administrator intervention is required to maintain changing route
information.
Routers not share static routes with each other, thus reducing
CPU/RAM overhead and saving bandwidth. Does not scale well with growing networks; maintenance becomes
cumbersome.
Requires complete knowledge of the whole network for proper
implementation.
37 38
Static vs Dynamic routing Static Routing
Activity - Identify the Advantages and Disadvantages of Static Routing
39 40
10
12/11/2024
What is Loopback interface in Cisco routers?
A loopback interface is a logical, virtual interface in a Cisco Router. It is not
a physical interface like Fast or Gigabit Ethernet interfaces.
A loop back interface is a software interface which can be used to emulate
a physical interface. By default, router doesn’t have any loopback interfaces
Bonus: Loopback (loopback interfaces are not enabled by default), but they can easily be
created.
Loopback interfaces are treated similar to physical interfaces in a router and
we can assign IP addresses to them.
The command syntax to create a loopback interface is shown below.
41 42
Why Use Loopback in Cisco routers? Why Use Loopback in Cisco routers?
IP reachability Routing protocols
The main feature of the Loopback interface is to stay always up.
There are several scenarios in which using a loopback interface is
needed or preferred
As the IGP and BGP relies on neighbours to form neighbour relationships,
The most popular reason is to ensure IP reachability to a host when multiple Loopback interfaces are preferred for router ID's, as they will not change,
interfaces with multiple pathways exist. even when the physical interface or the path between the neighbours fails.
IP reachability refers to the ability to reach the device using IP (to ping the In case of OSPF, Router-ID [with Loopback] are one of the parameters,
device). If a device is IP reachable, that means that the three lower layers of routers will check to form neighbours, as it can avoid loops too.
the OSI model (Physical, Data-link, and Network).
e.g. to Telnet or ssh on a router, at least one interface of the router must be
up. If it happens that all the physical interfaces are down, the loopback can
serve as the path to access the router (avoid path failure)
43 44
11
12/11/2024
Why Use Loopback in Cisco routers?
Testing purposes
Testing Purpose - Loopback can be used for testing purpose, when you Dynamic Routing
don’t have the option for checking beyond the router or cannot connect a
device and check when working remotely.
45 46
References
Cisco Networking Academy course
47 48
12