Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 20

Routing and Routing Protocols - Introduction

What is Routing?

To route, a router needs to do the following:


• Know the destination address
• Identify the sources it can learn from
• Discover possible routes
• Select the best route
• Maintain and verify routing information
What is Routing? (Cont)

• Routers must learn destinations that are not directly


connected.
Directly Connected Networks
and the IP Routing Table
192.168.2.0/24 10.0.0.0/8
RTA 172.16.0.0/16 RTB 192.168.1.0/24 .1 RTC
e0 s1 e0
s0 s0

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#

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

192.168.2.0/24 10.0.0.0/8
RTA 172.16.0.0/16RTB 192.168.1.0/24 RTC
e0 s0 s0 s1 e0

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
#

Adding an ipaddress/mask to an interface tells the router that it is a mem


ber, “Directly Connected" to that network – just like when a host comput
er 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

192.168.2.0 172.16.0.0/16 192.168.1.0/24 10.0.0.0/


/24 RTA RTB RTC 8
e0 s0 s0 s1
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>
C 10.0.0.0/8 is directly connected, Ethernet0
C 192.168.1.0/24 is directly connected, Serial1
Directly Connected Networks and the IP Routing Table

192.168.2.0 172.16.0.0/16 192.168.1.0/24 10.1.0.0/


/24 RTA RTB RTC 16
e0 s0 s0 s1
e0
.1 .1 .1 .1 .2 .2

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
!!!!!
RTA#ping 172.16.0.2
!!!!!
RTA#ping 192.168.1.1
.....
Question: If RTA can ping
RTA#ping 192.168.1.2
RTB’s 172.16.0.2 interface why
.....
can’t it ping RTB’s 192.168.1.1
RTA#ping 10.1.0.1
interface?
.....

Answer: Routers can only reach networks known about in its own
routing table.
Routing and Routing Protocols Stati
c Routing
Routing Types
Static Route Operation

Hoboken#show ip route
Codes: C - connected, S - static,
S 172.16.1.0/24 [1/0] is directly connected, Serial0
C 192.168.2.0/24 is directly connected, Ethernet0
ip route command
RTR(config)# ip route prefix mask{address|
interface} [distance]
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.
Static Route Operation

• If the exit interface (gateway) is “down” the static route will


not be put in the routing table.
Common uses for Static Routes

•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.
Static Routes

Configured unidirectional static routes to and from a


stub network to allow communications to occur.
Static Route Example

This is a unidirectional route. You must have a route


configured in the opposite direction.
With point-to-point serial links, you can also configure the
outgoing interface instead of the next-hop IP address.
Default Routes
This route allows the stub network to reach all known networks
beyond router A.

RTB#show iproute
Gateway of last resort is 172.16.2.2 to network 0.0.0.0
172.16.0.0/16 is subnetted, 1 subnets
C 172.16.1.0/24 is directly connected, Ethernet0
C 172.16.2.0/24 is directly connected, Serial1
S* 0.0.0.0/0 [1/0] via 172.16.2.2
An Example of static routes
Host 1

172.16.1.0/2
4
Baypointe Hub
.1 E0

Let’s configure three static S anJose1


S0
.2

routes on Baypointe using S1


172.16.2.0/2 192.168.1.0/2
either an intermediate- 4 4

address or exit interface:


.1 .1
S0
S0
SanJose2 Baypointe
.1 E0
E0 .1

172.16.3.0/2 192.168.2.0/2
Hub 4 4 Hub

Baypointe(config)# ip route 172.16.1.0 255.255.255.0


Host 2 Host 3
192.168.1.2
Baypointe(config)# ip route 172.16.2.0 255.255.255.0 192.168.1.2
Baypointe(config)# ip route 172.16.3.0 255.255.255.0 192.168.1.2
An Example of static routes

Let’s configure static routes to R1 can reach


network 3.3.3.3/32 of R3
Verify static routes
Ping and Traceroute
to troubleshoot

You might also like