0% found this document useful (0 votes)
25 views49 pages

PPT - Routing Estático

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views49 pages

PPT - Routing Estático

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

¿Qué hace R1 con el paquete enviado desde la PC1 hacia la PC3?

R1# show ip route connected


C 172.16.2.0/24 is directly connected, Serial0/0/0
C 172.16.3.0/24 is directly connected, GigabitEthernet0/0
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Enrutamiento estático

Docente: Marco Trujillo Silva


mtrujillos@upao.edu.pe

Curso: Redes de comunicaciones II


Ingeniería Electrónica
Objetivos

• Explicar cómo se implementan las rutas estáticas


en las redes de las Pymes.

• Configurar rutas estáticas para permitir la


conectividad en la red de una Pyme.

• Explicar cómo un enrutador procesa los paquetes


cuando se configura una ruta estática.
Types of static routes
Standard Static Route
• Standard static routes are useful when connecting to a
specific remote network.

R2(config)# ip route 172.16.3.0 255.255.255.0 172.16.2.1

.2

.1 I need to reach the LAN of R1


172.16.3.0/24.

I can simply use a static route


to reach the stub network.

5 © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Default Static Route Example
All I need to know about are my directly
connected networks. For all other
networks, I can use a default static route
Default static routes are also
going to R2. commonly used with edge
routers to connect to an ISP.

.2

.1

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2

6 © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Summary Static Route
I have four static routes to reach the
remote networks 172.20.0.0/16 -
172.23.0.0/16.
172.21.0.0/16
10.0.0.0/24
172.20.0.0/16
R1
.2

172.22.0.0/16

172.23.0.0/16

R1(config)# ip route 172.20.0.0 255.255.0.0 10.0.0.2


R1(config)# ip route 172.21.0.0 255.255.0.0 10.0.0.2
R1(config)# ip route 172.22.0.0 255.255.0.0 10.0.0.2
R1(config)# ip route 172.23.0.0 255.255.0.0 10.0.0.2

7
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Summary Static Route But to reduce the size of my routing table, I
will replace those four static routes with one
summary static route using a /14 subnet
mask
172.21.0.0/16
10.0.0.0/24
172.20.0.0/16
.2 R1

172.22.0.0/16

172.23.0.0/16

R1(config)# no ip route 172.20.0.0 255.255.0.0 10.0.0.2


R1(config)# no ip route 172.21.0.0 255.255.0.0 10.0.0.2
R1(config)# no ip route 172.22.0.0 255.255.0.0 10.0.0.2
R1(config)# no ip route 172.23.0.0 255.255.0.0 10.0.0.2
R1(config)#
R1(config)# ip route 172.20.0.0 255.252.0.0 10.0.0.2

8
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Floating Static Route

I can reach the HQ router


10.0.0.0/8 LAN using the
private WAN link.
Private WAN
172.16.1.0 /30
172.16.1.0 /30
S0/0/0 S0/0/0
.2 .1
10.0.0.0 /8
Branch HQ
S0/0/1 S0/0/1
.242 .226

209.165.200.240 /29 Internet 209.165.200.224 /29

.241 .225

ISP

9
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Floating Static Route

However, if that link ever fails, I will use


a floating static route connecting to the
Internet as a backup.

Private WAN
172.16.1.0 /30
172.16.1.0 /30
S0/0/0 S0/0/0
.2 .1
10.0.0.0 /8
Branch HQ
S0/0/1 S0/0/1
.242 .226

209.165.200.240 /29 Internet 209.165.200.224 /29

.241 .225

ISP

10
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configuring standard static
routes
Topology

• We will assume all the interface have been configured


with an IPv4 address and are in the up/up state.

12 © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configure Next Hop Static Routes on R1

R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2


R1(config)# ip route 192.168.1.0 255.255.255.0 172.16.2.2
R1(config)# ip route 192.168.2.0 255.255.255.0 172.16.2.2
R1(config)#

Notice: R1 uses the same next-hop IPv4 address for all static routes.

13
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Next Hop might be a Recursive Static Route
A recursive lookup means:
Only recursive if 1. A network in the routing table
CEF is disabled looks for a match with the packet’s
destination IP address.
2. The next-hop address is looked up
in the routing table to find an exit-
interface.

R1# show ip route | begin Gateway


Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks


S 172.16.1.0/24 [1/0] via 172.16.2.2 Only if CEF disabled
2 C 172.16.2.0/24 is directly connected, Serial0/0/0
L 172.16.2.1/32 is directly connected, Serial0/0/0
C 172.16.3.0/24 is directly connected, GigabitEthernet0/0
L 172.16.3.1/32 is directly connected, GigabitEthernet0/0
S 192.168.1.0/24 [1/0] via 172.16.2.2
1
14 S 192.168.2.0/24 [1/0] via 172.16.2.2
R1# © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configure Directly attached Static Routes

R1(config)# ip route 172.16.1.0 255.255.255.0 s0/0/0


R1(config)# ip route 192.168.1.0 255.255.255.0 s0/0/0
R1(config)# ip route 192.168.2.0 255.255.255.0 s0/0/0
R1(config)#

• This is an alternative method for configuring static routes on a point-to-point network.


• Static routes with a next-hop address recommended when CEF is enabled.
15
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Note (covered more later):
Verify the Routing Table of R1 ▪ Although the routing table
entry indicates “directly
connected”, the
administrative distance of
the static route is still 1.
▪ Only a directly connected
interface can have an
admin. distance of 0.

R1# show ip route | begin Gateway


Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks


S 172.16.1.0/24 is directly connected, Serial0/0/0
C 172.16.2.0/24 is directly connected, Serial0/0/0
L 172.16.2.1/32 is directly connected, Serial0/0/0
C 172.16.3.0/24 is directly connected, GigabitEthernet0/0
L 172.16.3.1/32 is directly connected, GigabitEthernet0/0
S 192.168.1.0/24 is directly connected, Serial0/0/0
16 S 192.168.2.0/24 is directly connected, Serial0/0/0
R1# © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Fully Specified Static Routes on R1

R1(config)# ip route 172.16.1.0 255.255.255.0 G0/1 172.16.2.2


R1(config)# ip route 192.168.1.0 255.255.255.0 G0/1 172.16.2.2
R1(config)# ip route 192.168.2.0 255.255.255.0 G0/1 172.16.2.2
R1(config)#

▪ Required when CEF is disabled and on a multi-access network.


17
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verify the Routing Table of R1

R1# show ip route | begin Gateway


Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks


S 172.16.1.0/24 [1/0] via 172.16.2.2, Gigabitethernet0/1
C 172.16.2.0/24 is directly connected, Gigabitethernet0/1
L 172.16.2.1/32 is directly connected, Gigabitethernet0/1
C 172.16.3.0/24 is directly connected, GigabitEthernet0/0
L 172.16.3.1/32 is directly connected, GigabitEthernet0/0
S 192.168.1.0/24 [1/0] via 172.16.2.2, Gigabitethernet0/1
18 S 192.168.2.0/24 [1/0] via 172.16.2.2, Gigabitethernet0/1
R1# © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configuring a Default Static Route

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2


R1(config)#

⚫ Commonly used in every network to have at least one route to send


packets when the destination IP address doesn’t match a more
specific route in the routing table.
⚫ If a default route is not used and there is not a match in the routing
table, then the packet is dropped.
19
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verifying the Routing Table of R1

R1# show ip route static


Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S* 0.0.0.0/0 is via 172.16.2.2


20
R1#
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configuring IPv6 Static
Routes
Configuring an IPv6 Static Route
Router(config)# ipv6 route ipv6-prefix/prefix-length {exit-
intf | ipv6-address}

Parameter Description
ipv6- • Destination IPv6 network address of the remote network to be added
prefix to the routing table.

/prefix- • Prefix length of the remote network to be added to the routing table.
length • Note: Can be modified to summarize a group of networks

• Use the outgoing interface to forward packets to the destination


exit-intf
network.

ipv6-
• Commonly referred to as the next-hop router’s IPv6 address.
address

22 © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configure Next Hop Static IPv6 Routes

R1(config)# ipv6 route 2001:DB8:ACAD:2::/64 2001:DB8:ACAD:4::2


R1(config)# ipv6 route 2001:DB8:ACAD:5::/64 2001:DB8:ACAD:4::2
R1(config)# ipv6 route 2001:DB8:ACAD:3::/64 2001:DB8:ACAD:4::2
R1(config)#

23
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Directly Attached Static IPv6 Routes on R1

R1(config)# ipv6 route 2001:DB8:ACAD:2::/64 s0/0/0


R1(config)# ipv6 route 2001:DB8:ACAD:5::/64 s0/0/0
R1(config)# ipv6 route 2001:DB8:ACAD:3::/64 s0/0/0
R1(config)#

• This is an alternative method for configuring static routes on a point-to-point network.


24 • Next-hop address recommended when CEF is enabled.
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verify the Routing Table of R1
R1# show ipv6 route
<Output omitted>

C 2001:DB8:ACAD:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:ACAD:1::1/128 [0/0]
via GigabitEthernet0/0, receive
S 2001:DB8:ACAD:2::/64 [1/0]
via Serial0/0/0, directly connected
S 2001:DB8:ACAD:3::/64 [1/0]
via Serial0/0/0, directly connected
C 2001:DB8:ACAD:4::/64 [0/0]
via Serial0/0/0, directly connected
L 2001:DB8:ACAD:4::1/128 [0/0]
via Serial0/0/0, receive
S 2001:DB8:ACAD:5::/64 [1/0]
via Serial0/0/0, directly connected
L FF00::/8 [0/0]
via Null0, receive
R1#
25
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Exit-interface required when link-local
address is used as next-hop address

R1(config)# ipv6 route 2001:db8:acad:2::/64 fe80::2


% Interface has to be specified for a link-local nexthop
R1(config)# ipv6 route 2001:db8:acad:2::/64 s0/0/0 fe80::2
R1(config)#

26 © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verify the Static Route on R1

R1(config)# ipv6 route 2001:db8:acad:2::/64 s0/0/0 fe80::2


R1(config)# end

R1#show ipv6 route static | begin 2001:DB8:ACAD:2::/64

S 2001:DB8:ACAD:2::/64 [1/0]
via FE80::2, Serial0/0/0

27
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configuring a Default Static IPv6 Route

R1(config)# ipv6 route ::/0 2001:DB8:ACAD:4::2


R1(config)#

28
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verifying the Routing Table of R1

R1# show ipv6 route static


IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user
Static route
<Output omitted>

S ::/0 [1/0]
via 2001:DB8:ACAD:4::2
29 R1#
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verifying Connectivity to the R3 LAN

R1# ping 2001:0DB8:ACAD:3::1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:ACAD:3::1, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28
ms
R1#
30
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configuring Floating Static
Routes
Floating Static Route

I can reach the HQ router


10.0.0.0/8 LAN using the
private WAN link.
Private WAN
172.16.1.0 /30
172.16.1.0 /30
S0/0/0 S0/0/0
.2 .1
10.0.0.0 /8
Branch HQ
S0/0/1 S0/0/1
.242 .226

209.165.200.240 /29 Internet 209.165.200.224 /29

.241 .225

ISP

32
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Floating Static Route

However, if that link ever fails, I will use


a floating static route connecting to the
Internet as a backup.

Private WAN
172.16.1.0 /30
172.16.1.0 /30
S0/0/0 S0/0/0
.2 .1
10.0.0.0 /8
Branch HQ
S0/0/1 S0/0/1
.242 .226

209.165.200.240 /29 Internet 209.165.200.224 /29

.241 .225

ISP

33
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configuring a Floating Static Route to R3

Backup

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2


R1(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.2 5
R1(config)#

34
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verifying the Routing Table of R1

Only the primary (best) route is in


the routing table.

The backup route with the higher


administrative distance is not in
the routing table.

Backup

R1# show ip route static | begin Gateway


Gateway of last resort is 0.0.0.0 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 172.16.2.2
R1#
35
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verify the Path to the R3 LAN

R1# traceroute 192.168.2.1


Type escape sequence to abort.
Tracing the route to 192.168.2.1
VRF info: (vrf in name/id, vrf out name/id)
1 172.16.2.2 4 msec 4 msec 8 msec
2 192.168.1.1 12 msec * 12 msec
36 R1#
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Simulate a Router Failure on R2

X X

R2(config)# int s0/0/0


R2(config-if)# shutdown
*Feb 21 16:33:35.939: %LINK-5-CHANGED: Interface Serial0/0/0, changed state to administratively
down
*Feb 21 16:33:36.939: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state
to down
R2(config-if)# int s0/0/1
R2(config-if)# shutdown
R2(config-if)#
*Feb 21 16:33:42.543: %LINK-5-CHANGED: Interface Serial0/0/1, changed state to administratively
down
37 *Feb 21 16:33:43.543: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state
to down © 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verify the Default Route on R1

X X

Primary

R1# show ip route static | begin Gateway


Gateway of last resort is 0.0.0.0 to network
0.0.0.0
S* 0.0.0.0/0 [5/0] via 10.10.10.2
38 R1#
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Verify the Path to the R3 LAN

If the links come back up, the


backup route is removed and the
primary route with the lower default
administrative distance of 1 is
reinstalled into the routing table.

X X

R1# traceroute 192.168.2.1


Type escape sequence to abort.
Tracing the route to 192.168.2.1
VRF info: (vrf in name/id, vrf out name/id)
39 1 10.10.10.2 4 msec 4 msec *
© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Configurar Rutas de Host Estáticas
Rutas de Host
Una ruta de host es una dirección IPv4 con una máscara de 32 bits o una dirección IPv6 con una
máscara de 128 bits. A continuación, se muestra tres maneras de agregar una ruta de host a una
tabla de routing:

• Instalarla automáticamente cuando se configura una dirección IP en el router.


• Configurarla como una ruta de host estático.
Configurar Rutas de Host Estáticas
Rutas de Host Instaladas Automáticamente
• El IOS de Cisco instala automáticamente una ruta de host, también conocida como ruta de
host local, cuando se configura una dirección de interfaz en el router. Una ruta host permite
un proceso más eficiente para los paquetes que se dirigen al router mismo, en lugar del envío
de paquetes.

• Esto se suma a la ruta conectada, designada con una C en la tabla de enrutamiento para la
dirección de red de la interfaz.

• Las rutas locales se marcan con L en el resultado de la tabla de enrutamiento.


Configurar Rutas de Host Estáticas
Rutas Estaticas de Host
Una ruta de host puede ser una ruta estática configurada manualmente para dirigir el tráfico a un
dispositivo de destino específico, como un servidor de autenticación. La ruta estática utiliza una
dirección IP de destino y una máscara 255.255.255.255 (/32) para las rutas de host IPv4 y una
longitud de prefijo /128 para las rutas de host IPv6.

El ejemplo muestra la configuración de la ruta de host estática IPv4 e IPv6 en el router Branch para
acceder al servidor.

Branch(config)# ip route 209.165.200.238 255.255.255.255 198.51.100.2


Branch(config)# ipv6 route 2001:db8:acad:2::238/128 2001:db8:acad:1::2
Configurar rutas de host estáticas
Verificar rutas de host estáticas
Una revisión de las tablas de rutas IPv4 e IPv6 verifica que las rutas estén activas.
Configurar rutas de host estáticas
Configurar ruta de host estática IPv6 con Link-Local de siguiente salto

Para rutas estáticas IPv6, la dirección del siguiente salto puede ser la dirección link-local del router
adyacente. Sin embargo, debe especificar un tipo de interfaz y un número de interfaz cuando usa
una dirección link-local como siguiente salto, como se muestra en el ejemplo. En primer lugar, se
elimina la ruta de host estática IPv6 original y, a continuación, se configura una ruta
completamente especificada con la dirección IPv6 del servidor y la dirección local del vínculo IPv6
del enrutador ISP.
Actividad: Construye la topología de la red
Para complementar la información de clase y reforzar el
conocimiento adquirido, se solicita elaborar la topología de
red a partir de las tablas de enrutamiento mostradas

#show ip route
C 192.168.2.0 _________, Ethernet0
C 193.169.3.0 _________, Ethernet1
S 191.108.33.0 [1/1] via 191.108.16.2, 0:01:29, Serial0
[1/1] via 192.108.16.1, 0:01:29, Serial1
C 191.108.16.0________, Serial0
C 192.108.16.0________, Serial1
S 219.100.103.0 [1/1] via 191.108.16.2, 0:02:30, Serial0

© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
Preguntas

© 2016 Cisco y/o sus filiales. Todos los derechos reservados. Información confidencial de Cisco.
CIERRE
¿Qué aprendí en este módulo?
• Un host envía un paquete a otro host y lo envía a la dirección de puerta de enlace predeterminada.
• Cuando el paquete llega a una interfaz del router, des-encapsulará el paquete y buscará en la tabla de
enrutamiento una entrada de red de destino que coincida.
• Si la dirección IP de destino:
• Coincide con una entrada de ruta estática, el router usará la ruta estática para identificar
la dirección IP de salto siguiente o la interfaz de salida.
• No coincide con una ruta específica a la red de destino, entonces el router utilizará la
ruta estática predeterminada (si está configurada).
• No coincide con una entrada de la tabla de rutas, entonces el router descartará el
paquete y enviará un mensaje ICMP de vuelta al origen.
• Si el router coincide con una entrada de tabla de enrutamiento, entonces el router encapsula el
paquete y lo reenvía fuera de la interfaz adecuada.
• El paquete se reenvía de router a router hasta que llega a su red de destino.
CIERRE
¿Qué aprendió en este módulo? (Cont.)
• Cuando el paquete llegue a la red de destino, ese router buscará una coincidencia en la tabla de
enrutamiento.
• Cuando la dirección IP de destino coincide con una interfaz Ethernet conectada directamente, el
router busca en la tabla ARP la dirección MAC de Capa 2 de la dirección IP de destino.
• Si no existe ninguna entrada ARP, el router envía una solicitud ARP fuera de la interfaz Ethernet
• El host de destino responde con una respuesta ARP que contiene su dirección MAC.
• El router encapsula el paquete en una nueva trama. Utiliza la dirección MAC del host de destino como
dirección MAC de destino de la trama y la dirección MAC de la interfaz Ethernet del router como
dirección MAC de origen en la trama.
• La trama se reenvía a través de la interfaz apropiada.
• El paquete llega a la interfaz de la tarjeta de interfaz de red (NIC) de dispositivo destino y es
procesado.

You might also like