Introduction
Este documento descreve as configurações iniciais para Open Shortest Path First (OSPF) em links sem broadcast.
Informações de Apoio
Em mídias non-broadcast como Frame Relay, X.25, ATM e Switched Multimegabit Data Service (SMDS), o OSPF pode executar em dois modos:
-
Nonbroadcast Multiaccess (NBMA): simula um modelo de broadcast pela eleição de um roteador designado (DR) e um roteador designado de backup (BDR). Há duas maneiras de simular um modelo de broadcast em uma rede NBMA: defina o tipo de rede como broadcast com o subcomando da interface ip ospf network broadcast ou configure as instruções vizinhas que usam o comando router ospf.
-
Ponto a multiponto: trata a rede sem broadcast como uma coleção de links ponto a ponto pela configuração do comando ip ospf network point-to-multipoint.
Você deve definir o tipo de rede em redes sem broadcast para evitar a configuração de instruções de vizinhos. Este documento fornece configurações de exemplo para OSPF em links sem broadcast. Use o comando show ip ospf interface para verificar o tipo de rede de uma interface que executa o OSPF e o comando show ip ospf neighbor é usado para saber o status do roteador vizinho.
Prerequisites
Requirements
A Cisco recomenda que você compreenda a configuração básica do protocolo de roteamento OSPF .
Componentes Utilizados
As informações neste documento são baseadas nestas versões de software e hardware:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. Se a rede estiver ativa, certifique-se de que você entenda o impacto potencial de qualquer comando.
Diagrama de Rede
Este é o diagrama de rede usado nos exemplos de configuração neste documento.
Configurações para NBMA (Usar Broadcast de Tipo de Rede)
Router1 |
interface Loopback0
ip address 192.0.2.3 255.255.255.255
!
!
interface Serial2
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network broadcast
no keepalive
frame-relay map ip 192.0.2.1 16 broadcast
!
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0 |
Roteador2 |
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Serial1/0
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network broadcast
no keepalive
clockrate 2000000
frame-relay map ip 192.0.2.1 16 broadcast
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
! |
Dicas de verificação
Esta é a saída do comando show para o Roteador 1.
Router1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.2 1 FULL/BDR 00:00:37 192.0.2.1 Serial2
Router1# show ip ospf interface s2
Serial2 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.3, Network Type BROADCAST, Cost: 64
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
E a saída para o Roteador 2 é a seguinte:
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.3 1 FULL/DR 00:00:38 192.0.2.1 Serial1/0
Router2# show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.2, Network Type BROADCAST, Cost: 64
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.3 (Designated Router)
Suppress hello for 0 neighbor(s)
Configurações para NBMA (usar instruções de vizinhos)
Router1 |
interface Loopback0
ip address 192.0.2.3 255.255.255.255
!
interface Serial2
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf priority 2
no keepalive
frame-relay map ip 192.0.2.1 16
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
neighbor 192.0.2.1
! |
Roteador2 |
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Serial1/0
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
no keepalive
clockrate 2000000
frame-relay map ip 192.0.2.1 16
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
neighbor 192.0.2.1
! |
Observação: nas configurações mostradas, o comando ip ospf priority 2 no Router1 define uma prioridade de interface mais alta do que o valor de prioridade padrão 1, o que o torna um DR e o Router2 o BDR para a rede NBMA. Se necessário, você pode definir o valor de prioridade como 0 para configurar um roteador para nunca se tornar um DR/BDR. Isso é necessário em redes de hub e spoke onde o hub deve ser configurado para se tornar o DR, enquanto os spokes não devem ser DR nem BDR. Embora a configuração da instrução neighbor em uma extremidade seja suficiente para formar adjacência, é uma boa prática tê-la configurada em ambas as extremidades, como mostrado. Além disso, os comandos frame-relay map não precisam ter o parâmetro broadcast porque os pacotes OSPF são unicast com a instrução neighbor.
Dicas de verificação
Esta é a saída do comando show para o Roteador 1.
Router1# show ip ospf neighbors
Neighbor ID Pri State Dead Time Address Interface
192.0.2.2 1 FULL/BDR 00:01:39 192.0.2.1 Serial2
Router1# show ip ospf interface s2
Serial2 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.3, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:19
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
E a saída para o Roteador 2 é a seguinte:
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.3 1 FULL/DR 00:01:49 192.0.2.1 Serial1/0
Router2# show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.2, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:01
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.3 (Designated Router)
Suppress hello for 0 neighbor(s)
Configurações para ponto a multiponto
Router1 |
interface Loopback0
ip address 192.0.2.3 255.255.255.255
!
interface Serial2
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
no keepalive
frame-relay map ip 192.0.2.1 16 broadcast
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
! |
Roteador2 |
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Serial1/0
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
no keepalive
clockrate 2000000
frame-relay map ip 192.0.2.1 16 broadcast
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0 |
Dicas de verificação
Esta é a saída do comando show para o Roteador 1.
Router1# show ip ospf neighbors
Neighbor ID Pri State Dead Time Address Interface
192.0.2.2 1 FULL/ - 00:01:53 192.0.2.1 Serial2
Router1# show ip ospf interface s2
Serial2 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.3, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:18
Index 1/1, 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 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.2
Suppress hello for 0 neighbor(s)
E a saída para o Roteador 2 é a seguinte:
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.3 1 FULL/ - 00:01:58 192.0.2.1 Serial1/0
Router2# show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:18
Index 1/1, 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 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.3
Suppress hello for 0 neighbor(s)
Observação: não há DR e BDR eleitos quando a rede NBMA é configurada como ponto a multiponto, como mostrado nas saídas, já que ela é tratada como uma coleção de links ponto a ponto.
Para obter mais informações, consulte Configuração do OSPF.
Informações Relacionadas