Top Banner
Ch. 6 – Routing Theory – Part 1 Ch. 6 – Routing Theory – Part 1 CCNA Semester 2 CCNA Semester 2 Originally by Rick Graziani, Instructor Was modified by Prof. Yousif
58
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Routing1

Ch. 6 – Routing Theory – Part 1Ch. 6 – Routing Theory – Part 1

CCNA Semester 2CCNA Semester 2Originally by Rick Graziani, Instructor

Was modified by Prof. Yousif

Page 2: Routing1

This Presentation Much of the information in this presentation be reinforced with

more detail and more examples when we discuss the additional presentations:– Ch.12 Routing Protocols– Additional Semester 2 Presentations

• The Routing Table Structure

• Discard Routes

– Static Routing – Additional Information Understanding the behavior and affect of routing protocols is the

difference between people who are “paper CCNAs” and those people who have the skills and knowledge that the CCNA exam is suppose to represent.

This presentation, like the others, is designed to help give you those knowledge and skills.

Page 3: Routing1

TopicsPart I. Routing Basics and Static Routing Basic Concepts:

– Network Layer

– IP Routing Table

– Path Determination

– Routed Protocols versus Routing Protocols

– Network Layer Protocol Operations

– Path Switching (Introduction)

– Multiprotocol Routing IP Routing Table and Directly Connected Networks Static Routing

– Configuring Static Routes

– Static Routing in the Real-world

– Default Static Routes

– Recursive Lookups

– Static Routes and the Routing Table Process

– Advantages and Disadvantages of Static Routing

Page 4: Routing1

Topics – (Continued)Part II. Routing Theory and Dynamic Routing Operations Dynamic Routing Operations

– Routing Metrics – Classes of Routing Protocols– Convergence

Distance Vector Routing Protocols – Distance Vector Concepts– Distance Vector Network Discovery– Simple Split Horizon (Introduction)– Distance Vector Network Discovery with Split Horizon– Network Discovery FAQs– Triggered Updates– Routing Loops– Count to Infinity– Defining a Maximum– Split Horizon– Split Horizon with Poison Reverse– Holddown Timers– TTL – IP’s Time-To-Live Field

Page 5: Routing1

Topics – (Continued)Part III. Routing Theory and Dynamic Routing Operations (continued) Link-State Routing Protocols

– Link-state Concepts– Link-state Routing Protocol History– Theory of Link-State Routing Protocols– Mathematical Point Of View– Link-state Concepts

1. Flooding of Link-State Information2. Building a Topological Database 3. Shortest-Path-First (Dijkstra’s) Algorithm 4. Shortest-Path-First Tree5. Routing Table

– Exercise: From Link-State Flooding to Routing Tables– Hello Messages and LSAs (Link-State Advertisements)– Topology Changes– Link-State Concerns– Problem: Link-State Updates – LSA Sequence Numbers– Comparing Distance Vector and Link State Routing Protocols – For Additional Information on Link State Routing

Page 6: Routing1

Topics – (Continued)Part III. Routing Theory and Dynamic Routing Operations (continued) Hybrid Routing Protocols

– Concepts– EIGRP (not IS-IS)

Path Switching– Example: Host X to Host Y (with three routers in between)– LAN-to-LAN Routing– LAN-to-WAN Routing

Cisco Router Configuration Summary Topics (Review)

Page 7: Routing1

TopicsPart I. Routing Basics and Static Routing Basic Concepts:

– Network Layer

– IP Routing Table

– Path Determination

– Routed Protocols versus Routing Protocols

– Network Layer Protocol Operations

– Path Switching (Introduction)

– Multiprotocol Routing IP Routing Table and Directly Connected Networks Static Routing

– Configuring Static Routes

– Static Routing in the Real-world

– Default Static Routes

– Recursive Lookups

– Static Routes and the Routing Table Process

– Advantages and Disadvantages of Static Routing

Page 8: Routing1

Part I

Routing Basics and Static Routes

Page 9: Routing1

Path determination, for traffic going through a network cloud, occurs at the network layer (Layer 3).

The path determination function enables a router to evaluate the available paths to a destination and to establish the preferred handling of a packet.

Page 10: Routing1

The network layer provides best-effort end-to-end packet delivery across interconnected networks.

The network layer uses the IP routing table to send packets from the source network to the destination network.

After the router determines which path to use, it proceeds with forwarding the packet.

It takes the packet that it accepted on one interface and forwards it to another interface or port that reflects the best path to the packet's destination.

Much more information later in the presentation on “The Routing Table Structure.”

Page 11: Routing1

A router generally relays a packet from one data link to another, using two basic functions:

1. a path determination function - Routing 2. a switching function – Packet Forwarding The path determination function enables the router to select the most

appropriate interface for forwarding a packet. The switching function allows a router to accept a packet on one

interface and forward it through a second interface. Much more information later in the presentation on “The Routing

Table.”

Page 12: Routing1

Very important points: Packet: IP Source and IP Destination (Network Layer) addresses do not

change. Data Link Source and Data Link Destination addresses do change to

reflect the current and next hop routers. The routing table (coming) contains the IP address of the next-hop router

– This address is used to find the Data Link Destination address which is used to encapsulate the original IP packet.

The router’s path determination function looks up the network address in the routing table and determines which interface it should exit.

The router’s switching function encapsulates it in the proper data link frame with the proper data link destination address.

Page 13: Routing1

When the router is connected to the segment where the final destination of the packet is, it determines the proper interface the same way as any other host using:– Packet: destination address– Router’s own: Interface address and subnet mask– AND operation – Determines which subnet it belongs to and which

interface it will encapsulate and forward out the frame. Much more later.

Page 14: Routing1

Routing Protocols Interior Gateway Protocols (IGPs): RIP, IGRP, EIGRP, OSPF,

IS-IS– IGRP and EIGRP are Cisco Proprietary

Exterior Gateway Protocols (EGPs): EGP, BGP

Page 15: Routing1

Routing Protocols: Much more later!IGPs – Interior Gateway Protocols RIP (Routing Information Protocol)

– Distance Vector IGRP (Interior Gateway Routing Protocol)

– Distance Vector– Cisco Proprietary

EIGRP (Enhanced Interior Gateway Routing Protocol)– Advanced Distance Vector or Hybrid– Cisco Proprietary

OSPF (Open Shortest Path First)– Link-state

IS-IS (Intermediate-System to Intermediate System)– Link-state

EGPs – Exterior Gateway Protocols EGP (Exterior Gateway Protocol)

– EGP – Path vector BGP (Border Gateway Protocol)

– EGP – Path vector

Page 16: Routing1

Autonomous System (AS) – Networks under the control of a single organization (within a single company).

IGP – Routing protocols used within an AS. EGP – Routing protocols used between AS’s

Page 17: Routing1

Typical Layer 3 Routing: Router only processes layers 1, 2, and 3, with the routing process using layer 3.

Router (Cisco IOS) does have upper-layer protocols so you can telnet into the router, etc., however layer 3 routing does not use the upper-layer protocols to make its routing decisions – only layer 3.

Page 18: Routing1

Once Again -Very important points: Packet: IP Source and IP Destination (Network Layer)

addresses do not change. Data Link Source and Data Link Destination addresses do

change to reflect the current and next hop routers. The routing table (coming) contains the IP address of the next-

hop router – This address is used to find the Data Link Destination address which is used to encapsulate the original IP packet.

We will look at Path Switching in detail at the end of this presentation!

Page 19: Routing1

Routers are capable of supporting multiple independent routing protocols and maintaining routing tables for several routed protocols.

This capability allows a router to deliver packets from several routed protocols over the same data links.

Note: Each routed protocol (IP, IPX, etc.), has its own routing table. There is only one routing table for each routed protocol (IP, IPX, etc.). Each routing table may use multiple routing protocols (RIP, IGRP, etc.) to build the single routing table. (Later)

RIP

IGRPStatic

Connected

Page 20: Routing1

TopicsPart I. Routing Basics and Static Routing Basic Concepts:

– Network Layer

– IP Routing Table

– Path Determination

– Routed Protocols versus Routing Protocols

– Network Layer Protocol Operations

– Path Switching (Introduction)

– Multiprotocol Routing IP Routing Table and Directly Connected Networks Static Routing

– Configuring Static Routes

– Static Routing in the Real-world

– Default Static Routes

– Recursive Lookups

– Static Routes and the Routing Table Process

– Advantages and Disadvantages of Static Routing

Page 21: Routing1
Page 22: Routing1

Important Routing Table Principles (Zinin, Cisco IP Routing) Every router makes its decision alone, based on the information

it has in its own routing table. The fact that one router has certain information in its routing

table does not mean that other routers have the same information.

Routing information about a path from one network to another does not provide routing information about the reverse, or return path.

Page 23: Routing1

The Routing Table prior to any interface configuration The command to view the IP Routing table is: (priviledge or user mode)

Router# show ip route

Currently, no routes in the routing table.

Directly Connected Networks and the IP Routing Table

RTA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

U - per-user static route, o - ODR

Gateway of last resort is not set

RTA#

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.0.0.0/8

s0 s0 s1s1e0 e0

Page 24: Routing1

Configuring an interface Adding an ip address/mask to an interface tells the router that it is a

member, “Directly Connected” to that network – just like when a host computer is configured with an ip address/mask.

Notice the route is shown with the subnet mask and the “exit-interface.” Don’t forget the “no shutdown” Don’t forget the interface must be in “up” and “up”

Directly Connected Networks and the IP Routing Table

RTA(config)#inter e 0

RTA(config-if)#ip add 192.168.2.1 255.255.255.0

RTA(config-if)#no shutdown

RTA#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 192.168.2.0/24 is directly connected, Ethernet0

RTA#

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.0.0.0/8

s0 s0 s1s1e0 e0

Page 25: Routing1

Viewing the Routing Table Process Use the “debug ip routing” command to view the Cisco IOS routing table

process of adding a directly connected network to the routing table. When finished, be sure to use “undebug all” Debug commands are used to view detailed information about Cisco IOS

processes – more later.

Directly Connected Networks and the IP Routing TableRTA# debug ip routing

RTA(config)#inter e 0

RTA(config-if)#ip add 192.168.2.1 255.255.255.0

RTA(config-if)#no shutdown

00:28:56: RT: add 192.168.2.0/24 via 0.0.0.0, connected metric [0/0]

00:28:56: RT: interface Ethernet0 added to routing table

RTA#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 192.168.2.0/24 is directly connected, Ethernet0

RTA# undebug all

Page 26: Routing1

Viewing the Routing Table Process Directly connected routes will also be removed if the link goes down. Directly connected routes will only be in the routing table if, it is not

administratively down, the line is “up” and protocol is “up” For serial interfaces, don’t forget the “clock rate” command on the

router with the DCE cable – neither interface will be “up” and “up” until both ends are configured correctly.

Directly Connected Networks and the IP Routing TableRTA# debug ip routing

RTA(config)#inter e 0

RTA(config-if)#shutdown

00:34:38: RT: interface Ethernet0 removed from routing table

00:34:38: RT: del 192.168.2.0 via 0.0.0.0, connected metric [0/0]

00:34:38: RT: delete network route to 192.168.2.0

RTA#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

RTA# undebug all

Page 27: Routing1

Directly Connected Networks and the IP Routing Table

RTA#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

RTB#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.1.0/24 is directly connected, Serial1

RTC#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 10.0.0.0/8 is directly connected, Ethernet0

C 192.168.1.0/24 is directly connected, Serial1

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.0.0.0/8

s0 s0 s1s1e0 e0

The Routing Tables Notice that the routers only know about their own directly connected

networks. They are not sharing routing information because we have not

configured any static routes or dynamic routing protocols.

Page 28: Routing1

Configuring an interface as part of a subnet We will discuss this in much more detail later using the presentation – “The

Routing Table.” For now, notice that when the subnet mask is not a classful mask, but a

subnetted /16 mask. The routing table information shows the route to the subnetted network The mask is shown in the above, “parent” classful network.

Directly Connected Networks and the IP Routing Table

RTC(config)#inter e 0

RTC(config-if)#ip add 10.1.0.1 255.255.0.0

RTC#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

10.0.0.0/16 is subnetted, 1 subnets

C 10.1.0.0 is directly connected, Ethernet0

C 192.168.1.0/24 is directly connected, Serial1

RTC#

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 29: Routing1

Routing – Only directly connected hosts (routers) Routers can only reach networks known about in its own routing table.

Directly Connected Networks and the IP Routing Table

RTA#show ip route

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

RTA#ping 172.16.0.1

Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms

RTA#ping 172.16.0.2

!!!!!

RTA#ping 192.168.1.1

.....

RTA#ping 192.168.1.2

.....

RTA#ping 10.1.0.1

.....

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 30: Routing1

Routing– Routing tables must have the necessary network routes Question: If RTA can ping RTB’s 172.16.0.2 interface why can’t it ping

RTB’s 192.168.1.1 interface? - RTA does not have a route to it in its routing table.

Question: Would an extended ping from RTA, using the source IP address of 192.168.2.1 be able to ping 172.16.0.1 on RTB? Why or why not? Where does the echo request or echo reply fail?

Directly Connected Networks and the IP Routing Table

RTA#show ip route

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

RTA#ping 172.16.0.1

Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms

RTA#ping 172.16.0.2

!!!!!

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 31: Routing1

Routing– Routing tables must have the necessary network routes Question: Would an extended ping from RTA, using the source IP address of

192.168.2.1 be able to ping 172.16.0.1 on RTB? Why or why not? The echo request from RTA reaches RTB because RTA has a route to

172.16.0.0/16 in its routing table. However, the echo reply from RTB back to RTA fails, because RTB does not

have a route for 192.168.2.0/24 in its routing table.

Directly Connected Networks and the IP Routing Table

RTA#show ip route

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

RTB#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.1.0/24 is directly connected, Serial1

RTA#ping

Protocol [ip]:

Target IP address: 172.16.0.2

Extended commands [n]: y

Source address or interface: 192.168.2.1

Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds:

.....

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 32: Routing1

Routing Table Principles Revisited (Zinin, Cisco IP Routing) Every router makes its decision alone, based on the information it has

in its own routing table. The fact that one router has certain information in its routing table does

not mean that other routers have the same information. Routing information about a path from one network to another does not

provide routing information about the reverse, or return path.

Directly Connected Networks and the IP Routing Table

RTA#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

RTB#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.1.0/24 is directly connected, Serial1

RTC#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

10.0.0.0/16 is subnetted, 1 subnets

C 10.1.0.0 is directly connected, Ethernet0

C 192.168.1.0/24 is directly connected, Serial1

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 33: Routing1

TopicsPart I. Routing Basics and Static Routing Basic Concepts:

– Network Layer

– IP Routing Table

– Path Determination

– Routed Protocols versus Routing Protocols

– Network Layer Protocol Operations

– Path Switching (Introduction)

– Multiprotocol Routing IP Routing Table and Directly Connected Networks Static Routing

– Configuring Static Routes

– Static Routing in the Real-world

– Default Static Routes

– Recursive Lookups

– Static Routes and the Routing Table Process

– Advantages and Disadvantages of Static Routing

Page 34: Routing1
Page 35: Routing1

Static Routes In this presentation we will look at how to configure static

routes.

Dynamic Routes In this presentation we will look at the concepts of dynamic

routing, but will discuss the configuration and more of the concepts in the Chapter 12 – Routing Protocols.

Page 36: Routing1

Current IP Routing Tables

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTA#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

RTB#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

C 172.16.0.0/16 is directly connected, Serial0

C 192.168.1.0/24 is directly connected, Serial1

RTC#show ip route

Codes: C - connected,.. <Other codes and gateway information omitted>

10.0.0.0/16 is subnetted, 1 subnets

C 10.1.0.0 is directly connected, Ethernet0

C 192.168.1.0/24 is directly connected, Serial1

Page 37: Routing1

Configuring Static RoutesRTR(config)# ip route prefix mask {address | interface} [distance] [tag tag] [permanent]

prefix IP route prefix for the destination. mask Prefix mask for the destination. address IP address of the “next hop” that can be

used to reach that network. interface Network interface to use (exit-interface) distance (Optional) An administrative distance. tag tag (Optional) Tag value that can be used as

a "match" value for controlling redistribution via route maps. (CCNP Advanced Routing)

Permanent (Optional) Specifies that the route will not be removed, even if the interface shuts down. (CCNP Advanced Routing)

Page 38: Routing1

Configuring static routes Routers do not need to configure static routes for their own

directly connected networks. We need to configure static routes for networks this router

needs to reach. We will need to configure static routes for the other routers as

well, as “routing information about a path from one network to another does not provide routing information about the reverse, or return path.”

Convergence – When all the routers in the network (AS) have accurate and consistent information, so that proper routing and packet forwarding can take place.

Convergence will not happen until all the routers have complete and accurate routing information, meaning we must configure static routes on all the routers before packets will be correctly delivered.

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 39: Routing1

Basic static route example Be sure to use the proper subnet mask!

Configuring Static Routes

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

RTA#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

S 192.168.1.0/24 [1/0] via 172.16.0.2

C 192.168.2.0/24 is directly connected, Ethernet0

Network/subnet routeIntermediate-Address (usually “next-hop”)

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 40: Routing1

Basic static route example (continued) [1/0] – [ Administrative Distance / Metric ] Administrative Distance – This is the “trustworthiness” of the routing

information. The default administrative distance of static routes is 1. The Administrative Distance of a directly connected route is 0. Lower the AD the more trustworthy. If the router learns about a route to a network from more than one

source, it will install the route with the lower administrative distance in the routing table. – More later.

Configuring Static Routes

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

RTA#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

S 192.168.1.0/24 [1/0] via 172.16.0.2

C 192.168.2.0/24 is directly connected, Ethernet0

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 41: Routing1

Basic static route example (continued) [1/0] – [ Administrative Distance / Metric ] Metric – This is the “cost” of getting to this route, I.e. how far away this

network is. The lower the cost, the closer the network. Static routes always show a cost of “0” even if it was configured with

the intermediate address is multiple-hops away. Much more later.

Configuring Static Routes

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

RTA#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

S 192.168.1.0/24 [1/0] via 172.16.0.2

C 192.168.2.0/24 is directly connected, Ethernet0

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Page 42: Routing1

Recursive Lookup The router knows it can get to 192.168.1.0/24 network by forwarding

the packets to the router at the ip address of 172.16.0.2 How does the router know how to get to the ip address 172.16.0.2? It does a recursive lookup – first (1) by looking up the 192.168.1.0/24

network and finding it needs to forward the packet to 172.16.0.2 – the router then (2) looks up the 172.16.0.0 network and sees it can forward it out the interface Serial 0.

Configuring Static Routes

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

RTA#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

S 192.168.1.0/24 [1/0] via 172.16.0.2

C 192.168.2.0/24 is directly connected, Ethernet0

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

1

2

Page 43: Routing1

Static Routes and the Routing Table Process Notice that the static route is entered into the routing table by the

routing table process (debug ip routing) with a metric of 0.

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTA#debug ip routing

IP routing debugging is on

RTA#conf t

Enter configuration commands, one per line. End with CNTL/Z.

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

05:53:48: RT: add 192.168.1.0/24 via 172.16.0.2, static metric [1/0]

RTA(config)#ip route 10.1.0.0 255.255.0.0 172.16.0.2

05:54:38: RT: add 10.1.0.0/16 via 172.16.0.2, static metric [1/0]

RTA(config)#undebug all

Page 44: Routing1

Configuring all of the static routes Notice that the intermediate-address is always the next-hop ip address. This does not always have to be the case, and we will look at other

options in the presentation on Static Routes- Additional Information Good idea to do a “copy running-config startup-config” if everything is

working right. To verify the routes are in there, you can do a:

Router# show running-config

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

RTA(config)#ip route 10.1.0.0 255.255.0.0 172.16.0.2

RTB(config)#ip route 192.168.2.0 255.255.255.0 172.16.0.1

RTB(config)#ip route 10.1.0.0 255.255.0.0 192.168.1.2

RTC(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.1

RTC(config)#ip route 172.16.0.0 255.255.0.0 192.168.1.1

Page 45: Routing1

Examining RouterA Notice the 10.0.0.0 parent – classful information Again, we will look at why in the presentation on The Routing Table.

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2

RTA(config)#ip route 10.1.0.0 255.255.0.0 172.16.0.2

RTA#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

10.0.0.0/16 is subnetted, 1 subnets

S 10.1.0.0 [1/0] via 172.16.0.2

S 192.168.1.0/24 [1/0] via 172.16.0.2

C 192.168.2.0/24 is directly connected, Ethernet0

RTA#ping 10.1.0.1

!!!!!

RTA#ping 192.168.1.2

!!!!!

RTA#ping 192.168.1.1

!!!!!

Page 46: Routing1

Examining RouterB

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTB(config)#ip route 192.168.2.0 255.255.255.0 172.16.0.1

RTB(config)#ip route 10.1.0.0 255.255.0.0 192.168.1.2

RTB#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

10.0.0.0/16 is subnetted, 1 subnets

S 10.1.0.0 [1/0] via 192.168.1.2

C 192.168.1.0/24 is directly connected, Serial1

S 192.168.2.0/24 [1/0] via 172.16.0.1

RTB#ping 192.168.2.1

!!!!!

RTB#ping 10.1.0.1

!!!!!

Page 47: Routing1

Examining RouterC

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTC(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.1

RTC(config)#ip route 172.16.0.0 255.255.0.0 192.168.1.1

RTC#show ip route

Codes: C - connected, S - static,

S 172.16.0.0/16 [1/0] via 192.168.1.1

10.0.0.0/16 is subnetted, 1 subnets

C 10.1.0.0 is directly connected, Ethernet0

C 192.168.1.0/24 is directly connected, Serial1

S 192.168.2.0/24 [1/0] via 192.168.1.1

RTC#ping 192.168.1.1

!!!!!

RTC#ping 172.16.0.1

!!!!!

Page 48: Routing1

Not to beat this into the ground but… It is important to realize that the pings are successful only because we

have properly configured static routes on all three routers. If one of the routers did not have a static route properly sending the

packet to the destination (echo request) or sending the packet back to the source (echo reply), our pings would not have been successful.

Later, in the presentation Static Routes – Additional Information, we will look at more complex examples of using static routes.

Important Routing Table Principles (Zinin, Cisco IP Routing) Every router makes its decision alone, based on the information it has

in its own routing table. The fact that one router has certain information in its routing table does

not mean that other routers have the same information. Routing information about a path from one network to another does not

provide routing information about the reverse, or return path.

172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

Configuring Static Routes

Page 49: Routing1

Advantages and Disadvantages of Static Routing

Advantages Low processor

overhead No bandwidth

utilization– Secure operation

don’t inadvertently advertise networking information to an untrusted source

Predictability (precise control)

Disadvantages High-maintenance

configuration No adaptability

(except for floating static routes)

Page 50: Routing1

Another Option for configuring static routes Another option for configuring a static route is to specify the exit interface

instead (or with) the intermediate (next-hop) address. In the presentation, Static Routes – Additional Information, we will examine

the pro’s and the con’s of both, and their affects on the routing table. Here is a quick rule-of-thumb which we will examine more closely later: Configure static routes that are via non-point-to-point networks (Ethernet) with

both the interface and the intermediate address.  Static routes via point-to-point networks need only the exit interface, as the next-hop address is never looked at. In both cases, this will speed-up the route-lookup process.

For now, either method will work just fine!

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTA(config)#ip route 192.168.1.0 255.255.255.0 serial 0

RTA(config)#ip route 10.1.0.0 255.255.0.0 serial 0

RTB(config)#ip route 192.168.2.0 255.255.255.0 serial 0

RTB(config)#ip route 10.1.0.0 255.255.0.0 serial 1

RTC(config)#ip route 192.168.2.0 255.255.255.0 serial 1

RTC(config)#ip route 172.16.0.0 255.255.0.0 serial 1

Page 51: Routing1

Another Option for configuring static routes (continued) The routing table looks a little different. Even though this static route shows, “is directly connected,” this is not a directly

connected network, like 192.168.2.0/24. Note: Static routes on point-to-point networks, configured with the exit-interface

do allow faster routing table lookups, because there is no need to do a recursive lookup to find the route for the intermediate address and the exit interface. (See previous Recursive Lookup slide – more later, not important now.)

Configuring Static Routes172.16.0.0/16 192.168.1.0/24

.1 .1.2 .2

RTA RTB RTC192.168.2.0/24

.1 .1

10.1.0.0/16

s0 s0 s1s1e0 e0

RTA(config)#ip route 192.168.1.0 255.255.255.0 serial 0

RTA(config)#ip route 10.1.0.0 255.255.0.0 serial 0

RTA#show ip route

Codes: C - connected, S - static,

C 172.16.0.0/16 is directly connected, Serial0

10.0.0.0/16 is subnetted, 1 subnets

S 10.1.0.0 is directly connected, Serial0

S 192.168.1.0/24 is directly connected, Serial0

C 192.168.2.0/24 is directly connected, Ethernet0

Page 52: Routing1

Static routes in the real-world Soon we will learn about dynamic routing protocols (RIP, etc.),

where routers can learn automatically about networks, without the manual configuration of static routes.

Does this mean that static routes are never used in the real-world? No! Static routes are used in conjunction with dynamic routing

protocols. It is common to use a static route where using a dynamic routing

protocols would have disadvantages or where it just not needed.

Page 53: Routing1

Static routes in the real-world (continued) In the example above, there is only one route, link, between VCC’s

network and the ISP. When there is only a single route to a network, this is known as a stub

network. It is very common for the ISP to have a static route pointing to it’s

customers’ networks, in this case VCC College.

Cabrillo College

ISP

10.1.1.2/24

10.1.1.1/24

172.16.0.0/16

ip route 172.16.0.0 255.255.0.0 10.1.1.2

Page 54: Routing1

Static routes in the real-world (continued) What about VCC College and sending packets to the ISP – packets

going to the Internet? It is also common for customer networks to use a special kind of static

route, known as a default static route. Of course we will examine this later throughout the rest of this course,

but for now we specify the network and mask as “0.0.0.0 0.0.0.0” (pronounced “quad-zero”).

This tells the router to forward all packets to this next-hop address (or exit interface) that do not have an explicit route in the routing table.

Cabrillo College

ISP

10.1.1.2/24

10.1.1.1/24

172.16.0.0/16

ip route 172.16.0.0 255.255.0.0 10.1.1.2

ip route 0.0.0.0 0.0.0.0 10.1.1.1

Default

Page 55: Routing1

Static routes in the real-world (continued) Any packets not matching the routes 172.16.0.0/16 or 10.1.1.0/24 are

sent to the router 10.1.1.1 – where it is now their “problem.”

VCC College

ISP

10.1.1.2/24

10.1.1.1/24

172.16.0.0/16

ip route 172.16.0.0 255.255.0.0 10.1.1.2

ip route 0.0.0.0 0.0.0.0 10.1.1.1

RTB#show ip route

Gateway of last resort is 10.1.1.1 to network 0.0.0.0

C 172.16.0.0/16 is directly connected, Ethernet0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial1

S* 0.0.0.0/0 [1/0] via 10.1.1.1

Default

Page 56: Routing1

ip default-network command The curriculum shows another command:

ip default-network We will look at this command after we have discussed dynamic routing

protocols, specifically IGRP. Note: This command is used when needing to propagate a default

route with the IGRP or EIGRP routing protocols. It is not commonly used with static routes, RIP, or OSPF.

Page 57: Routing1

Static routes do not lend themselves well to topology changes, and by themselves will not adjust to network changes (new network, down network, change in network characteristics – I.e. link bandwidth).

Although, backup static routes can be configured (later), it is better to use a dynamic routing protocol which can automatically detect and adjust to changes in the network topology.

In many cases with complex network topologies, static routes and backup-static routes, can not provide complete redundancy and backup, and can even lead to routing loops. – Later when in the presentation Static Routes – Additional Information.

Page 58: Routing1

Static Routes - Additional Information

For additional information on Static routing – see the presentation Static Routes – Additional Information, including:

Exit-interface versus intermediate-addresses The Static Routing Table Maintenance process Static routes and using different Administrative

Distances Static routes in complex networks Floating static routes