Introducción
Este documento describe los diversos métodos de filtrado de LSA tipo 5 OSPF en routers y switches que ejecutan Cisco IOS® e IOS-XE®.
Colaborado por Rohit Nair, ingeniero del TAC de Cisco.
Prerequisites
Requirements
No hay requisitos específicos para este documento.
Componentes Utilizados
Este documento no tiene restricciones específicas en cuanto a versiones de software y de hardware. Este documento es válido para todos los routers y switches de Cisco que ejecutan 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.
Antecedentes
Un LSA tipo 5 OSPF es originado por un router de límite del sistema autónomo (ASBR) e inundado dentro del área OSPF. Estas rutas se generan mediante la redistribución en OSPF de otros protocolos o mediante la redistribución de rutas conectadas o estáticas.
Configurar
El siguiente ejemplo muestra los diversos métodos para filtrar LSA de tipo 5 dentro de un dominio OSPF.
Diagrama de la red

Configuraciones iniciales
Nueva 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]
Dubái
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]
Tokio
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]
Opciones de filtro
Lista de distribución
La función distribute list out, asociada a una lista de acceso o lista de prefijos, se puede utilizar en el ASBR que genera los LSA de tipo 5.
Nota: El comando distribute-list out <interface> no es un comando admitido en OSPF. Se debe utilizar el comando distribute-list out <protocol>.
A continuación se muestra un ejemplo de ASBR, Dubai. La lista de distribución se utiliza para definir qué redes, desde EIGRP, deben anunciarse dentro del dominio 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]
Después de aplicar la lista de distribución anterior, el LSA 192.168.1.0 no se ve en Nueva York y Londres:
Nueva 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]
Nota: Una lista de distribución en vinculada a la interfaz se puede utilizar en cualquier router dentro del área. Esto, sin embargo, solamente restringe que la ruta se instale en la tabla de ruteo y no bloqueará el reenvío de LSA de tipo 5.
Dirección de resumen
El comando summary-address junto con la palabra clave not-advertise se puede utilizar en el ASBR bajo el proceso OSPF del router para detener la propagación de un LSA de tipo 5.
En Dubái, el comando summary-address se ha utilizado para detener el anuncio del LSA 172.16.1.0 Tipo 5.
Dubái:
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]
El LSA 172.16.1.0 ya no está presente en Nueva York y Londres:
Nueva 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
Mientras se redistribuye un IGP en OSPF, también se puede utilizar un route-map para detener la generación del LSA de TIPO 5 en el ASBR.
En Dubai, mientras se redistribuye desde EIGRP, se utiliza un route-map para negar que la subred 192.168.1.0 se anuncie en 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]
No se crea el LSA de tipo 5 para 192.168.1.0:
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]
Verificación
La verificación se puede realizar mediante la verificación del comando show ip ospf database external para confirmar si los LSA que fueron filtrados efectivamente se han bloqueado.
Troubleshoot
Actualmente, no hay información específica de troubleshooting disponible para esta configuración.