Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Implementación
• Implementar OSPF
• Comprobar Algoritmo
• Comprobar Jerarquía
• Comprobar Información (Comando show)
Información de enrutamiento:
Explique:
• Elegir al DR y BDR.
Cada segmento de la red BMA tendrá un DR y BDR. Un router podrá actuar como DR en
un segmento y actuar como router normal en otro, en realidad es la interfaz la que actúa
como DR o BDR.
Un BDR detectara que un DR falla, pues durante un cierto tiempo no recibirá LSAs
• Exstart state: DR y BDR forman una adyacencia con cada uno de los routers.
• Exchange state: Intercambio de DB.
• Loading state: El slave compara información recibida y pide que le envíen entradas
que no tiene.
• Full state: Se crea la tabla de enrutamiento.
Nota: 224.0.0.5 dirección multicast a todos los routers OSPF. 224.0.0.6 multicast a
todos los DR y BDR.
Los paquetes OSPF se encapsulan en IP con tipo de protocolo de transporte numero 89. En
la cabecera OSPF existe un campo que indica el tipo de paquete:
router>enable
router#configure terminal
router(config)#hostname RA
RA(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
RA(config)#enable secret cisco
RA(config)#line con 0
RA(config-line)#password cisco
RA(config-line)#login
RA(config-line)#exit
RA(config)#line vty 0 4
RA(config-line)#password cisco
RA(config-line)#login
RA(config-line)#exit
RA#configure terminal
RA(config)#interface fastethernet 0/0
RA(config-if)#ip address 172.16.12.1 255.255.255.0
RA(config-if)#no shutdown
RA(config-if)#exit
RA(config)#interface serial 0/1/0
RA(config-if)#bandwidth 1544
RA(config-if)#ip address 10.1.1.1 255.255.255.252
RA(config-if)#clock rate 64000
RA(config-if)#no shutdown
RA(config-if)#exit
RA>configure terminal
RA(config)#router ospf 1
RA(config-router)#passive-interface fastethernet 0/0
RA(config-router)#network 172.16.12.0 0.0.0.255 area 0
RA(config-router)network 10.1.1.0 0.0.0.3 area 0
router>enable
router#configure terminal
router(config)#hostname RB
RB(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
RB(config)#enable secret cisco
RB(config)#line con 0
RB(config-line)#password cisco
RB(config-line)#login
RB(config-line)#exit
RB(config)#line vty 0 4
RB(config-line)#password cisco
RB(config-line)#login
RB(config-line)#exit
RB#Configure terminal
RB(config)#interface fastethernet 0/0
RB(config-if)#ip address 172.16.16.1 255.255.255.0
RB(config-if)#no shutdown
RB(config-if)#exit
RB(config)#Interface serial 0/1/0
RB(config-if)#bandwidth 2048
RB(config-if)#ip address 10.1.1.5 255.255.255.252
RB(config-if)#clock rate 64000
RB(config-if)#no shutdown
RB(config-if)#exit
RB>configure terminal
RB(config)#router ospf 1
RB(config-router)#passive-interface fastethernet 0/0
RB(config-router)#network 172.16.16.0 0.0.0.255 area 0
RB(config-router)#network 10.1.1.4 0.0.0.3 area 0
• Configuración Básica Router 1
router>enable
router#configure terminal
router(config)#hostname R1
R1(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
R1(config)enable secret cisco
R1(config)line con 0
R1(config-line)password cisco
R1(config-line)login
R1(config-line)exit
R1(config)line vty 0 4
R1(config-line)password cisco
R1(config-line)login
R1(config-line)exit
R1#configure terminal
R1(config)#interface serial 0/1/0
R1(config-if)#bandwidth 1544
R1(config-if)#ip address 10.1.1.2 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastethernet 0/0
R1(config-if)#p address 192.168.50.1 255.255.255.248
R1(config-if)#no shutdown
R1(config-if)#exit
R1#configure terminal
R1(config)#router ospf 1
R1(config)#network 10.1.1.0 0.0.0.3 area 0
R1(config)#network 192.168.50.0 0.0.0.7 area 0
router>enable
router#configure terminal
router(config)#hostname R2
R2(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
R2(config)#enable secret cisco
R2(config)#line con 0
R2(config-line)#password cisco
R2(config-line)#login
R2(config-line)#exit
R2(config)#line vty 0 4
R2(config-line)#password cisco
R2(config-line)#login
R2(config-line)#exit
R2#configure terminal
R2(config)#interface serial 0/1/0
R2(config-if)#bandwidth 2048
R2(config-if)#ip address 10.1.1.6 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)interface fastethernet 0/0
R2(config-if)#ip address 192.168.50.2 255.255.255.248
R2(config-if)#no shutdown
R2(config-if)#exit
R2#configure terminal
R2(config)#router ospf 1
R2(config-config)#network 10.1.1.4 0.0.0.3 area 0
R2(config-config)#network 192.168.50.0 0.0.0.7 area 0
router>enable
router#configure terminal
router(config)#hostname R3
R3(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
R3(config)#enable secret cisco
R3(config-line)#line con 0
R3(config-line)#password cisco
R3(config-line)#login
R3(config-line)#exit
R3(config)#line vty 0 4
R3(config-line)#password cisco
R3(config-line)#login
R3(config-line)#exit
• Configuración Interfaces y Protocolo Router 3
R3#configure terminal
R3(config)#interface serial 0/1/0
R3(config-if)#bandwidth 1544
R3(config-if)#ip address 10.2.2.5 255.255.255.252
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastethernet 0/0
R3(config-if)#ip address 192.168.50.3 255.255.255.248
R3(config-if)#no shutdown
R3(config-if)#exit
R3#configure terminal
R3(config)#router ospf 1
R3(config-router)#network 10.2.2.4 0.0.0.3 area 0
R3(config-router)#network 192.168.50.0 0.0.0.7 area 0
router>enable
router#configure terminal
router(config)#hostname R4
R4(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
R4(config)#enable secret cisco
R4(config)#line con 0
R4(config-line)#password cisco
R4(config-line)#login
R4(config-line)#exit
R4(config)#line vty 0 4
R4(config-line)#password cisco
R4(config-line)#login
R4(config-line)#exit
R4#configure terminal
R4(config)#interface serial 0/1/0
R4(config-if)#bandwidth 2048
R4(config-if)#ip address 10.2.2.1 255.255.255.252
R4(config-if)#clock rate 64000
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#interface fastethernet 0/0
R4(config-if)#ip address 192.168.50.4 255.255.255.248
R4(config-if)#no shutdown
R4(config-if)#exit
R4#configure terminal
R4(config)#router ospf 1
R4(config-router)#network 10.2.2.0 0.0.0.3 area 0
R4(config-router)#network 192.168.50.0 0.0.0.7 area 0
router>enable
router#configure terminal
router(config)#hostname RC
RC(config)#banner motd #---ACCESO RESTRINGIDO AL ROUTER---#
RC(config)#enable secret cisco
RC(config)#line con 0
RC(config-line)#password cisco
RC(config-line)#login
RC(config-line)#exit
RC(config)#line vty 0 4
RC(config-line)#password cisco
RC(config-line)#login
RC(config)#exit
RC#configure terminal
RC(config)#interface fastethernet 0/1
RC(config-if)#ip address 172.16.8.1 255.255.255.0
RC(config-if)#no shutdown
RC(config-if)#exit
RC(config)#interface fastethernet 0/0
RC(config-if)#ip address 172.16.4.1 255.255.255.0
RC(config-if)#no shutdown
RC(config-if)#exit
RC(config)#interface serial 0/1/1
RC(config-if)#bandwidth 1544
RC(config-if)#ip address 10.2.2.6 255.255.255.252
RC(config-if)#no shutdown
RC(config-if)#exit
RC(config)#interface serial 0/1/0
RC(config-if)#bandwidth 2048
RC(config-if)#ip address 10.2.2.2 255.255.255.252
RC(config-if)#no shutdown
RC(config-if)#exit
RC#configure terminal
RC(config)#router ospf 1
RC(config-router)#passive-interface fastethernet 0/0
RC(config-router)#passive-interface fastethernet 0/1
RC(config-router)#network 172.16.8.0 0.0.0.255 area 0
RC(config-router)#network 172.16.4.0 0.0.0.255 area 0
RC(config-router)#network 10.2.2.4 0.0.0.3 area 0
RC(config-router)#network 10.2.2.0 0.0.0.3 area 0
Verificacion de OSPF
RA#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R1#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
RB#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R2#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R3#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R4#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
RC#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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
En nuestra topología existen 7 routers, 4 de los cuales tienen conexión punto a punto en una
de sus interfaces dichas interfaces no participaran en la elección del DR y BDR ya que en
conexiones punto a punto no existe ese concepto. Solo participaran en esta elección las
interfaces que comparten un punto central de conexión mediante un switch a esta parte de
la topología se le llama broadcast multi acceso.
La elección del DR y BDR tiene distintas opciones de poder establecerlas, por ejemplo por
la prioridad que tenga el router que por defecto viene configurada en 1, si están todas en 1,
automáticamente se busca la dirección ip mas alta de las interfaces que participan en la
elección, el BDR será la segunda interfaz mas alta y actuara solo si el DR falla.
Mientras los routers que fueron elegidos como DR y BDR funcionen correctamente y sus
enlaces no presenten problemas no habrá problemas de conectividad, pero puede ocurrir
que el router o la interfaz que este llevando las funciones de DR deje de funcionar, esto trae
como consecuencia que el protocolo se caiga y se pierda la conectividad, pues bien existe la
posibilidad de que en el router se configure una interfaz loopback, para ospf esta interfaz
será prioridad numero 1 en la elección del DR, ya que es una interfaz virtual que no va
conectada a ningún lado y nunca dejara de funcionar y estabilizara y garantizara la
conectividad en toda la red.
Cabe destacar que si a todos los routers del BMA, se les configura una loopback, será la ip
mas alta la elegida como DR.
R1#configure terminal
R1(config)#interface loopback 0
R1(config-if)#ip address 10.5.5.1 255.255.255.0
R2#configure terminal
R2(config)#interface loopback 0
R2(config-if)#ip address 10.5.5.2 255.255.255.0
R3#configure terminal
R3(config)#interface loopback 0
R3(config-if)#ip address 10.5.5.3 255.255.255.0
R4#configure terminal
R4(config)#interface loopback 0
R4(config-if)#ip address 10.5.5.4 255.255.255.0
Ahora con las interfaces loopback configuradas y volviendo los routers a funcionar, el
protocolo vuelve a actuar, se mandan los paquetes hello para la elección pero ya no serán
las interfaces físicas las que participaran si no que automáticamente ospf detecta las
loopback configuradas en cada router, las compara y la más alta será el DR y la segunda
más alta el BDR, tal como se ve en la figura. Para ospf ya no importa la cantidad de
interfaces físicas que haya en el router al momento de encontrar una loopback será la
prioridad número uno para la elección.
En este caso el router 4 sigue siendo el DR porque se le configuro la loopback mas alta:
10.5.5.4 y el BDR será el router 3 con la loopback: 10.5.5.3