segunda-feira, 27 de abril de 2015

OSPF Filter-list versus Distribute-list

Estive estudando a melhor forma de filtrar uma rede OSPF entre o "Service Provider" e o "Cliente".
Se tratar de áreas OSPF diferentes não funcionaria o "filter-list" no R3 da topologia abaixo na qual é o Service Provider.
O "filter-list" só funcionaria no caso abaixo dentro da rede do cliente (Router R4) da Área 3 para Área 0 e mesmo assim o "filter-list" só filtra rotas "O IA", ou seja, inter-areas (LSA 3 - network). Se houver rotas redistribuidas do BGP no OSPF por exemplo (caso abaixo) que são "LSA 5 - external", não serão filtradas.
Veja abaixo:
Configuração R3:

router ospf 200
 log-adjacency-changes
 redistribute connected subnets
 redistribute bgp 65000 subnets route-map bgp3ospf
 network 10.198.34.76 0.0.0.3 area 3
!
router bgp 65000
 bgp log-neighbor-changes
 neighbor 200.200.1.1 remote-as 65000
 !
 address-family ipv4
 redistribute connected
 redistribute static
 redistribute ospf 200 match internal external 1 external 2 route-map ospf3bgp
 neighbor 200.200.1.1 activate
 neighbor 200.200.1.1 send-community
 neighbor 200.200.1.1 allowas-in
 no auto-summary
 no synchronization
 exit-address-family

no cdp log mismatch duplex
!
route-map ospf3bgp deny 10
 match tag 3110
!
route-map ospf3bgp permit 20
 set tag 390
!
route-map bgp3ospf deny 10
 match tag 390
!
route-map bgp3ospf permit 20
 set tag 3110

Configuração R4:

router ospf 200
 log-adjacency-changes
 area 0 filter-list prefix teste in
 redistribute connected subnets
 network 4.4.4.0 0.0.0.255 area 0
 network 10.198.34.76 0.0.0.3 area 3
!
no ip http server
no ip http secure-server
!
!
!
!
ip prefix-list teste seq 5 deny 10.198.34.76/30
ip prefix-list teste seq 10 permit 0.0.0.0/0 le 32

no cdp log mismatch duplex

Configuração R5:

router ospf 200
 log-adjacency-changes
 network 4.4.4.0 0.0.0.255 area 0


Tabela de roteamento em R5 ANTES do filtro em VERMELHO:

R5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     33.0.0.0/32 is subnetted, 1 subnets
O E2    33.33.33.33 [110/20] via 4.4.4.1, 00:00:07, FastEthernet1/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, FastEthernet1/0
     200.200.1.0/30 is subnetted, 1 subnets
O E2    200.200.1.0 [110/20] via 4.4.4.1, 00:00:07, FastEthernet1/0
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    10.198.39.159/32 [110/20] via 4.4.4.1, 00:00:07, FastEthernet1/0
O IA    10.198.34.76/30 [110/2] via 4.4.4.1, 00:00:07, FastEthernet1/0

Tabela de roteamento em R5 DEPOIS do filtro em VERMELHO:

R5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     33.0.0.0/32 is subnetted, 1 subnets
O E2    33.33.33.33 [110/20] via 4.4.4.1, 00:00:52, FastEthernet1/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, FastEthernet1/0
     200.200.1.0/30 is subnetted, 1 subnets
O E2    200.200.1.0 [110/20] via 4.4.4.1, 00:00:52, FastEthernet1/0
     10.0.0.0/32 is subnetted, 1 subnets
O E2    10.198.39.159 [110/20] via 4.4.4.1, 00:00:52, FastEthernet1/0
R5#

Para um filtro do Service Provider para o Cliente B será efetivo um filtro via DISTRIBUTE-LIST.
Veja abaixo:

Configuração do Roteador R3:

ip prefix-list teste2 permit 33.33.33.33/32
ip prefix-list teste2 deny 0.0.0.0/0 le 32

router ospf 200
 distribute-list prefix teste2 out

Tabela de roteamento de R5 após filtro de R3:


R5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     33.0.0.0/32 is subnetted, 1 subnets
O E2    33.33.33.33 [110/20] via 4.4.4.1, 00:34:46, FastEthernet1/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, FastEthernet1/0
     10.0.0.0/32 is subnetted, 1 subnets
O E2    10.198.39.159 [110/20] via 4.4.4.1, 00:34:46, FastEthernet1/0
R5#
R5#

Pode-se verificar que a rede 200.200.1.0/30 (O E2) saiu da tabela, ficando a rede 33.33.33.33/32 (O E2) aprendida de R3.
A Rede 10.198.39.159/32 (O E2) permanece pois é aprendida de R4.






domingo, 26 de abril de 2015

CCIE Service Provider v4 blueprint

Um excelente vídeo do INE (InternetWorkExpert) sobre a v4 do CCIE Service Provider que inicia no dia 22/Maio/2015.


Estréia do Gudines Network

Esse é o meu post de estréia do Gudines Network.
Já tinha um blog no Terra, devido a descontinuidade do serviço estou iniciando este.
Meu objetivo é informar sobre tecnologia, principalmente estudos sobre SDN (Software Defined Networking) e minha trajetória no CCIE Service Provider.

"SDN-architecture-overview-transparent" by Open Networking Foundation (ONF) - SDN Architecture Overview (PDF), Version 1.0, December 12, 2013.. Licensed under CC BY-SA 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:SDN-architecture-overview-transparent.png#/media/File:SDN-architecture-overview-transparent.png