You are on page 1of 16

IP Static Routes

HUAWEI TECHNOLOGIES CO., LTD.


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 the routing table, however may result in route failure should a
router’s next hop fail. The configuration of static routes however is often
used to compliment 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 for effective network administration.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 2
Objectives

Upon completion of this section, trainees will be able to:


 Explain the different applications for static routes.

 Successfully configure static routes in the IP routing table.

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

Static Route
Gateway

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

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 4
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 outbound interface be defined.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 5
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, requires that the next hop be defined.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 6
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.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 7
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 cost of routes are equal.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 8
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

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 9
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 primary static route fails.

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

[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 GigabitEthernet0/0/0

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

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 11
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.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 12
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.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 13
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

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 14
Summary

 What should be altered to enable a static route to become a floating


static route?

 Which network address should be defined to allow a default static


route to be implemented in the routing table?

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 15
Thank you
www.huawei.com

You might also like