IP : Border Gateway Protocol (BGP)

Exemplo de configuração do BGP Prefix-Based Outbound Route Filtering do IPv6

19 Setembro 2015 - Tradução por Computador
Outras Versões: Versão em PDFpdf | Inglês (22 Agosto 2015) | Feedback


Índice


Introdução

Este documento fornece uma configuração de exemplo usando o IPv6 que o ajuda a configurar o BGP Prefix-Based Outbound Route Filtering. Esta característica usa o filtro da rota externa BGP (ORF) envia e recebe as capacidades que minimizam o número de atualizações BGP enviadas entre roteadores de peer. A configuração desta característica pode ajudar em filtrar para fora atualizações de roteamento indesejáveis na fonte.

Pré-requisitos

Requisitos

Certifique-se de que você cumpre estas exigências antes que você tente esta configuração:

  • Tenha uma compreensão do protocolo de roteamento BGP e da sua operação

  • Tenha uma compreensão do método de endereçamento do IPv6

Componentes Utilizados

Este documento não se restringe a versões de software e hardware específicas.

As configurações neste documento são baseadas no Cisco 7200 Series Router com Software Release 15.0(1) do � do Cisco IOS.

Convenções

Consulte as Convenções de Dicas Técnicas da Cisco para obter mais informações sobre convenções de documentos.

Configurar

Neste exemplo, o r1 do roteador é anunciar-prefixo configurado baseado ORF envia capacidades ao roteador R2. No roteador da outra extremidade o R2 é configurado para anunciar o ORF com base no prefixo recebe capacidades ao r1 do roteador. Antes que a característica do BGP Prefix-Based Outbound Route Filtering possa ser permitida de enviar ou receber anúncios com base no prefixo ORF, as sessões de peer BGP devem ser em serviço e as capacidades BGP ORF devem ser permitidas em cada roteador participante antes de um roteador.

Este documento usa o comando do prefixo-filtro orf do vizinho a fim permitir a capacidade da lista de prefixo ORF no roteador. Este comando foi introduzido no Cisco IOS Software Release 12.0(11)ST.

Nota: Use a ferramenta de consulta de comandos (clientes registrados somente) a fim encontrar mais informação nos comandos usados neste documento.

Diagrama de Rede

Este documento utiliza a seguinte configuração de rede:

http://www.cisco.com/c/dam/en/us/support/docs/ip/border-gateway-protocol-bgp/113504-ipv6-bgp-outbound-prefixfilter-01.gif

Configurações de exemplo

Este documento utiliza as seguintes configurações:

R1 do roteador
!
hostname R1
!
ipv6 unicast-routing
ipv6 cef
!
!
interface Loopback1
 no ip address
 ipv6 address 1111::1/128
!
!
interface Loopback2
 no ip address
 ipv6 address 2222::1/128
! 
!
interface Serial1/0
 no ip address
 ipv6 address 2011:11:11:11::1/64
 serial restart-delay 0
!
!
router bgp 6501
 no synchronization
 no bgp default ipv4-unicast
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 neighbor 2011:11:11:11::2 remote-as 6502
 neighbor 2011:11:11:11::2 ebgp-multihop 255
 no auto-summary
 !
 address-family ipv6
  neighbor 2011:11:11:11::2 activate
  neighbor 2011:11:11:11::2 capability orf prefix-list send
  neighbor 2011:11:11:11::2 prefix-list FILTER_IPv6 in
 exit-address-family
!
!
ipv6 prefix-list FILTER_IPv6 seq 10 permit 1111::1/128
ipv6 prefix-list FILTER_IPv6 seq 20 permit 2222::1/128
!
!
end

Roteador R2
!
hostname R2
!
!
no ip domain lookup
ipv6 unicast-routing
ipv6 cef
!
interface Loopback1
 no ip address
 ipv6 address 1010::1/128
 !
!
interface Loopback2
 no ip address
 ipv6 address 2020::1/128
!
interface Serial1/0
 no ip address
 ipv6 address 2011:11:11:11::2/64
 serial restart-delay 0
!
!
router bgp 6502
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 2011:11:11:11::1 remote-as 6501
 neighbor 2011:11:11:11::1 ebgp-multihop 255
 no auto-summary
 !
 address-family ipv6

  network 1010::1/128
  network 2020::1/128
  neighbor 2011:11:11:11::1 activate
  neighbor 2011:11:11:11::1 capability orf prefix-list receive
  neighbor 2011:11:11:11::1 prefix-list R2_list in
 exit-address-family
!
ipv6 prefix-list R2_list seq 10 permit 1010::1/128
ipv6 prefix-list R2_list seq 20 permit 2020::1/128
!
end

Cenário 1: Rotas de filtro baseadas na lista de prefixos com expressões

Nesta encenação, um endereço de loopback 1000::1/45 é configurado no r1 sob o loopback de interface 0. Uma lista de prefixos é criada a fim permitir todas as rotas que forem maiores do que o comprimento de prefixo:: /64.

Nota: A configuração do roteador R2 permanece a mesma que como mostrado previamente dada e do r1 alterações de configuração aqui. Os endereços IP de Um ou Mais Servidores Cisco ICM NT neste Roteadores permanecem os mesmos.

R1 do roteador

!--- Output omitted.
 
!
interface Loopback0
 no ip address
 ipv6 address 1000::1/45
 !

!--- Output omitted.

  router bgp 6501
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 neighbor 2011:11:11:11::2 remote-as 6502
 neighbor 2011:11:11:11::2 ebgp-multihop 255
 no auto-summary
 !
 address-family ipv6
  network 1000::1/45
  network 1111::1/128
  network 2222::1/128
  neighbor 2011:11:11:11::2 activate
  neighbor 2011:11:11:11::2 prefix-list IPV6-LONG in

!--- Applies the prefix-list and filters 
!--- the incoming updates from the neighbor 2011:11:11:11::2.

 exit-address-family
!
ipv6 prefix-list IPV6-LONG description Match any prefix longer than /64
ipv6 prefix-list IPV6-LONG seq 1 permit ::/0 ge 64

!--- seq 1 permit ::/0 ge 64 permits anything
!--- that is ge /64 subnet mask.

!
end

Verificar

Use esta seção para confirmar se a sua configuração funciona corretamente.

A Output Interpreter Tool (apenas para clientes registrados) (OIT) suporta determinados comandos show. Use a OIT para exibir uma análise da saída do comando show.

Estes comandos show são usados verificar a configuração:

Verifique o BGP Prefix-Based Outbound Route Filtering do IPv6 configurado no modo de emissão

No r1 do roteador:

show running-config | implore o BGP
router bgp 6501
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 neighbor 2011:11:11:11::2 remote-as 6502
 neighbor 2011:11:11:11::2 ebgp-multihop 255
 no auto-summary
 !
 address-family ipv6
  neighbor 2011:11:11:11::2 activate
  neighbor 2011:11:11:11::2 capability orf prefix-list send

!--- Indicates that the neighbor 2011:11:11:11::2 
!--- is configured with the prefix-based 
!--- ORF feature in send mode.

vizinhos do unicast do show bgp ipv6
R1#show bgp ipv6 unicast neighbors 2011:11:11:11::2
BGP neighbor is 2011:11:11:11::2,  remote AS 6502, external link
  BGP version 4, remote router ID 2.2.2.2
  Session state = Established, up for 01:30:36
  Last read 00:00:44, last write 00:00:42, hold time is 180, keepalive interval is 60 seconds 
 BGP multisession with 2 sessions (2 established), first up for 01:31:26
  Neighbor sessions:
    2 active, is multisession capable
  Neighbor capabilities:
    Route refresh: advertised and received(new) on session 1, 2
    Four-octets ASN Capability: advertised and received on session 1, 2
    Address family IPv4 Unicast: advertised and received
    Address family IPv6 Unicast: advertised and received

!--- Output omitted.

 For address family: IPv6 Unicast
  Session: 2011:11:11:11::2 session 2
  BGP table version 1, neighbor version 1/0
  Output queue size : 0
  Index 2
  session 2 member
  2 update-group member
  AF-dependant capabilities:
    Outbound Route Filter (ORF) type (128) Prefix-list:

!--- Shows that the neighbor 2011:11:11:11::2 
!--- is configured with the prefix-based 
!--- ORF feature in send mode.

      Send-mode: advertised
      Receive-mode: received
  Outbound Route Filter (ORF): sent;
  Incoming update prefix filter list is FILTER_IPv6
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               2          4
    Prefixes Total:                 0          0
    Implicit Withdraw:              1          0
    Explicit Withdraw:              1          0
    Used as bestpath:             n/a          0
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    
  
!--- Output omitted.

Verifique que BGP Prefix-Based Outbound Route Filtering do IPv6 configurado dentro recebe o modo

No roteador R2:

show running-config | implore o BGP
router bgp 6502
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 2011:11:11:11::1 remote-as 6501
 neighbor 2011:11:11:11::1 ebgp-multihop 255
 no auto-summary
 !
 address-family ipv6
  network 1010::1/128
  network 2020::1/128
  neighbor 2011:11:11:11::1 activate
  neighbor 2011:11:11:11::1 capability orf prefix-list receive

!--- Indicates that the neighbor 2011:11:11:11::1 
!--- is configured with the prefix-based 
!--- ORF feature in receive mode.

vizinhos do unicast do show bgp ipv6
R2#show bgp ipv6 unicast nei 2011:11:11:11::1
BGP neighbor is 2011:11:11:11::1,  remote AS 6501, external link
  BGP version 4, remote router ID 1.1.1.1
  Session state = Established, up for 01:47:11
  Last read 00:00:44, last write 00:00:32, hold time is 180, keepalive interval is 60 seconds  
multisession with 2 sessions (2 established), first up for 01:48:02
  Neighbor sessions:
    2 active, is multisession capable
  Neighbor capabilities:
    Route refresh: advertised and received(new) on session 1, 2
    Four-octets ASN Capability: advertised and received on session 1, 2
    Address family IPv4 Unicast: advertised and received
    Address family IPv6 Unicast: advertised and received
    Multisession Capability: advertised and received
 
!--- Output omitted.


 For address family: IPv6 Unicast
  Session: 2011:11:11:11::1 session 2
  BGP table version 3, neighbor version 3/0
  Output queue size : 0
  Index 3
  session 2 member
  3 update-group member
  AF-dependant capabilities:
    Outbound Route Filter (ORF) type (128) Prefix-list:

!--- Shows that the neighbor 2011:11:11:11::1 
!--- is configured with the prefix-based 
!--- ORF feature in receive mode.

      Send-mode: received
      Receive-mode: advertised
  Outbound Route Filter (ORF): received (2 entries)
Incoming update prefix filter list is R2_list
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               2          5
    Prefixes Total:                 0          0
    Implicit Withdraw:              0          0
    Explicit Withdraw:              2          0
    

!--- Output omitted.
 

Verifique a encenação 1: Rotas de filtro baseadas na lista de prefixos com expressões

Emita o comando bgp do show ipv6 route no r1 do roteador a fim indicar os índices atuais da tabela de roteamento de BGP do IPv6.

BGP do show ipv6 route
No r1 do roteador:
R1#show ipv6 route bgp
IPv6 Routing Table - default - 9 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       D - EIGRP, EX - EIGRP external, ND - Neighbor Discovery
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
B   1010::1/128 [20/0]
     via 2011:11:11:11::2
B   2020::1/128 [20/0]
     via 2011:11:11:11::2

!--- In this ouput, 1000::1/45 is not 
!--- displayed because the network is lesser 
!--- than ::/64 prefix and its filtered. 

Use o Exibir informação do comando da lista de prefixos do IPv6 da mostra sobre entradas de uma lista de prefixo do IPv6 ou de lista de prefixo do IPv6.

mostre a lista de prefixos do IPv6
No r1 do roteador:
 
R1#show ipv6 prefix-list detail

Prefix-list with the last deletion/insertion: IPV6-LONG
ipv6 prefix-list IPV6-LONG:
   Description: Match any prefix longer than /64
   count: 1, range entries: 1, sequences: 1 - 1, refcount: 3
   seq 1 permit ::/0 ge 64 (hit count: 14, refcount: 1)

R1#show ipv6 prefix-list summary

Prefix-list with the last deletion/insertion: IPV6-LONG
ipv6 prefix-list IPV6-LONG:
   Description: Match any prefix longer than /64
   count: 1, range entries: 1, sequences: 1 - 1, refcount: 3

R1#show ipv6 prefix-list  IPV6-LONG

ipv6 prefix-list IPV6-LONG: 1 entries
   seq 1 permit ::/0 ge 64

Discussões relacionadas da comunidade de suporte da Cisco

A Comunidade de Suporte da Cisco é um fórum onde você pode perguntar e responder, oferecer sugestões e colaborar com colegas.


Informações Relacionadas


Document ID: 113504