Laboratórios OSPF para CCNP Route
(VERSÃO 1.0)
Sobre o Manual
Manual de Laboratórios utilizado no aprimoramento para prova
CCNP Route 642-902.
Este Manual é distribuído livremente, sem custos.
Foi produzido por André Stato Filho, e pode ser encontrado,
tanto a apostila, como os laboratórios prontos.
A execução dos Labs foi realizada no GNS3, e seus arquivos
encontram-se disponíveis para download em
www.stato.blog.br
.
Índice OSPF LABS
1.
Configuração Básica
2.
Configuração OSPF em Múltiplas Áreas
3.
Configurando ABR e ABSR
4.
Configurando OSPF Stub Área
5.
Configurando Totally Stub Area
6.
Configurando NSSA
7.
Configurando NSSA Total Stub
8.
Configurando Sumarização de Rotas OSPF
9.
Configurando Virtual Links OSPF
10.
Configurando Autenticação OSPF
11.
Configurando Broadcast Multiaccess no OSPF
12.
OSPF sobre Frame-Relay point-to-point sub
interfaces
13.
OSPF sobre Frame-Relay point-to-multipoint
interfaces
Índice OSPF LABS GNS3
1.
OSPF single area
2.
OSPF Multiple Areas
3.
OSPF Configuring ABR and ASBR
4.
OSPF Stub Area
5.
OSPF Totally Stub Area
6.
OSPF Configuring NSSA
7.
OSPF Configuring NSSA Total Stub
8.
Configure OSPF Route Sumarization
9.
Configuring OSPF Virtual Links
10.
Configuring OSPF Authentication
11.
OSPF Broadcast Multiaccess
12.
OSPF over Frame-Relay Point-to-Point
13.
OSPF over Frame-Relay Point-to-Multipoint
Obs.: Esses Lab acima estarão disponíveis para download em
www.stato.blog.br. Cada Lab terá uma pasta com o nome acima, e dentro desta pasta estará disponível, so arquivos .net com a Topologia, onde um estará em branco, que poderá ser usado para treinar, e outro já resolvido. Além disso, as configurações dos roteadores e imagens usadas nesse Lab também estarão disponíveis.
A imagem do roteador usada foi um Cisco 3725 que também estará disponível para download separadamente no site c3725-adventerprisek9-mz.124-
15.T5.bin
Se caso for usar os laboratórios, deverá prestar atenção onde a imagem foi salva para poder alterar o valor contido no arquivo de configuração dos Labs. Por exemplo para o primeiro LAB , EIGRP Básico, existe o arquivo EIGRP-Basic.net, dentro da pasta EIGRP-Basic. Veja abaixo parte do seu contêudo:
autostart = False [127.0.0.1:7200] workingdir = C:\Users\stato\AppData\Local\Temp udp = 10000 [[3725]] image = D:\CCNP\IOS\c3725-adventerprisek9-mz.124-15.T5.bin ram = 128 idlepc = 0x6148b594 ghostios = True
Veja acima que o diretório faz referência ao arquivo c3725-adventerprisek9-mz.124-15.T5.bin em um diretório especifico. Este arquivo é a imagem do IOS , que está no Megaupload. Esse caminho deverá ser alterado, tanto na plataforma Microsoft, como na plataforma Linux. Obviamente , é possível utilizar o Packet Trace para simular esse ambiente. Não sei dizer se todas as features estarão disponíveis no Packet Trace.
OSPF
R1
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0. Distribuir (Advertise) todas as redes em todos roteadores. Configuração R1 R1# en R1#conf t R1#interface serial 0/0 Configuração R2 R2# en R2#conf t R2#interface serial 0/0
R1#ip address 1.1.1.1 255.0.0.0 R1#no shut R1#interface f0/0 R1#ip address 10.1.1.1 255.0.0.0 R1#no shut R1#exit R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 R1#exit
R1#copy run start
R2#ip address 1.1.1.2 255.0.0.0 R2#no shut R2#interface serial 0/1 R2#ip address 2.2.2.1 255.0.0.0 R2#no shut R2#interface f0/0 R2#ip address 20.1.1.1 255.0.0.0 R2#no shut R2#exit R2#router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 0 R2#network 20.0.0.0 0.255.255.255 area 0 R2#exit
R2#copy run start Configuração R3 R3# en R3#conf t R3#interface serial 0/0 R3#ip address 2.2.2.2 255.0.0.0 R3#no shut R3#interface f0/0 R3#ip address 30.1.1.1 255.0.0.0 R3#no shut R3#exit R3#router ospf 1 R3#network 2.2.2.2 0.0.0.0 area 0 R3#network 30.0.0.0 0.255.255.255 area 0 R3#exit
R3#copy run start
Verificação
R1#show ip route
Gateway of last resort is 1.1.1.2 to network 2.0.0.0
C 1.0.0.0/8 is directly connected, Serial0/0
O 2.0.0.0/8 [110/128] via 1.1.1.2, 00:12:25, Serial0/0 O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:12:07, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O 30.0.0.0/8 [110/138] via 1.1.1.2, 00:11:24, Serial0/0
Rotas OSPF são exibidas com rotas “O” na tabela de roteamento.
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 20.1.1.1 0 FULL/ - 00:00:31 1.1.1.2 Serial0/0
O simbolo de hifem (-) indica que o vizinho está em uma interface serial e DR e BDR não são usados em point-to-point interfaces.
R1#show ip ospf
Routing Process "ospf 1" with ID 10.1.1.1
Este comando exibe OSPF router-id.
Tarefa 2: Configurar interfaces loopback em cada roteador conforme abaixo, avisar todos os roteadores de todas as rotas , e verificar router-id.
R1 Loopback 0 6.6.6.6 R2 Loopback 0 7.7.7.7 R3 Loopback 0 8.8.8.8 Configuração R1 R1#interface loopback 0 R1#ip address 6.6.6.6 255.255.255.255 R1#Router ospf 1 R1#network 6.6.6.6 0.0.0.0 area 0 Configuração R2 R2#interface loopback 0 R2#ip address 7.7.7.7 255.255.255.255 R2#Router ospf 1 R2#network 7.7.7.7 0.0.0.0 area 0 Configuração R3 R3#interface loopback 0 R3#ip address 8.8.8.8 255.255.255.255 R3#Router ospf 1 R3#network 8.8.8.8 0.0.0.0 area 0
Obs: Talvez seja necessário reiniciar o router, ou rodar opcionalmente o comando “clear ip ospf process”, para que as configurações sejam efetivadas.
Verificação:
R1#show ip ospf
Routing Process "ospf 1" with ID 6.6.6.6
Repita o procedimento para R2 e R3. Poderemos visualizar que o router-id em cada router será o valor da interface loopback. O OSPF dá preferencia para loopback.
Tarefa 3 : Configurar OSPF na area 0. Distribuir (Advertise) todas as redes em todos roteadores.Alterar RouterID conforme informado abaixo:
R2 4.4.4.4 R3 5.5.5.5 Configuração R1 R1#Router ospf 1 R1#Router-id 3.3.3.3 Configuração R2 R2#Router ospf 1 R2#Router-id 4.4.4.4 Configuração R3 R3#Router ospf 1 R3#Router-id 5.5.5.5
Obs: Da mesma forma que a tarefa anterior, talvez seja necessário executar o comand o “clear ip ospf process”.
Verificação
R1#show ip ospf
Routing Process "ospf 1" with ID 3.3.3.3
Nesta tarefa, podemos verificar que quando especificado o valor do router-id, não será mais usado a valor da loopback.
LAB 2 – Configuração OSPF em Múltiplas Áreas
In
R1
IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0. Distribuir (Advertise) todas as redes em todos roteadores.
Configure OSPF na Area 0 em R1 ( S0 ), R2 ( S0, E0 ). Configure OSPF na Area 1 em R1 ( E0 ).
Configure OPSF na Area 2 em R2 ( S1 ), R3 ( S0, E0 )
Configuração R1 R1#Router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 1 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 2 R2#network 20.0.0.0 0.255.255.255 area 0 Configuração R3 R3#Router ospf 1 R3#network 2.2.2.2 0.0.0.0 area 2 R3#network 30.0.0.0 0.255.255.255 area 2 Verificação R1#show ip route
Gateway of last resort is 1.1.1.2 to network 2.0.0.0
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:14:00, Serial0/0 O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:13:20, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O IA 30.0.0.0/8 [110/138] via 1.1.1.2, 00:12:48, Serial0/0
A saida exibe rotas O e O IA.
R1#show ip ospf border-routers
OSPF Process 1 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 20.1.1.1 [64] via 1.1.1.2, Serial0/0, ABR, Area 0, SPF 6
R2#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/1
C 20.0.0.0/8 is directly connected, FastEthernet0/0 O IA 10.0.0.0/8 [110/74] via 1.1.1.1, 00:18:30, Serial0/0 O 30.0.0.0/8 [110/74] via 2.2.2.2, 00:17:12, Serial0/1
R2#show ip ospf border-routers
OSPF Process 1 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 10.1.1.1 [64] via 1.1.1.1, Serial0/0, ABR, Area 0, SPF 4
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:19:31, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O IA 20.0.0.0/8 [110/74] via 2.2.2.1, 00:19:31, Serial0/0 O IA 10.0.0.0/8 [110/138] via 2.2.2.1, 00:19:31, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
Tarefa 2 : Manipular o valor de tempo de Hello-interval no roteador R1, e verificar vizinhança.
Configuração R1
R1#interface serial 0/0 R1#ip ospf hello-interval 5
Verificação antes da alteração:
R1#show ip ospf interface serial 0/0
Serial0/0 is up, line protocol is up Internet Address 1.1.1.1/8, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 20.1.1.1 0 FULL/ - 00:00:37 1.1.1.2 Serial0/0
Verificação após a alteração:
R1#show ip ospf interface serial 0/0
*Mar 1 00:33:45.099: %SYS-5-CONFIG_I: Configured frointerface serial 0/0 Serial0/0 is up, line protocol is up
Internet Address 1.1.1.1/8, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
R1#show ip ospf neighbor
---NADA---
R1#debug ip ospf events
*Mar 1 00:35:22.383: OSPF: Rcv hello from 20.1.1.1 area 0 from Serial0/0 1.1.1.2 *Mar 1 00:35:22.387: OSPF: Mismatched hello parameters from 1.1.1.2
LAB 3 – Configurando ABR e ABSR
In
R1
Subnet Mask
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Distribuir (Advertise) conforme abaixo.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0 ). Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0, F0/0 )
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 R2#router eigrp 100 R2#network 20.0.0.0 R2#router ospf 1
R2#redistribute eigrp 100 metric 10 subnets Configuração R3
R3#Router ospf 1
R3#network 2.2.2.2 0.0.0.0 area 1
R3#network 30.0.0.0 0.255.255.255 area 1
Verificação :
R1#show ip ospf interface serial 0/0
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:05:27, Serial0/0 O E2 20.0.0.0/8 [110/10] via 1.1.1.2, 00:03:10, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O IA 30.0.0.0/8 [110/138] via 1.1.1.2, 00:04:28, Serial0/0
Obs: Se você deseja que a rota seja do tipo O E1, então deverá configurar usando “metric-type”
Configuração R2
R2#Router ospf 1
R2#redistribute eigrp 100 metric-type 1 metric 10 subnets
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:09:19, Serial0/0 O E1 20.0.0.0/8 [110/74] via 1.1.1.2, 00:00:07, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O IA 30.0.0.0/8 [110/138] via 1.1.1.2, 00:08:19, Serial0/0
Agora vamos verificar qual roteador é ABR / ASBR.
O ABR ( Area Border Router), que é um roteador conectado em areas diferentes, e o ASBR ( Autonomous System Bondary Router ), que é um roteador executando outro protocolo de roteamento diferente do OSPF, e redistribuindo essas rotas dentro do processo OSPF.
R1#show ip ospf border-routers
OSPF Process 1 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 20.1.1.1 [64] via 1.1.1.2, Serial0/0, ABR/ASBR, Area 0, SPF 5
LAB 4 – Configurando OSPF Stub Área
R1
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Distribuir (Advertise) conforme abaixo.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0 ). Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0, F0/0 )
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 Configuração R3 R3#Router ospf 1 R3#network 2.2.2.2 0.0.0.0 area 1 R3#network 30.0.0.0 0.255.255.255 area 1
Tarefa 2 : Configurar EIGRP AS 100 em R2 (f0/0) e redistriuir dentro do OSPF.
Configuração R2
R2# router eigrp 100 R2#network 20.0.0.0 R2# no auto-sumary
R2#router ospf 1
R2#redistribute eigrp 100 metric 10 subnets
Verificação :
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:01:18, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O E2 20.0.0.0/8 [110/10] via 2.2.2.1, 00:00:05, Serial0/0 O IA 10.0.0.0/8 [110/138] via 2.2.2.1, 00:01:18, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
A saida mostra rotas inter-area ( O IA) and OSPF external tipo 2 ( O E2)
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 134 0x80000003 0x00C581 2 30.1.1.1 30.1.1.1 233 0x80000003 0x0044C0 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 1.0.0.0 20.1.1.1 508 0x80000001 0x0035AF 10.0.0.0 20.1.1.1 508 0x80000001 0x0024AD
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 20.0.0.0 20.1.1.1 133 0x80000001 0x00B4CA 0
Tarefa 3 : Configurar OSPF Area 1 como Stub. Após isso verifique tabela de rotas em R3.
Configuração R2 R1#router ospf 1 R1#Area 1 stub Configuração R3 R2#Router ospf 1 R2#Area 1 stub Verificação:
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 10.1.1.1 0 FULL/ - 00:00:33 1.1.1.1 Serial0/0 30.1.1.1 0 FULL/ - 00:00:31 2.2.2.2 Serial0/1
R3#show ip route
Gateway of last resort is 2.2.2.1 to network 0.0.0.0
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:01:04, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O IA 10.0.0.0/8 [110/138] via 2.2.2.1, 00:01:04, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0 O*IA 0.0.0.0/0 [110/65] via 2.2.2.1, 00:01:04, Serial0/0
A saida exibe rota default e rotas inter-area, ambas designadas com “OIA” na tabela de roteamento.
A rota default é exibida como O* IA.
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 185 0x80000005 0x00D96F 2 30.1.1.1 30.1.1.1 184 0x80000005 0x0058AE 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 20.1.1.1 216 0x80000001 0x00E73F 1.0.0.0 20.1.1.1 216 0x80000002 0x005194 10.0.0.0 20.1.1.1 216 0x80000002 0x004092
Obs: Se Stub não está configurado em ambos roteadores OSPF, a vizinhaça não será estabelecida. Isto pode ser verificado , após remover o stub de um dos roteadores ( R2,R3) com o seguinte comando.
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 20.1.1.1 0 DOWN/ - - 2.2.2.1 Serial0/0
R3#show ip ospf neighbor
*Mar 1 00:23:30.231: OSPF: Rcv hello from 30.1.1.1 area 1 from Serial0/1 2.2.2.2
LAB 5 – Configurando Totally Stub Area
R1
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Distribuir (Advertise) conforme abaixo.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0 ). Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0, F0/0 )
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0
R1#network 10.0.0.0 0.255.255.255 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 Configuração R3
R3#Router ospf 1
R3#network 2.2.2.2 0.0.0.0 area 1
R3#network 30.0.0.0 0.255.255.255 area 1
Tarefa 2 : Configurar EIGRP AS 100 em R2 (f0/0) e redistriuir dentro do OSPF.
Configuração R2
R2# router eigrp 100 R2#network 20.0.0.0 R2# no auto-sumary
R2#router ospf 1
R2#redistribute eigrp 100 metric 10 subnets
Verificação :
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:01:18, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O E2 20.0.0.0/8 [110/10] via 2.2.2.1, 00:00:05, Serial0/0 O IA 10.0.0.0/8 [110/138] via 2.2.2.1, 00:01:18, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
A saida mostra rotas inter-area ( O IA) and OSPF external tipo 2 ( O E2)
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 134 0x80000003 0x00C581 2 30.1.1.1 30.1.1.1 233 0x80000003 0x0044C0 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 1.0.0.0 20.1.1.1 508 0x80000001 0x0035AF 10.0.0.0 20.1.1.1 508 0x80000001 0x0024AD
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 20.0.0.0 20.1.1.1 133 0x80000001 0x00B4CA 0
A saida exibe links net sumarizados e AS external type-5. Agora, para block de ambos , configure Area 1 como total stub.
Tarefa 3 : Configurar R2 e R3 como total stub.
Configuração R2
R1#router ospf 1
R1#Area 1 stub no-summary
Configuração R3
R2#Router ospf 1
R2#Area 1 stub no-summary
Verificando tabela de roteamento de R3
R3#show ip route
Gateway of last resort is not set
C 2.0.0.0/8 is directly connected, Serial0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0 O*IA 0.0.0.0/0 [110/65] via 2.2.2.1, 00:00:02, Serial0/0
Inter-area e rotas externas não são mais visiveis na tabela de roteamente, mas são acessiveis através da rota inter-area default ( O *IA)
Verificando database OSPF
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 131 0x80000006 0x00D770 2 30.1.1.1 30.1.1.1 130 0x80000006 0x0056AF 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 20.1.1.1 386 0x80000001 0x00E73F
LAB 6 – Configurando NSSA
R1
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Distribuir (Advertise) conforme abaixo.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0 ). Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0)
Configuração R1
R1#router ospf 1
Configuração R2
R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 Configuração R3 R3#Router ospf 1 R3#network 2.2.2.2 0.0.0.0 area 1
Tarefa 2 : Configure EIGRP AS 100 no R2 (F0) e redistribuia dentro de OSPF.
Configuração R2
R2#router eigrp 100 R2#network 20.0.0.0 R2#no auto-sumary
R2#router ospf 1
R2#redistribute eigrp 100 metric 10 subnets
Tarefa 3 : Configure RIP v2 no R1 (F0) e R3 (F0) e redistribuia dentro do OSPF.
Configuração R1 R1#router rip R1#version 2 R1#no auto-summary R1#network 10.0.0.0 R1#router ospf 1
R1#redistribute rip metric 10 subnets
Configuração R2 R2#router rip R2#version 2 R2#no auto-summary R2#network 30.0.0.0 R2#router ospf 1
R2#redistribute rip metric 10 subnets
Verificação:
Verificando tabela de roteamento de R3
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:33:20, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O E2 20.0.0.0/8 [110/10] via 2.2.2.1, 00:23:37, Serial0/0 O E2 10.0.0.0/8 [110/10] via 2.2.2.1, 00:20:56, Serial0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0
A saida exibe somente rotas inter-area (O IA) e rotas external type-2 (O E2).
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 1480 0x80000003 0x00C581 2 30.1.1.1 30.1.1.1 1246 0x80000002 0x00AF8E 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 1.0.0.0 20.1.1.1 131 0x80000002 0x0033B0
Summary ASB Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.1.1.1 20.1.1.1 1319 0x80000001 0x009047
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 10.0.0.0 10.1.1.1 1325 0x80000001 0x009102 0 20.0.0.0 20.1.1.1 1479 0x80000001 0x00B4CA 0 30.0.0.0 30.1.1.1 1287 0x80000001 0x00D793 0
O ospf database exibe rotas Summary Net Link States e Type-5 ExternalLink States, está ultima não sera utilizada na rede NSSA. Pois a mesma utiliza-se do Type-7 para redistribuir um rota externa.
Agora iremos confiurar NSSA em R2 e R3, onde Rw atuará como NSSA ASBR que gerá LSA do type-7 na R2 atuará como NSSA ABR que converte LSA tipo-7 para LSA tipo-5, quando a área estiver up.
Tarefa 4 : Configure R2 e R3 como NSSA.
Configuração R2
R2#router ospf 1
R2#area 1 nssa default-information-originate
Configuração R3
R3#router ospf 1
R3#area 1 nssa default-information-originate
Verificação:
Verificando routas em R3:
R3#show ip route
Gateway of last resort is 2.2.2.1 to network 0.0.0.0
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:00:41, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O N2 20.0.0.0/8 [110/10] via 2.2.2.1, 00:00:41, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0 O*N2 0.0.0.0/0 [110/1] via 2.2.2.1, 00:00:41, Serial0/0
A saída exibe rotas ‘O N2’ e ‘O *N2’ na tabela de roteamento.
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 148 0x80000006 0x0065D8 2 30.1.1.1 30.1.1.1 147 0x80000004 0x0051E4 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 1.0.0.0 20.1.1.1 190 0x80000003 0x00D606
Type-7 AS External Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 20.1.1.1 190 0x80000001 0x004357 0 20.0.0.0 20.1.1.1 189 0x80000001 0x0098E4 0 30.0.0.0 30.1.1.1 151 0x80000001 0x00A7B1 0
Não há Type-5 External Link States mas Type-7 são permitidos.
R2#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/1
C 20.0.0.0/8 is directly connected, FastEthernet0/0 O E2 10.0.0.0/8 [110/10] via 1.1.1.1, 00:05:36, Serial0/0
O N2 30.0.0.0/8 [110/10] via 2.2.2.2, 00:04:48, Serial0/1
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:49:10, Serial0/0 O E2 20.0.0.0/8 [110/10] via 1.1.1.2, 00:38:45, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O E2 30.0.0.0/8 [110/10] via 1.1.1.2, 00:05:10, Serial0/0
Podemos ver que no R2, existem rotas NSSA e OE, justamente por ele atuar como NSSA ABR, pois o mesmo possui uma interface no BackBone (area 0), e o R3, por não possui interfaces na area 0 é considerado NSSA ASBR. Já o R1 simplismente recebe as rotas de R2 já convertidas para tipo-5 que são rotas externas somentes.
Como podemos ver abaixo:
OSPF Router with ID (10.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count 10.1.1.1 10.1.1.1 484 0x80000004 0x002049 2 20.1.1.1 20.1.1.1 667 0x80000004 0x000E4F 2
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum 2.0.0.0 20.1.1.1 1178 0x80000002 0x0026BC
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 10.0.0.0 10.1.1.1 484 0x80000002 0x008F03 0 20.0.0.0 20.1.1.1 667 0x80000002 0x00B2CB 0 30.0.0.0 20.1.1.1 507 0x80000001 0x0096D6 0
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Distribuir (Advertise) conforme abaixo.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0 ). Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0)
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 Configuração R3 R3#Router ospf 1 R3#network 2.2.2.2 0.0.0.0 area 1
Configuração R2
R2#router eigrp 100 R2#network 20.0.0.0 R2#no auto-sumary
R2#router ospf 1
R2#redistribute eigrp 100 metric 10 subnets
Tarefa 3 : Configure RIP v2 no R1 (F0) e R3 (F0) e redistribuia dentro do OSPF.
Configuração R1 R1#router rip R1#version 2 R1#no auto-summary R1#network 10.0.0.0 R1#router ospf 1
R1#redistribute rip metric 10 subnets
Configuração R2 R2#router rip R2#version 2 R2#no auto-summary R2#network 30.0.0.0 R2#router ospf 1
R2#redistribute rip metric 10 subnets
Verificação:
Verificando tabela de roteamento de R3
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:33:20, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O E2 20.0.0.0/8 [110/10] via 2.2.2.1, 00:23:37, Serial0/0 O E2 10.0.0.0/8 [110/10] via 2.2.2.1, 00:20:56, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
A saida exibe somente rotas inter-area (O IA) e rotas external type-2 (O E2).
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 1480 0x80000003 0x00C581 2 30.1.1.1 30.1.1.1 1246 0x80000002 0x00AF8E 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 1.0.0.0 20.1.1.1 131 0x80000002 0x0033B0
Summary ASB Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.1.1.1 20.1.1.1 1319 0x80000001 0x009047
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 10.0.0.0 10.1.1.1 1325 0x80000001 0x009102 0 20.0.0.0 20.1.1.1 1479 0x80000001 0x00B4CA 0 30.0.0.0 30.1.1.1 1287 0x80000001 0x00D793 0
O database OSPF exibe somente net link states, type-5 external net link states.
Tarefa 4 : Configure R2 e R3 como NSSA Total Stub.how
Configuração R2
R2#router ospf 1
R2#area 1 nssa default-information-originate
Configuração R3
R3#router ospf 1
R3#area 1 nssa default-information-originate
R3#show ip route
Gateway of last resort is not set
Gateway of last resort is 2.2.2.1 to network 0.0.0.0
C 2.0.0.0/8 is directly connected, Serial0/0
O N2 20.0.0.0/8 [110/10] via 2.2.2.1, 00:00:35, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0 O*IA 0.0.0.0/0 [110/65] via 2.2.2.1, 00:00:35, Serial0/0
Tabela de roteamento exibe somente rotas N2 e OI*A.
R3#show ip ospf database
OSPF Router with ID (30.1.1.1) (Process ID 1)
Link ID ADV Router Age Seq# Checksum Link count 20.1.1.1 20.1.1.1 142 0x80000005 0x0067D7 2 30.1.1.1 30.1.1.1 141 0x80000005 0x004FE5 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 20.1.1.1 174 0x80000001 0x006FAF
Type-7 AS External Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Tag 20.0.0.0 20.1.1.1 173 0x80000001 0x0098E4 0 30.0.0.0 30.1.1.1 147 0x80000001 0x00A7B1 0
Não há External Link States, nem Summary Link Type-3, somente External Link State Type-7. Neste tipo de estrutura.
Não são permitidos os type3,type5, ou seja, não existira inter-area, external-area, sendo que existirá uma rota de saida padrão com O*IA, e será permitido redistribuição como um ASBR, a partir deste, usando o type-7.
A partir do ABR os pacotes serão convertidos em type-5, e inseridos em R1 como E2, ou seja, external-rotas.
LAB 8 – Configurando Sumarização de Rotas OSPF
R1
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0 f0/0 30.1.1.1 255.0.0.0 Loopback 0 172.168.0.1 255.255.255.0 Loopback 1 172.168.1.1 255.255.255.0 Loopback 2 172.168.2.1 255.255.255.0 Loopback 3 172.168.3.1 255.255.255.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Configurar Loopbacks em R3 e sumarização de rotas.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0 ).
Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0, Loopback 0 - 3)
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 R2#network 20.0.0.0 0.255.255.255 area 1 Configuração R3 R3#Int loopback 0 R3#Ip add 172.168.0.1 255.255.255. 0 R3#Ip ospf network point-to-point
R3#Int loopback 1
R3#Ip add 172.168.1.1 255.255.255. 0 R3#Ip ospf network point-to-point
R3#Int loopback 2
R3#Ip add 172.168.2.1 255.255.255. 0 R3#Ip ospf network point-to-point
R3#Int loopback 3
R3#Ip add 172.168.3.1 255.255.255. 0 R3#Ip ospf network point-to-point
R3#Router ospf 1
R3#Network 2.2.2.2 0.0.0.0 area 1
R3#Network 30.0.0.0 0.255.255.255 area 1
Antes de fazermos a configuração da sumarização em R2, veremos a tabela de roteamento do R1.
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:26:06, Serial0/0 O IA 20.0.0.0/8 [110/74] via 1.1.1.2, 00:12:56, Serial0/0 O IA 30.0.0.0/8 [110/74] via 1.1.1.2, 00:12:56, Serial0/0 172.168.0.0/24 is subnetted, 4 subnets O IA 172.168.0.0 [110/129] via 1.1.1.2, 00:00:10, Serial0/0 O IA 172.168.1.0 [110/129] via 1.1.1.2, 00:00:10, Serial0/0 O IA 172.168.2.0 [110/129] via 1.1.1.2, 00:00:10, Serial0/0 O IA 172.168.3.0 [110/129] via 1.1.1.2, 00:00:10, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0
Neste momento não existe nenhuma sumarização de rotas, então as rotas estão sendo avisadas ,como rotas intra individualmente.
Agora vamos para a sumarização em R2 que é o nosso ABR.
Configuração R2
R2#router ospf 1
R2#area 1 range 172.168.0.0 255.255.252.0
Verificação:
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:30:09, Serial0/0 O IA 20.0.0.0/8 [110/74] via 1.1.1.2, 00:16:59, Serial0/0 172.168.0.0/22 is subnetted, 1 subnets
O IA 172.168.0.0 [110/129] via 1.1.1.2, 00:00:05, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0
A saida nos mostra agora um tabela de roteamento bem menor, exibindo somente rota sumarizada para redes que configuramos anteriormente.
A interface point-to-point faz com que o OSPF forme um adjacencia com duas interfaces , tipo P-2-P, evitando a eleição de um DR ou BDR.
Tarefa 2 : Anuncie as loopbacks recêm criadas em um AS EIGRP 100 usando o comando network e redistribuir estas redes dentro do OSPF area 1. Estas rotas deveriam ser vistas como um simples rota sumarizada.
Configuração R3 R1#router eigrp 100 R1#network 172.168.0.0 R1#No auto-summary R1# R1#router ospf 1
R1#no network 172.168.0.0 0.0.255.255 area 1 R1#redistribute eigrp 100 metric 10 subnets R1#summary-address 172.168.0.0 255.255.252.0
Verificação:
R2#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/1
C 20.0.0.0/8 is directly connected, FastEthernet0/0 172.168.0.0/22 is subnetted, 1 subnets
O E2 172.168.0.0 [110/10] via 2.2.2.2, 00:06:31, Serial0/1 O 10.0.0.0/8 [110/74] via 1.1.1.1, 02:48:00, Serial0/0 O 30.0.0.0/8 [110/74] via 2.2.2.2, 00:03:31, Serial0/1
A saída exibe rota tabela de roteamento menor, e agora com um rotas external E2.
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:07:35, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O 20.0.0.0/8 [110/74] via 2.2.2.1, 00:07:35, Serial0/0 172.168.0.0/16 is variably subnetted, 5 subnets, 2 masks C 172.168.0.0/24 is directly connected, Loopback0 O 172.168.0.0/22 is a summary, 00:07:39, Null0 C 172.168.1.0/24 is directly connected, Loopback1 C 172.168.2.0/24 is directly connected, Loopback2 C 172.168.3.0/24 is directly connected, Loopback3
O IA 10.0.0.0/8 [110/138] via 2.2.2.1, 00:07:35, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
A saída exibe um rotas sumarizada apontando para a interface null 0 na tabela de roteamento de R3. Está interface é gerada automáticamente por padrão, quando é configurado
sumarização manualmente de forma a evitar loops de roteamente, sendo que não haverá re-injeção de rotas.
LAB 9 – Configurando Virtual Links OSPF
R1
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
s0/0 2.2.2.2 255.0.0.0
Tarefa 1 : Configurar OSPF na area 0 e area 1. Configurar Loopbacks em R3 e sumarização de rotas.
Configure OSPF na Area 0 em R1 ( S0, F0/0 ) e R2 ( S0, F/0 ). Configure OSPF na Area 1 em R2 ( S0/1 ) e R3 ( S0).
Configure OSPF na Area2 em R3 (F0/0).
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 2.2.2.1 0.0.0.0 area 1 R2#network 20.0.0.0 0.255.255.255 area 0 Configuração R3 R3#Router ospf 1 R3#Network 2.2.2.2 0.0.0.0 area 1 R3#Network 30.0.0.0 0.255.255.255 area 2 Verificação: R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:04:32, Serial0/0 O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:01:21, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0
A saída exibe rotas para 20.0.0.0 como O e para 2.0.0.0 como “O IA”, mas não há rotas para a rede 30.0.0.0, como ele não está conectada a area 0 ou area 1.
Nós precisamos configurar um virtual link entre R2 e R3 e está area que está conectada a area zero é chamada de area de transito. Normalmente usamos para conectar duas area 0, quando passam por outra area , por exemplo , na fusão de duas empresas que já usavam OSPF. Cada roteador R2 e R3 aponta para o router-id do outro roteador.
Tarefa 2 :Configurar Virtual Link entre R2 e R3.
Configuração R2 R#router ospf 1 R2#area 1 virtual-link 30.1.1.1 Configuração R3 R3#Router ospf 1 R2#area 1 virtual-link 20.1.1.1
Verificação:
Verificando agora a tabela de roteamento em R1, depois que R2 e R3 foram configurados.
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:12:22, Serial0/0 O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:09:10, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O IA 30.0.0.0/8 [110/138] via 1.1.1.2, 00:00:11, Serial0/0
A saída agora exibe a rede 30.0.0.0 como um rota “O IA”. O router 1 Assume que ele está na area 1.
R2#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 30.1.1.1 is up Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial0/1, Cost of using 64 Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:05
Adjacency State FULL (Hello suppressed)
Index 2/3, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
Podemos visualizar na saida do comando virtual-links que a rede 30.1.1.1 em R2 está up. E não são permitidos contabilização de LSA em “DoNotAge LSA allowed”. É possivel verificar isto através do comando “show ip ospf database”, onde o status 30.1.1.1 tem idade ( Age) 1 , seguinda de DNA, e este valor de um nunca é alterado.
Tarefa 3 : Configurar Virtual-Links entre duas áreas backbones.
Configure OSPF na Area 0 em R1 ( F0/0 ).
Configure OSPF na Area 1 em R1( S0/0), R2 ( S0/0 ).
Configure OSPF na Area0 em R2 (S0/1, F0/0), R3(S0/0, F0/0).
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 1 R1#network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#Router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 1 R2#network 2.2.2.1 0.0.0.0 area 0 R2#network 20.0.0.0 0.255.255.255 area 0
Configuração R3
R3#Router ospf 1
R3#Network 2.2.2.2 0.0.0.0 area 0
R3#Network 30.0.0.0 0.255.255.255 area 0
Verificação:
Verificando agora a tabela de roteamento em R1.
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O IA 2.0.0.0/8 [110/128] via 1.1.1.2, 00:01:25, Serial0/0 O IA 20.0.0.0/8 [110/74] via 1.1.1.2, 00:01:35, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O IA 30.0.0.0/8 [110/138] via 1.1.1.2, 00:00:05, Serial0/0
A saída exibe as redes 2.0.0.0, 20.0.0.0 e 30.0.0.0 como rotas O IA.
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:03:00, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O 20.0.0.0/8 [110/74] via 2.2.2.1, 00:03:00, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
Podemos ver as rotas também em R3, e vemos que a rede 10.0.0.0 existe como rota O IA.
Tarefa 3 : Configurar Virtual-Links entre R1 e R2.
Configuração R1 R1#router ospf 1 R1#area 1 virtual-link 20.1.1.1 Configuração R3 R2#Router ospf 1 R2#area 1 virtual-link 10.1.1.1 Verificação:
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O 2.0.0.0/8 [110/128] via 1.1.1.2, 00:00:12, Serial0/0 O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:00:12, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0 O 30.0.0.0/8 [110/138] via 1.1.1.2, 00:00:12, Serial0/0
R2#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/1
C 20.0.0.0/8 is directly connected, FastEthernet0/0 O 10.0.0.0/8 [110/74] via 1.1.1.1, 00:01:53, Serial0/0 O 30.0.0.0/8 [110/74] via 2.2.2.2, 00:07:55, Serial0/1
R3#show ip route
Gateway of last resort is not set
O IA 1.0.0.0/8 [110/128] via 2.2.2.1, 00:08:35, Serial0/0 C 2.0.0.0/8 is directly connected, Serial0/0
O 20.0.0.0/8 [110/74] via 2.2.2.1, 00:08:35, Serial0/0 O 10.0.0.0/8 [110/138] via 2.2.2.1, 00:02:22, Serial0/0 C 30.0.0.0/8 is directly connected, FastEthernet0/0
Podemos agora verificar a tabela de roteamento em R1,R2 e R3, e podemos ver que todas rotas O IA são anunciadas como rotas “O”, ou seja, os roteadores estão assumindo que estas redes estão na mesma área, por causa do virtual link.
Também podemos ver que a rede 10.0.0.0 em R3 como rota O. Somente a rede 1, que pertence a área 1, está sendo vista como rota O IA.
R1
interface Ip Address Subnet Mask
s0/0 1.1.1.1 255.0.0.0
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
s0/0 1.1.1.2 255.0.0.0
s0/0 2.2.2.1 255.0.0.0
f0/0 20.1.1.1 255.0.0.0
Tarefa 1 : Todos roteadores devem autenticar atualizações usando o método de autenticação de senha simples ( simple password ). Usar a key-string cisco123.
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 R1#conf t R1#int s0/0
R1#ip ospf authentication-key cisco123 R1#ip ospf authentication
Configuração R2 R2#router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 20.0.0.0 0.255.255.255 area 0 R2#conf t R2#int s0/0
R2#ip ospf authentication-key cisco123 R2#ip ospf authentication
Verificação:
Verificando agora a tabela de roteamento em R1, depois que R2 e R3 foram configurados.
Neighbor ID Pri State Dead Time Address Interface 20.1.1.1 0 FULL/ - 00:00:37 1.1.1.2 Serial0/0
A saída exibe o vizinho no estado full. Pelo fato das senha coincidirem é feita vizinha ospf entre os roteadores.
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:06:59, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0
Tarefa 2 : Todos roteadores devem autenticar atualizações usando o mais seguro método de autenticação. Use chaveiro ( key ) 1 com key-string cisco123. Não use autenticação simples.
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1#network 10.0.0.0 0.255.255.255 area 0 R1#conf t R1#Int S0/0
R1#Ip ospf message-digest-key 1 md5 cisco123
R1#Ip ospf authentication message-digest
Configuração R2 R2#router ospf 1 R2#network 1.1.1.2 0.0.0.0 area 0 R2#network 20.0.0.0 0.255.255.255 area 0 R2#conf t R2#Int S0/0
R2#Ip ospf message-digest-key 1 md5 cisco123
R2#Ip ospf authentication message-digest
Verificação:
Neighbor ID Pri State Dead Time Address Interface 20.1.1.1 0 FULL/ - 00:00:37 1.1.1.2 Serial0/0
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:06:59, Serial0/0 C 10.0.0.0/8 is directly connected, FastEthernet0/0
Mar 1 00:25:02.479: OSPF: Rcv pkt from 1.1.1.2, Serial0/0 : Mismatch Authentication type. Input packet specified type 0, we use type 2
Quando é informado que estamos o usando autenticação do tipo 2, isso quer dizer que usamos criptgrafia, no caso md5.
No tarefa anterior o tipo seria 1, sem criptografia.
LAB 11 – Configurando Broadcast Multi-access no OSPF
R1
interface Ip Address Subnet Mask
f0/0 10.1.1.1 255.0.0.0
R2
interface Ip Address Subnet Mask
f0/0 10.1.1.2 255.0.0.0
R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask
f0/0 10.1.1.3 255.0.0.0
Tarefa 1 : Configurar OSPF conforme senário
Configuração R1 R1#int f0/0 R1#ip address 10.1.1.1 255.0.0.0 R1#router ospf 1 Configuração R2 R2#int f0/0 R2#ip address 10.1.1.2 255.0.0.0 R2#router ospf 1
R1#network 10.0.0.0 0.255.255.255 area 0 R2#network 10.0.0.0 0.255.255.255 area 0 Configuração R3 R3#int f0/0 R3#ip address 10.1.1.3 255.0.0.0 R3#router ospf 1 R3#network 10.0.0.0 0.255.255.255 area 0 Verificação:
Poderemos verificar a eleição do DR e BDR usando os comando abaixo:
R1#show ip ospf neigbor
Neighbor ID Pri State Dead Time Address Interface 10.1.1.2 1 FULL/BDR 00:00:33 10.1.1.2 FastEthernet0/0 10.1.1.3 1 FULL/DR 00:00:35 10.1.1.3 FastEthernet0/0
R2#show ip ospf interface
FastEthernet0/0 is up, line protocol is up Internet Address 10.1.1.2/8, Area 0
Process ID 1, Router ID 10.1.1.2, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 10.1.1.3, Interface address 10.1.1.3 Backup Designated router (ID) 10.1.1.2, Interface address 10.1.1.2 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40
Hello due in 00:00:06
Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue length 0 Next 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 2, Adjacent neighbor count is 2 Adjacent with neighbor 10.1.1.1
Adjacent with neighbor 10.1.1.3 (Designated Router) Suppress hello for 0 neighbor(s)
Alguns itens à serem levados em conta: • Roteador noficam DR em 224.0.0.6
• DR notifica outros roteadores em 224.0.0.5
• O roteador com o maior valor de prioridade é o DR ( No nosso caso todas são iguais, então a maior interface , caso não esteja usando loopback)
• O roteador com o segundo maior valor de prioridade será o BDR. • A prioridade padrão para interface é 1.
• Em caso de empate, o router-id mais alto é preferido.
• Um roter com prioridade definida como 0 não pode tornar-se DB/BDR e é chamado e outro DR OUTHER.
• Para alterar a prioridade basta executar o comando “ip ospf priority valor” , onde valor poderá ser de 0 até 255. Este comando deverá ser executado na interface. •
LAB 12 – OSPF sobre Frame-Relay point-to-point sub interfaces
R1
interface Ip Address Subnet Mask Local
DLCI Conecta com s0/0.1 1.1.1.1 255.0.0.0 101 R2 s0/0.2 2.2.2.1 255.0.0.0 102 R3 f0/0 10.1.1.1 255.0.0.0 R2
interface Ip Address Subnet Mask Local
DLCI Conecta com s0/0 1.1.1.2 255.0.0.0 101 R1 f0/0 20.1.1.1 255.0.0.0 R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask Local
DLCI
Conecta com
s0/0 2.2.2.2 255.0.0.0 102 R1
Tarefa 1 : Configurar o frame-relay em uma topologia bug e apoke sem usar frame-relay map. Os roteadores devem ser configurados como point-to-point. A imagem da rede, poderá ser usada para configurar o Frame-relay em FR1, bastanto criar dois mapeamos.
Configuração R1 R1#Int S0 R1#No ip address R1#No shutdown R1#Encapsulation frame-relay R1#Int serial 0.1 point-to-point R1#Ip add 1.1.1.1 255.0.0.0 R1#Frame-relay interface-dlci 101 R1#No shutdown
R1#Int serial 0.2 point-to-point R1#Ip add 2.2.2.1 255.0.0.0 R1#Frame-relay interface-dlci 102 R1#No shutdown Configuração R2 R2#Int S0 R2#Ip add 1.1.1.2 255.0.0.0 R2#Encapsulation frame-relay R2#Frame-relay interface-dlci 102 R2#No shutdown Configuração R3 R3#Int S0 R3#Ip add 2.2.2.2 255.0.0.0 R3#Encapsulation frame-relay R3#Frame-relay interface-dlci 102 Verificação:
Deve ser verificado a conectividade.
Através do comando “show frame-relay pvc” em R1, poderemos verificas as seguintes saídas: …
…
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0.1 DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0.2 ..
…
Esse comando nos exibe uma saída de status como Active.
Deve-se então verificar a conectividade através do ping.
Tarefa 2 : Configurar OSPF nos 3 roteadores.
Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1# network 2.2.2.1.0 0.0.0.0 area 0 Configuração R2 R2#router ospf 1 R2# network 1.1.1.2 0.0.0.0 area 0 R2# network 20.0.0.0 0.255.255.255 area 0
R1# network 10.0.0.0 0.255.255.255 area 0 Configuração R3 R3# router ospf 1 R3# network 2.2.2.2 0.255.255.255 area 0 R3# network 30.0.0.0 0.255.255.255 area 0 Verificação:
Execute a visualização da vizinhaça e rotas que foram inseridas na tabela de roteamento. Poderemos ver que não existe nenhum vizinhança e rotas OSPF.
R1#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0.1 C 2.0.0.0/8 is directly connected, Serial0/0.2
R1#show ip ospf neighbor
R1#
A razão para isso é a seguinte:
Quando R1 foi configurado em uma sub-interface, o OSPF por padrão no modo point-to-point deixa o hello com 10 segundos. Já R2 e R3 foram configurados na interface física, e o OSPF por padrão usa non-broadcast com hello de 30 segundos.
Desta forma, nós devemos alterar manualmente o hello-interval time ou alterar o tipo de rede em R2 e R3.
Configuração R2
R2#Int S0
R2#ip ospf network point-to-point
Configuração R3
R3#Int S0
R3#ip ospf network point-to-point
Depois dessa configuração já será possivel visualizar os vizinhos, rotas e os timers modificados:
R2#show ip ospf interface s0/0 Serial0/0 is up, line protocol is up Internet Address 1.1.1.2/8, Area 0
Process ID 1, Router ID 1.1.1.2, Network Type POINT_TO_POINT, Cost: 64 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:08
Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled 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 2.2.2.1
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:30 2.2.2.2 Serial0/0.2 1.1.1.2 0 FULL/ - 00:00:31 1.1.1.2 Serial0/0.1
R2#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
O 2.0.0.0/8 [110/128] via 1.1.1.1, 00:05:28, Serial0/0 C 20.0.0.0/8 is directly connected, FastEthernet0/0 O 10.0.0.0/8 [110/74] via 1.1.1.1, 00:03:14, Serial0/0 O 30.0.0.0/8 [110/138] via 1.1.1.1, 00:02:54, Serial0/0
LAB 13 – OSPF sobre Frame-Relay point-to-multipoint
interfaces
R1
interface Ip Address Subnet Mask Local
DLCI
Conecta com
s0/0.1 1.1.1.1 255.0.0.0 101 102 R2 R3 f0/0 10.1.1.1 255.0.0.0 R2
interface Ip Address Subnet Mask Local
DLCI Conecta com s0/0 1.1.1.2 255.0.0.0 101 R1 f0/0 20.1.1.1 255.0.0.0 R3
Interface IP Address Subnet Mask
interface Ip Address Subnet Mask Local
DLCI
Conecta com
s0/0 2.2.2.2 255.0.0.0 102 R1
f0/0 30.1.1.1 255.0.0.0
Tarefa 1 : Configurar o frame-relay em uma topologia bug e apoke usando frame-relay map. Os roteadores não devem responder para rarp ( inverse arp ) requirementos.
Configuração R1 R1#Int S0 R1#No ip address R1#No shutdown R1#Encapsulation frame-relay R1#frame-relay map ip 1.1.1.2 101 R1# frame-relay map ip 1.1.1.3 102 R1#No shutdown Configuração R2 R2#Int S0 R2#Ip add 1.1.1.2 255.0.0.0 R2#Encapsulation frame-relay R2# frame-relay map ip 1.1.1.1 101 R2#No shutdown Configuração R3 R3#Int S0 R3#Ip add 2.2.2.2 255.0.0.0 R3#Encapsulation frame-relay R3# frame-relay map ip 1.1.1.1 102 R3#No shutdown Verificação: Verifique a conectividade. R3#show frame-relay pvc
A saida deverá exibir status=active
Tarefa 2 : Configurar OSPF sobre Frame-Relay em R1, R2 e R3. Configuração R1 R1#router ospf 1 R1#network 1.1.1.1 0.0.0.0 area 0 R1# network 10.0.0.0 0.255.255.255 area 0 Configuração R2 R2#router ospf 1 R2# network 1.1.1.2 0.0.0.0 area 0 R2# network 20.0.0.0 0.255.255.255 area 0 Configuração R3 R3# router ospf 1 R3# network 1.1.1.3 0.255.255.255 area 0 R3# network 30.0.0.0 0.255.255.255 area 0
Nós não usamos opção de broadcast no comando frame-relay map, o pvc no irá permitir broadcast sobre ele, então os vizinhos devem estabelecer vizinha com uma configuração estática. Configuração R1 R1#router ospf 1 R1#neighbor 1.1.1.2 priority 0 R1# neighbor 1.1.1.3 priority 0 Verificação:
R1#show ip ospf neighbors
A saída exibira os vizinhos tentando estabelecer vizinhança e completar o estado para full em um primeiro momento. Após algum tempo será exibido à vizinhança configurada
estaticamente.
Opção padrão para ospf point-to-multipoint sobre frame-relay em interface física.
R2#show ip ospf interface s0/0
Serial0/0 is up, line protocol is up Internet Address 1.1.1.2/8, Area 0
Process ID 1, Router ID 20.1.1.1, Network Type NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 10.1.1.1, Interface address 1.1.1.1 Backup Designated router (ID) 20.1.1.1, Interface address 1.1.1.2 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120
Hello due in 00:00:09
Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled 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 10.1.1.1 (Designated Router) Suppress hello for 0 neighbor(s)
R2#show ip route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Serial0/0
C 20.0.0.0/8 is directly connected, FastEthernet0/0 O 10.0.0.0/8 [110/74] via 1.1.1.1, 00:12:07, Serial0/0 O 30.0.0.0/8 [110/74] via 1.1.1.3, 00:10:06, Serial0/0