Introduction
Este documento descreve os vários métodos de filtragem de LSAs OSPF tipo 5 em roteadores e switches que executam o Cisco IOS® e o IOS-XE®.
Contribuído por Rohit Nair, engenheiro do Cisco TAC.
Prerequisites
Requirements
Não existem requisitos específicos para este documento.
Componentes Utilizados
Este documento não se restringe a versões de software e hardware específicas. Este documento se aplica a todos os roteadores e switches Cisco que executam o Cisco IOS.
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. If your network is live, make sure that you understand the potential impact of any command.
Informações de Apoio
Um LSA tipo 5 do OSPF é originado por um roteador de limite de sistema autônomo (ASBR) e inundado na área do OSPF. Essas rotas são geradas por meio da redistribuição no OSPF de outros protocolos ou pela redistribuição de rotas conectadas ou estáticas.
Configurar
O exemplo a seguir mostra os vários métodos para filtrar LSAs tipo 5 em um domínio OSPF.
Diagrama de Rede
Configurações iniciais
Nova York
interface FastEthernet0/0
ip address 10.12.1.1 255.255.255.0
end
router ospf 1
network 10.12.1.1 0.0.0.0 area 0
[an error occurred while processing this directive]
Londres
interface FastEthernet0/0
ip address 10.12.1.2 255.255.255.0
end
interface FastEthernet1/0
ip address 10.23.1.1 255.255.255.0
end
router ospf 1
network 10.12.1.2 0.0.0.0 area 0
network 10.23.1.1 0.0.0.0 area 0
[an error occurred while processing this directive]
Dubai
interface FastEthernet0/0
ip address 10.23.1.2 255.255.255.0
end
interface FastEthernet1/0
ip address 192.168.1.1 255.255.255.0
end
router ospf 1
network 10.23.1.2 0.0.0.0 area 0
router eigrp 1
network 192.168.1.1 0.0.0.0
no auto-summary
[an error occurred while processing this directive]
Tóquio
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
end
interface Loopback100
ip address 172.16.1.1 255.255.255.255
end
router eigrp 1
network 172.16.1.1 0.0.0.0
network 192.168.1.2 0.0.0.0
no auto-summary
[an error occurred while processing this directive]
Opções de filtro
Distribuir lista
A função distribute list out, associada a uma lista de acesso ou a uma lista de prefixos, pode ser usada no ASBR que gera os LSAs tipo 5.
Note: O comando distribute-list out <interface> não é um comando suportado no OSPF. O comando distribute-list out <protocol> deve ser usado.
Abaixo está um exemplo do ASBR, Dubai. A lista de distribuição é usada para definir que redes, do EIGRP, devem ser anunciadas dentro do domínio OSPF:
Standard IP access list 1
10 deny 192.168.1.0, wildcard bits 0.0.0.255
20 permit any
router ospf 1
redistribute eigrp 1 subnets
network 10.23.1.2 0.0.0.0 area 0
distribute-list 1 out eigrp 1
[an error occurred while processing this directive]
Após aplicar a lista de distribuição acima, o LSA 192.168.1.0 não é visto em Nova York e Londres:
Nova York:
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
172.16.1.1 192.168.1.1 23 0x80000001 0x003442 0
NewYork#sh ip route 192.168.1.0
% Network not in table
[an error occurred while processing this directive]
Londres:
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
172.16.1.1 192.168.1.1 152 0x80000001 0x003442 0
London#sh ip route 192.168.1.0
% Network not in table
[an error occurred while processing this directive]
Note: Uma lista de distribuição vinculada à interface pode ser usada em qualquer roteador dentro da área. Isso, no entanto, restringe a instalação da rota na tabela de roteamento e não impedirá que um LSAs tipo 5 seja encaminhado.
Summary-address
O comando summary-address junto com a palavra-chave not-advertise pode ser usado no ASBR sob o processo OSPF do roteador para interromper a propagação de um LSA tipo 5.
Em Dubai, o comando summary-address foi usado para interromper o anúncio do tipo 5LSA 172.16.1.0.
Dubai:
router ospf 1
log-adjacency-changes
summary-address 172.16.1.0 255.255.255.0 not-advertise
redistribute eigrp 1 subnets
network 10.23.1.2 0.0.0.0 area 0
[an error occurred while processing this directive]
O LSA 172.16.1.0 não está mais presente em Nova York e Londres:
Nova York:
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
192.168.1.0 192.168.1.1 112 0x80000001 0x0012B8 0
NewYork#sh ip route 172.16.1.0
% Network not in table
[an error occurred while processing this directive]
Londres:
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
192.168.1.0 192.168.1.1 172 0x80000001 0x0012B8 0
London#sh ip route 172.16.1.0
% Network not in table
[an error occurred while processing this directive]
Route-map
Ao redistribuir um IGP no OSPF, um mapa de rota também pode ser usado para impedir que o LSA TIPO 5 seja gerado no ASBR.
Em Dubai, ao redistribuir do EIGRP, um mapa de rotas é usado para negar que a sub-rede 192.168.1.0 seja anunciada no OSPF:
Dubai:
Standard IP access list 1
10 deny 192.168.1.0, wildcard bits 0.0.0.255
20 permit any
route-map REDIS, permit, sequence 10
Match clauses:
ip address (access-lists): 1
Set clauses:
Policy routing matches: 0 packets, 0 bytes
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets route-map REDIS
network 10.23.1.2 0.0.0.0 area 0
[an error occurred while processing this directive]
O LSA tipo 5 para 192.168.1.0 não é criado:
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
172.16.1.0 192.168.1.1 47 0x80000001 0x003E39 0
[an error occurred while processing this directive]
Verificar
A verificação pode ser feita verificando-se o comando externo show ip ospf database para confirmar se os LSAs que foram filtrados realmente foram bloqueados.
Troubleshoot
Atualmente, não existem informações disponíveis específicas sobre Troubleshooting para esta configuração.