Existe una configuración específica para la interfaz en OSPF llamada network type, veremos dos tipos de redes OSPF; point-to-point (Punto a Punto) y broadcast (selección del DR/BDR). También existe el tipo de red non-broadcast que no veremos en este curso ya que se usan en tecnologías antiguas que no soportan broadcast como Frame Relay o ATM.
La configuración le dice al router si debe o no descubrir dinámicamente a los vecinos OSPF (en lugar de requerir la configuración estática de la dirección IP del router vecino) y si el router debe intentar usar un router designado (DR) y un DR de respaldo (BDR) en la subred.
De los dos tipos de red OSPF incluidos en los temas del examen CCNA, ambos hacen que los routers descubran vecinos dinámicamente, pero uno requiere el uso de un DR mientras que el otro no.
La siguiente tabla muestra las características de los dos tipos de red OSPF mencionados en los temas del examen.
Palabra Clave del Network Type | Descubre Vecinos Dinámicamente | Usa un DR/BDR |
---|---|---|
broadcast | Si | Si |
point-to-point | Si | No |
Tipo de Red OSPF de Broadcast
Este es el tipo de red por defecto que usa OSPF en las interfaces. Y si estas siguiendo este curso de CCNA te cuento que es el tipo de red que estuvo configurada en todo éste capítulo de OSPF.
Como sabemos, las redes Ethernet permiten hacer un broadcast, con lo que un solo paquete transmitido por un dispositivo se puede retransmitir en todos sus puertos que se encuentra en la misma subred. Esto es una ventaja para facilitar el descubrimiento automático de vecinos en OSPF.
En la siguiente salida de comando de ejemplo podemos ver el tipo de red:
R1# show ip ospf interface g0/0 GigabitEthernet0/0 is up, line protocol is up Internet Address 10.1.1.1/24, Area 0, Attached via Interface Enable Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Enabled by interface config, including secondary ip addresses Transmit Delay is 1 sec, State DROTHER, Priority 1 Designated Router (ID) 4.4.4.4, Interface address 10.1.1.4 Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.3 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:00 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1/1, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 0, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 3, Adjacent neighbor count is 2 Adjacent with neighbor 3.3.3.3 (Backup Designated Router) Adjacent with neighbor 4.4.4.4 (Designated Router) Suppress hello for 0 neighbor(s)
En algunos casos, es posible que quieras influir en la elección del DR/BDR con dos configuraciones configurables, que se enumeran aquí en orden de precedencia:
- La interfaz OSPF de mayor prioridad: El que tiene el valor más alto gana durante la selección, con valores entre 0 y 255.
- El ID del Router más alto de OSPF: Si las prioridades empatan, la elección es del router con el valor RID OSPF más alto.
R1# configure terminal Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. R1(config)# interface g0/0 R1(config-if)# ip ospf priority 99 R1(config-if)# ^Z R1# R1# show ip ospf interface g0/0 | include Priority Transmit Delay is 1 sec, State DROTHER, Priority 99 R1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 2WAY/DROTHER 00:00:36 10.1.1.2 GigabitEthernet0/0 3.3.3.3 1 FULL/BDR 00:00:30 10.1.1.3 GigabitEthernet0/0 4.4.4.4 1 FULL/DR 00:00:37 10.1.1.4 GigabitEthernet0/0 R1# show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Gi0/1 1 0 10.1.11.1/24 1 DR 0/0 Gi0/0 1 0 10.1.1.1/24 1 DROTH 2/3
Tipo de Red OSPF Point-to-point
Este es el tipo de red más simple. Una red punto a punto es, como su nombre lo describe un enlace entre dos puntos (o routers). Un paquete enviado desde uno de los routers siempre tendrá exactamente un destinatario en el enlace local.
Como puedes imaginar funciona bien para enlaces de datos que, por su naturaleza, tienen solo dos routers en el enlace.
R1# configure terminal Enter configuration commands, one per line. End with CNTL/Z. R1(config)# interface g0/0/0 R1(config-if)# ip ospf network point-to-point R1(config-if)# R1# show ip ospf interface g0/0/0 GigabitEthernet0/0/0 is up, line protocol is up Internet Address 10.1.12.1/24, Area 0, Attached via Interface Enable Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 4 no no Base Enabled by interface config, including secondary ip addresses Transmit Delay is 1 sec, State POINT_TO_POINT Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:01 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/3/3, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 1, maximum is 3 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.2.2.2 Suppress hello for 0 neighbor(s) Last flood scan length is 1, maximum is 3 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.2.2.2 Suppress hello for 0 neighbor(s)
R1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 0 FULL/ - 00:00:39 10.1.12.2 GigabitEthernet0/0/0 ! lines omitted for brevity R1# show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Gi0/0/0 1 0 10.1.12.1/24 4 P2P 1/1 ! lines omitted for brevity