viernes, 23 de agosto de 2013

Routing estático parte 2



Este artículo forma parte de una serie de varios artículos que tratan los distintos tipos de routing en IPV4 e IPV6 para CCNA R&S, para ir al índice del curso tienes este link:

Routing estático parte 2:


En el artículo anterior vimos la necesidad de rutas estáticas, como se configuraban, y como se verificaban. En este artículo, partiendo de los mismos comandos vamos a complicar un poco el asunto. Lo único que vamos a añadir son las interfaces loopback.

Interfaces loopback:

Son interfaces que no están conectadas a nada, pero a las que se les puede poner ip, y que te permiten tener una interfaz siempre conectada. Se suelen utilizar para identificar al router, para administrarlo…etc. A efectos prácticos son interfaces siempre conectadas, que solo están conectadas en el router que las tiene configuradas. Al estar conectadas a un único equipo prácticamente siempre tienen máscaras /32.


R1(config)#int loop 0
R1(config-if)#ip add 1.1
*Mar 1 02:35:01.411: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R1(config-if)#ip add 1.1.1.1 255.255.255.255

Partiendo de la siguiente topología:

R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.2

R2(config)#ip route 1.1.1.1 255.255.255.255 192.168.0.1
R2(config)#ip route 5.5.5.5 255.255.255.255 192.168.1.3
R2(config)#ip route 3.3.3.3 255.255.255.255 192.168.1.3
R2(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.3
R2(config)#ip route 4.4.4.4 255.255.255.255 192.168.1.3 250
R2(config)#ip route 4.4.4.4 255.255.255.255 192.168.2.4
R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.4
R2(config)#ip route 5.5.5.5 255.255.255.255 192.168.2.4 250
R2(config)#ip route 3.3.3.3 255.255.255.255 192.168.2.4 250

R3(config)#ip route 1.1.1.1 255.255.255.255 192.168.1.2
R3(config)#ip route 4.4.4.4 255.255.255.255 192.168.1.2
R3(config)#ip route 192.168.0.0 255.255.255.0 192.168.1.2
R3(config)#ip route 5.5.5.5 255.255.255.255 192.168.3.5
R3(config)#ip route 192.168.4.0 255.255.255.0 192.168.1.2
R3(config)#ip route 2.2.2.2 255.255.255.255 192.168.1.2

R4(config)#ip route 1.1.1.1 255.255.255.255 192.168.2.2
R4(config)#ip route 3.3.3.3 255.255.255.255 192.168.2.2
R4(config)#ip route 192.168.0.0 255.255.255.0 192.168.2.2
R4(config)#ip route 5.5.5.5 255.255.255.255 192.168.4.5
R4(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2
R4(config)#ip route 2.2.2.2 255.255.255.255 192.168.2.2

R5(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.3
R5(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.4
Ping a todo desde R1:
R1#ping 2.2.2.2 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/24/36 ms
R1#ping 3.3.3.3 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/42/48 ms
R1#ping 4.4.4.4 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/42/72 ms
R1#ping 5.5.5.5 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/63/100 ms
R1#ping 192.168.1.3 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/39/64 ms
R1#ping 192.168.2.4 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/40/48 ms
R1#ping 192.168.3.5 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/59/88 ms
R1#ping 192.168.4.5 source loop 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/56/68 ms

Tablas de routing:

R1#show ip route
Codes: 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

Gateway of last resort is 192.168.0.2 to network 0.0.0.0

1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
C 192.168.0.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.0.2

R2#show ip route
Codes: 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

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 192.168.0.1
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
S 3.3.3.3 [1/0] via 192.168.1.3
4.0.0.0/32 is subnetted, 1 subnets
S 4.4.4.4 [1/0] via 192.168.2.4
5.0.0.0/32 is subnetted, 1 subnets
S 5.5.5.5 [1/0] via 192.168.1.3
S 192.168.4.0/24 [1/0] via 192.168.2.4
C 192.168.0.0/24 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Ethernet1/0
C 192.168.2.0/24 is directly connected, Ethernet1/1
S 192.168.3.0/24 [1/0] via 192.168.1.3

R3#show ip route
Codes: 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

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 192.168.1.2
2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 192.168.1.2
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
S 4.4.4.4 [1/0] via 192.168.1.2
5.0.0.0/32 is subnetted, 1 subnets
S 5.5.5.5 [1/0] via 192.168.3.5
S 192.168.4.0/24 [1/0] via 192.168.1.2
S 192.168.0.0/24 [1/0] via 192.168.1.2
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/1


R4#show ip route
Codes: 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

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 192.168.2.2
2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 192.168.2.2
3.0.0.0/32 is subnetted, 1 subnets
S 3.3.3.3 [1/0] via 192.168.2.2
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback0
5.0.0.0/32 is subnetted, 1 subnets
S 5.5.5.5 [1/0] via 192.168.4.5
C 192.168.4.0/24 is directly connected, FastEthernet0/1
S 192.168.0.0/24 [1/0] via 192.168.2.2
C 192.168.2.0/24 is directly connected, FastEthernet0/0
S 192.168.3.0/24 [1/0] via 192.168.2.2

R5#show ip route
Codes: 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

Gateway of last resort is 192.168.4.4 to network 0.0.0.0

5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected, Loopback0
C 192.168.4.0/24 is directly connected, FastEthernet0/1
C 192.168.3.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.4.4
[1/0] via 192.168.3.3 

Conclusiones:


Una ruta 0.0.0.0/0 es una ruta por defecto, lo que engloba a cualquier red(R1 y R5).
Cuando ponemos dos rutas al mismo destino, pero con distancia administrativa diferente, la que tiene la menor distancia administrativa se usara en la tabla de routing, y la otra ruta solo aparecerá cuando la interfaz de salida de la primera ruta se pierda(R2).
Cuando tenemos dos rutas iguales y, con la misma distancia administrativa. Lo que hace el router es repartir los paquetes, alternándolos por ambas rutas.

Ejercicio para alumnos de nota:

  1. Encuentra en que condiciones se produce tráfico asimétrico(la ida y la vuelta no van por el mismo camino).
  2. Encuentra en que condiciones se produce un bucle de routing(dos routers se pasan los paquetes para llegar al destino el uno al otro, sin que salgan de ahí).



No hay comentarios:

Publicar un comentario