You are on page 1of 16

IP Static Routes

Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.


Foreword
 The implementation of routes within the IP routing table of a router can be
defined manually using static routes or through the use of dynamic routing
protocols. The manual configuration of routes enables direct control over t
he routing table, however may result in route failure should a router’s nex
t-hop fail. The configuration of static routes however is often used to comp
liment dynamic routing protocols to provide alternative routes in the event
dynamically discovered routes fail to provide a valid next-hop. Knowledge
of the various applications of static routes and configuration is necessary fo
r effective network administration.

age 2 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
 Upon completion of this section, you will be able to:
 Explain the different applications for static routes.
 Successfully configure static routes in the IP routing table.

age 3 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Application for Static Route

Static Route
Gateway

 Static routes define a means of path selection to other networks.

age 4 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Static Route Behavior

RTA RTB

192.168.1.0/24 192.168.2.0/24
.1 .2
10.0.12.0/24

RTA RTB

192.168.1.0/24 192.168.2.0/24
.1 .2
10.0.12.0/24

 The forwarding of packets based on a serial interface requires that the outb
ound interface be defined.

age 5 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Static Route Behavior
RTA

192.168.1.0/24

.1

.2 10.0.123.0/24 .3

192.168.2.0/24 192.168.3.0/24

RTB RTC

 The forwarding of packets over broadcast networks such as Ethernet, requir


es that the next-hop be defined.

age 6 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuring a Static Route

RTA RTB

S1/0/0 S1/0/0
192.168.1.0/24 192.168.2.0/24
.1 .2
10.0.12.0/24

[RTB]ip route-static 192.168.1.0 255.255.255.0 10.0.12.1


[RTB]ip route-static 192.168.1.0 255.255.255.0 Serial 1/0/0
[RTB]ip route-static 192.168.1.0 24 Serial 1/0/0

 A static route can be configured based on one of three variations.

age 7 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Static Route Load Balancing

RTA RTB

G0/0/0 10.0.12.0/24 G0/0/0


192.168.1.0/24 192.168.2.0/24
.1 .2
G0/0/1 20.0.12.0/24 G0/0/1

[RTB]ip route-static 192.168.1.0 255.255.255.0 10.0.12.1


[RTB]ip route-static 192.168.1.0 255.255.255.0 20.0.12.1

 Static routes support load balancing to the same destination where the cos
t of routes are equal.

age 8 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Verifying Static Route Load Balancing

[RTB]display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------
Routing Tables: Public Destinations : 13 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
……
192.168.1.0/24 Static 60 0 RD 10.0.12.1 GigabitEthernet 0/0/0
Static 60 0 RD 20.0.12.1 GigabitEthernet 0/0/1

age 9 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Floating Static Routes

RTA RTB

G0/0/0 10.0.12.0/24 G0/0/0


192.168.1.0/24 192.168.2.0/24
.1 .2
G0/0/1 20.0.12.0/24 G0/0/1

[RTB]ip route-static 192.168.1.0 255.255.255.0 10.0.12.1


[RTB]ip route-static 192.168.1.0 255.255.255.0 20.0.12.1
preference 100

 Floating static routes provide an alternative route in the event that the pri
mary static route fails.

age 10 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Floating Static Route Check

[RTB]display
[RTB]display ip
ip routing-table
routing-table
Route
Route Flags:
Flags: RR -- relay,
relay, DD -- download
download to
to fib
fib
--------------------------------------------------------------
--------------------------------------------------------------
Routing
Routing Tables:
Tables: Public
Public Destinations
Destinations :: 13
13 Routes
Routes :: 14
14
Destination/Mask
Destination/Mask Proto
Proto Pre
Pre Cost
Cost Flags
Flags NextHop
NextHop Interface
Interface
……
……
192.168.1.0/24
192.168.1.0/24 Static
Static 60
60 00 RD
RD 10.0.12.1
10.0.12.1 GigabitEthernet0/0/0
GigabitEthernet0/0/0

 Prior to the failure of the primary route, only the primary static route will b
e present within the routing table.

age 11 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Floating Static Route Check

[RTB]interface GigabitEthernet 0/0/0


[RTB-GigabitEthernet 0/0/0]shutdown
[RTB]display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------
Routing Tables: Public Destinations : 13 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
……
192.168.1.0/24 Static 100 0 RD 20.0.12.1 GigabitEthernet 0/0/1

 In disabling the primary route, the floating static route is then added to the
routing table.

age 12 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Default Static Routes

RTA RTB
192.168.1.0/24
G0/0/0 G0/0/0
.1 .2 192.168.2.0/24
10.0.12.0/24 192.168.3.0/24

[RTA]ip route-static 0.0.0.0 0.0.0.0 10.0.12.2

 Default routes provide a form of last resort route in the event that no other
longest match is found within the routing table.

age 13 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Default Static Route Check

[RTA]display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------
Routing Tables: Public Destinations : 13 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
……
0.0.0.0/0 Static 60 0 RD 10.0.12.2 GigabitEthernet0/0/0

age 14 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Summary
 What should be altered to enable a static route to become a floating static rout
e?
 Which network address should be defined to allow a default static route to be i
mplemented in the routing table?

age 15 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com

You might also like