Está en la página 1de 8

UNIVERSIDAD NACIONAL DE INGENIERIA

FACULTAD DE INGENIERIA MECANICA


DEPARTAMENTO ACADEMICO DE INGENIERIA APLICADA

ENRUTAMIENTO OSPF EN MEDIO DE DIFUSIN


OBJETIVO.- Implementar y consolidar los conceptos de operacin del Protocolo de
Enrutamiento en Medios de Difusin.
PLANTEAMIENTO.- En la topologa mostrada configurar el enrutamiento OSPF,
definiendo previamente los router-id, de cada proceso OSPF sobre una interface
Loopback 0 para los Routers A, B, C, D, E y F, para mantener el proceso OSPF activo e
independiente de alguna cada de alguna interface fsica.
Adems de asignar la IP mayor sobre el Router Cabecera de la Red. Router A.

PROCEDIMIENTO:
1.- En todos los Routers se debe crear la interface Loopback 0 de la siguiente
manera:
A(config)# interface loopback 0
A(config-if)# ip address 192.168.10.254 255.255.255.0
A(config-if)# no shutdown
Luego debe crear el proceso OSPF para el Area 0.
A(config)#router ospf 1
A(config-router)# router-id 192.168.10.254
Salimos del modo router, para continuar asignando las IPs a las dems interfaces del
Router A.
A(config)#interface Fasethernet 0/0
- UIGV -

Pg. 1

A(config-if)#ip adddress 192.168.20.2 255.255.255.0


A(config)#interface Fasethernet 0/1
A(config-if)#ip adddress 10.0.0.2 255.255.255.252
2.- Ingresamos nuevamente al proceso OSPF 1 para declarar la red conectada que
participa del rea 0.
A(config)#router ospf 1
A(config-router)#network 192.168.20.0 0.0.0.255 area 0
3.- Debido a que este Router A es cabecera del Area 0, y se conecta al Router ISP,
declaramos una ruta estatica por defecto de la siguiente manera y lo propagamos al
interior del rea.
A(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1
A(config)#router ospf 1
A(config-router)#default-information originate ( para propagar la ruta por defecto al
Area 0).
4.- En el caso del Router B y los dems se proceder creando la interface virtual
Loopback 0 y se declarara 2 redes conectadas que sern publicadas por OSPF.
B(config)#interface Loopback 0
B(config-if)#ip address 192.168.10.200 255.255.255.0
B(config-if)#no shutdown
B(config)#router ospf 1
B(config-router)#router-id 192.168.10.200
Salimos para asignar IPs a las interfaces reales.
B(config)#interface Fastethernet 0/0
B(config-if)# ip address 192.168.20.3 255.255.255.0
B(config)#interface Fastethernet 0/1
B(config-if)# ip address 172.20.20.1 255.255.255.0
5.- Ingresamos nuevamente al proceso OSPF 1.
B(config)#router ospf 1
B(config-router)#network 192.168.20.0 0.0.0.255 area 0
B(config-router)#network 172.20.20.0 0.0.0.255 area 0
6.- Debido a que el Router ISP no participa del enrutamiento OSPF no lograra conocer
rutas caminos a las subredes 172.20.X.0/24, por lo que tendremos esta vez
establecer rutas estticas hacia dichas subredes.
ISP(config)#interface Fastethernet 0/0
ISP(config-if)#ip address 10.0.0.1 255.255.255.252
ISP(config)#ip route 172.20.10.0 255.255.255.0 10.0.0.2
ISP(config)#ip route 172.20.20.0 255.255.255.0 10.0.0.2
ISP(config)#ip route 172.20.30.0 255.255.255.0 10.0.0.2
ISP(config)#ip route 172.20.40.0 255.255.255.0 10.0.0.2
ISP(config)#ip route 172.20.50.0 255.255.255.0 10.0.0.2
7.- Hasta aqu la configuracin bsica, nos ha permitido el enrutamiento a travs de
todas las redes. Sin embargo, OSPF automticamente ha seleccionado a un Router
DR (Designate Router), como el Router principal del Area, donde se mantendr la
informacin de la Tabla Topolgica y de Enrutamiento. Ademas de declarar un BDR
- UIGV -

Pg. 2

(Backup Designate Router), como respaldo en caso el DR falle, los dems sern
declarados OtherDR.
La eleccin de DR y BDR, se lleva acabo cuando el proceso se inicia o cuando el
router arranca, en el cual cada router participa en la eleccin usando su router-id, y
ganara el que tenga el mayor valor de prioridad, y si estos son iguales a 1 que es su
valor por defecto, se desempatara por la IP mayor entre todos los routers que tienen
la prioridad mas alta.
8.- Una vez elegido al DR y BDR, los nuevos routers que se inician en la red, ya no
participaran de la eleccin y quedaran declarados como OtherDR.
Esta eleccin se lleva usando mensajes con direcciones multicast entre:
DR y BDR
224.0.0.6
DR y Clientes OSPF
224.0.0.5
RIPv2
224.0.0.9
Para mostrar el proceso de eleccin, debe darse cuenta que cada router OSPF
participa con su valor de router-id, y se contempla varios estados transitorios antes
de que converga la red.
Down, Init, Two-way, Exstart, Exchange, Loading, Full-Adjacency.
Durante la eleccin puede visualizar este estado con el comando:
C# show ip ospf interface fastethernet 0/0
9.- Alterar la eleccin del DR, significa elegir un router especifico que ser el que
almacene informacin de la tabla topolgica y ser responsable de informar a los
dems de algn cambio en la red. Por lo general se suele elegir al router camino
hacia el exterior del rea.
La prioridad puede tomar un valor desde 0 hasta 255, donde 0 excluye al router a
que participe de la eleccin y 255 tienta que el router gane la eleccin.
Pudiera haber ms de un router con prioridad 255, donde se desempatara por la IP
ms grande.
Si deseamos que el router C sea el DR, cambiamos la prioridad OSPF sobre su
interface conectada a la red de difusin de la siguiente manera.
C(config)#interface fastEthernet 0/0
C(config-if)#ip ospf priority 255
Debido a que el router A ya fue elegido DR podramos reiniciar su proceso OSPF y el
del BDR con el comando.
A#clear ip ospf process
B#clear ip ospf process
O Reiniciar los puertos del Switch, para eliminar la tabla de vecinos de cada router y
forzarlos a que participen en la nueva eleccin.
10.- Finalmente se mostrara la salida donde C ha logrado ser el DR:
C#show ip ospf interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.20.4/24, Area 0
Process ID 1, Router ID 192.168.10.3, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 255
Designated Router (ID) 192.168.10.3, Interface address 192.168.20.4
Backup Designated Router (ID) 192.168.10.254, Interface address 192.168.20.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
- UIGV -

Pg. 3

Hello due in 00:00:09


Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 5, Adjacent neighbor count is 5
Adjacent with neighbor 192.168.10.200
Adjacent with neighbor 192.168.10.1
Adjacent with neighbor 192.168.10.100
Adjacent with neighbor 192.168.10.254 (Backup Designated Router)
Adjacent with neighbor 192.168.10.2
Suppress hello for 0 neighbor(s)
11.- El router A, ya no es DR, pero sin embargo sigue siendo vecino de los demas:
A#show ip ospf neighbor
Neighbor ID
Pri State
Dead Time Address
Interface
192.168.10.200 1 FULL/DROTHER 00:00:31 192.168.20.3 FastEthernet0/0
192.168.10.1
1
FULL/DROTHER
00:00:31
192.168.20.6
FastEthernet0/0
192.168.10.100 1 FULL/DROTHER 00:00:31 192.168.20.1 FastEthernet0/0
192.168.10.3
255 FULL/DR
00:00:31
192.168.20.4
FastEthernet0/0
192.168.10.2
1
FULL/DROTHER
00:00:31
192.168.20.5
FastEthernet0/0
12.- Suponga ahora que el Router C, falle o caiga, entonces que ocurrir con el DR y
BDR.
Debido a que el router A fue elegido como BDR, este tomara el lugar que el router C
dejo, y el router B ser elegido BDR tomando la posta que A dejo.
Para mostrar en tiempo de ejecucin este cambio y ver estos mensajes lo hacemos
con el comando debug ip ospf adj y events en cualquier router:
00:25:53: OSPF: Neighbor change Event on interface FastEthernet0/0
00:25:53: OSPF: DR/BDR election on FastEthernet0/0
00:25:53: OSPF: Elect BDR 192.168.10.200
00:25:53: OSPF: Elect DR 192.168.10.254
00:25:53:
DR: 192.168.10.254 (Id) BDR: 192.168.10.200 (Id)
13.- Luego lo confirmamos en el router A, con el siguiente comando:
A#show ip ospf interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.20.2/24, Area 0
Process ID 1, Router ID 192.168.10.254, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.10.254, Interface address 192.168.20.2
Backup Designated Router (ID) 192.168.10.200, Interface address 192.168.20.3
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
- UIGV -

Pg. 4

Last flood scan time is 0 msec, maximum is 0 msec


Neighbor Count is 4, Adjacent neighbor count is 4
Adjacent with neighbor 192.168.10.200 (Backup Designated Router)
Adjacent with neighbor 192.168.10.1
Adjacent with neighbor 192.168.10.100
Adjacent with neighbor 192.168.10.2
Suppress hello for 0 neighbor(s)

hostname A
interface Loopback0
ip address 192.168.10.254 255.255.255.0
interface FastEthernet0/0
ip address 192.168.20.2 255.255.255.0
interface FastEthernet0/1
ip address 10.0.0.2 255.255.255.252
router ospf 1
network 192.168.20.0 0.0.0.255 area 0
default-information originate
!
ip route 0.0.0.0 0.0.0.0 10.0.0.1
hostname B
interface Loopback0
ip address 192.168.10.200 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.20.3 255.255.255.0
interface FastEthernet0/1
ip address 172.20.20.1 255.255.255.0
router ospf 1
router-id 192.168.10.200
network 172.20.20.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
- UIGV -

Pg. 5

hostname C
interface Loopback0
ip address 192.168.10.3 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.20.4 255.255.255.0
interface FastEthernet0/1
ip address 172.20.30.1 255.255.255.0
router ospf 1
router-id 192.168.10.3
network 172.20.30.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
hostname D
interface Loopback0
ip address 192.168.10.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.20.5 255.255.255.0
interface FastEthernet0/1
ip address 172.20.40.1 255.255.255.0
router ospf 1
router-id 192.168.10.2
network 172.20.40.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
hostname E
interface Loopback0
ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.20.6 255.255.255.0
interface FastEthernet0/1
ip address 172.20.50.1 255.255.255.0
router ospf 1
router-id 192.168.10.1
network 172.20.50.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
hostname F
interface Loopback0
ip address 192.168.10.100 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.20.1 255.255.255.0
interface FastEthernet0/1
ip address 172.20.10.1 255.255.255.0
router ospf 1
router-id 192.168.10.100
network 172.20.10.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
hostname ISP
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.252
ip
ip
ip
ip

route
route
route
route

172.20.10.0
172.20.20.0
172.20.30.0
172.20.40.0

255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0

10.0.0.2
10.0.0.2
10.0.0.2
10.0.0.2
- UIGV -

Pg. 6

ip route 172.20.50.0 255.255.255.0 10.0.0.2

VPCS> ip 172.20.10.2/24 172.20.10.1


Checking for duplicate address...
PC1 : 172.20.10.2 255.255.255.0 gateway 172.20.10.1
VPCS> show ip
NAME
: VPCS[1]
IP/MASK
: 172.20.10.2/24
GATEWAY
: 172.20.10.1
DNS
:
MAC
: 00:50:79:66:68:03
LPORT
: 10009
RHOST:PORT : 127.0.0.1:10008
MTU:
: 1500
VPCS> tracer 10.0.0.1
trace to 10.0.0.1, 8 hops max, press Ctrl+C to stop
1 172.20.10.1 9.000 ms 9.001 ms 10.000 ms
2 192.168.20.2 19.001 ms 19.002 ms 19.001 ms
3 *10.0.0.1 29.001 ms (ICMP type:3, code:3, Destination port unreachable)

A # show ip route
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
C 192.168.10.0/24 is directly connected, Loopback0
172.20.0.0/24 is subnetted, 5 subnets
O
172.20.50.0 [110/20] via 192.168.20.6, 00:34:30, FastEthernet0/0
O
172.20.40.0 [110/20] via 192.168.20.5, 00:34:30, FastEthernet0/0
O
172.20.30.0 [110/20] via 192.168.20.4, 00:34:30, FastEthernet0/0
O
172.20.20.0 [110/20] via 192.168.20.3, 00:34:30, FastEthernet0/0
O
172.20.10.0 [110/20] via 192.168.20.1, 00:34:30, FastEthernet0/0
C 192.168.20.0/24 is directly connected, FastEthernet0/0
10.0.0.0/30 is subnetted, 1 subnets
C
10.0.0.0 is directly connected, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 10.0.0.1
C # show ip route
Gateway of last resort is 192.168.20.2 to network 0.0.0.0
C 192.168.10.0/24 is directly connected, Loopback0
172.20.0.0/24 is subnetted, 5 subnets
O
172.20.50.0 [110/20] via 192.168.20.6, 00:35:12, FastEthernet0/0
O
172.20.40.0 [110/20] via 192.168.20.5, 00:35:12, FastEthernet0/0
C
172.20.30.0 is directly connected, FastEthernet0/1
O
172.20.20.0 [110/20] via 192.168.20.3, 00:35:12, FastEthernet0/0
O
172.20.10.0 [110/20] via 192.168.20.1, 00:35:12, FastEthernet0/0
C 192.168.20.0/24 is directly connected, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 192.168.20.2, 00:35:13, FastEthernet0/0
A#show ip ospf neighbor
Neighbor ID
Pri State
Dead
192.168.10.1
1 FULL/DROTHER
192.168.10.2
1 FULL/DROTHER
192.168.10.3
1 FULL/DROTHER
192.168.10.100 1 FULL/DROTHER

Time Address
Interface
00:00:36 192.168.20.6 FastEthernet0/0
00:00:34 192.168.20.5 FastEthernet0/0
00:00:34 192.168.20.4 FastEthernet0/0
00:00:36 192.168.20.1 FastEthernet0/0
- UIGV -

Pg. 7

192.168.10.200

FULL/BDR

00:00:36

192.168.20.3

FastEthernet0/0

C#show ip ospf neighbor


Neighbor ID
Pri State
Dead Time Address
Interface
192.168.10.1
1 2WAY/DROTHER 00:00:38 192.168.20.6 FastEthernet0/0
192.168.10.2
1 2WAY/DROTHER 00:00:36 192.168.20.5 FastEthernet0/0
192.168.10.100 1 2WAY/DROTHER 00:00:37 192.168.20.1 FastEthernet0/0
192.168.10.200 1 FULL/BDR
00:00:38 192.168.20.3 FastEthernet0/0
192.168.10.254 1 FULL/DR
00:00:36 192.168.20.2 FastEthernet0/0

- UIGV -

Pg. 8

También podría gustarte