Ajude-nos a melhorar a sua experiência.

Conte-nos a sua opinião.

Tem dois minutos para uma pesquisa?

Announcement: Our new, consolidated Junos CLI Reference is now available.

close
external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
keyboard_arrow_right

Esta tradução automática foi útil?

starstarstarstarstar
Go to English page
ISENÇÃO DE RESPONSABILIDADE:

Esta página será traduzida com software de tradução por máquina de terceiros. Embora esforços razoáveis tenham sido feitos para fornecer uma tradução de qualidade, a Juniper Networks não pode garantir sua exatidão. Se houver dúvidas sobre a exatidão das informações contidas nesta tradução, consulte a versão em inglês. O PDF para download está disponível apenas em inglês.

Exemplo: configurar o BGP Autodiscovery para LDP VPLS com grupos de malha definidos pelo usuário

date_range 16-Jun-23

Este exemplo descreve como configurar grupos de malha definidos pelo usuário para autodiscovery BGP para LDP VPLS, conforme especificado na classe de equivalência de encaminhamento (FEC) 129. O FEC 129 usa autodiscovery BGP para transmitir informações de endpoint, para que você não precise configurar pseudowires manualmente. Você configura grupos de malha no roteador de borda para agrupar os conjuntos de roteadores PE que são automaticamente totalmente malhados e que compartilham o mesmo protocolo de sinalização, seja BGP ou LDP. Você pode configurar vários grupos de malha para mapear cada domínio VPLS sinalizado por LDP ou sinalizado por BGP para um grupo de malha.

Requisitos

Antes de começar, configure o autodiscovery BGP para LDP VPLS. Veja exemplo: configuração do BGP Autodiscovery para LDP VPLS.

Os requisitos de hardware e software para este exemplo são os mesmos que os requisitos para o exemplo: configurar o BGP Autodiscovery para LDP VPLS. Você precisará adaptar a configuração de exemplo à topologia usada neste exemplo.

Visão geral

A configuração para um grupo de malha para FEC 129 é muito semelhante à configuração de grupo de malha para FEC 128.

Observe as seguintes diferenças para o FEC 129:

  • Cada grupo de malha definido pelo usuário deve ter um diferencial de rota único. Não use o diferencial de rota definido para o grupo de malha padrão no nível de [edit routing-intances] hierarquia.

  • Cada grupo de malha definida pelo usuário deve ter sua própria meta de rota de importação e exportação.

  • Cada grupo de malha definido pelo usuário pode ter um ID VPN exclusivo de Camada 2. Por padrão, todos os grupos de malha configurados para uma instância de roteamento VPLS usam o mesmo ID VPN de Camada 2 que o que você configura no nível de [edit routing-instances] hierarquia.

Diagrama da topologia

A Figura 1 mostra uma topologia que inclui um grupo de malha definido pelo usuário.

Figura 1: BGP Autodiscovery para LDP VPLS com um grupo BGP Autodiscovery for LDP VPLS with a User-Defined Mesh Group de malha definida pelo usuário

Configuração

Configuração rápida da CLI

Para configurar rapidamente um grupo de malha, copie os seguintes comandos, remova quaisquer quebras de linha e cole os comandos na CLI de cada dispositivo.

Dispositivo CE1

content_copy zoom_out_map
set interfaces ge-2/0/8 unit 0 family inet address 172.16.0.1/24
set interfaces lo0 unit 0 family inet address 10.255.14.214/32
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-2/0/8.0

Dispositivo CE3

content_copy zoom_out_map
set interfaces ge-2/0/9 unit 0 family inet address 172.16.0.3/24
set interfaces lo0 unit 0 family inet address 10.255.14.218/32
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-2/0/9.0

Dispositivo CE4

content_copy zoom_out_map
set interfaces ge-2/1/6 unit 0 family inet address 172.16.0.4/24
set interfaces lo0 unit 0 family inet address 10.255.14.219/32
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-2/1/6.0

Dispositivo R2

content_copy zoom_out_map
set interfaces ge-2/0/5 encapsulation ethernet-vpls
set interfaces ge-2/0/5 unit 0 description to_CE1
set interfaces ge-2/0/5 unit 0 family vpls
set interfaces ge-2/0/10 unit 0 description to_R3
set interfaces ge-2/0/10 unit 0 family inet address 10.10.4.2/30
set interfaces ge-2/0/10 unit 0 family mpls
set interfaces ge-2/0/11 unit 0 description to_R4
set interfaces ge-2/0/11 unit 0 family inet address 10.10.5.1/30
set interfaces ge-2/0/11 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.0.2.2/24
set protocols mpls interface ge-2/0/10.0
set protocols mpls interface ge-2/0/11.0
set protocols bgp local-address 192.0.2.2
set protocols bgp group pe-pe type internal
set protocols bgp group pe-pe connect-retry-interval 1
set protocols bgp group pe-pe family l2vpn auto-discovery-only
set protocols bgp group pe-pe family l2vpn signaling
set protocols bgp group pe-pe neighbor 192.0.2.3
set protocols bgp group pe-pe neighbor 192.0.2.4
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-2/0/10.0
set protocols ospf area 0.0.0.0 interface ge-2/0/11.0
set protocols ldp interface ge-2/0/10.0
set protocols ldp interface ge-2/0/11.0
set protocols ldp interface lo0.0
set routing-instances inst512 instance-type vpls
set routing-instances inst512 interface ge-2/0/5.0
set routing-instances inst512 route-distinguisher 100:100
set routing-instances inst512 l2vpn-id l2vpn-id:1:2
set routing-instances inst512 vrf-target target:1:1
set routing-instances inst512 protocols vpls mesh-group metro1 vrf-target target:2:1
set routing-instances inst512 protocols vpls mesh-group metro1 route-distinguisher 100:200
set routing-options autonomous-system 64510

Dispositivo R3

content_copy zoom_out_map
set interfaces ge-2/0/10 unit 0 description to_R2
set interfaces ge-2/0/10 unit 0 family inet address 10.10.4.1/30
set interfaces ge-2/0/10 unit 0 family mpls
set interfaces ge-2/1/3 encapsulation ethernet-vpls
set interfaces ge-2/1/3 unit 0 description to_CE2
set interfaces ge-2/1/3 unit 0 family vpls
set interfaces lo0 unit 0 family inet address 192.0.2.3/24
set protocols mpls interface ge-2/0/10.0
set protocols bgp local-address 192.0.2.3
set protocols bgp group pe-pe type internal
set protocols bgp group pe-pe connect-retry-interval 1
set protocols bgp group pe-pe family l2vpn auto-discovery-only
set protocols bgp group pe-pe family l2vpn signaling
set protocols bgp group pe-pe neighbor 192.0.2.2
set protocols bgp group pe-pe neighbor 192.0.2.4
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-2/0/10.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-2/0/10.0
set protocols ldp interface lo0.0
set routing-instances inst512 instance-type vpls
set routing-instances inst512 interface ge-2/1/3.0
set routing-instances inst512 route-distinguisher 100:100
set routing-instances inst512 l2vpn-id l2vpn-id:1:2
set routing-instances inst512 vrf-target target:1:1
set routing-instances inst512 protocols vpls
set routing-options autonomous-system 64510

Dispositivo R4

content_copy zoom_out_map
set interfaces ge-2/0/10 unit 0 description to_R2
set interfaces ge-2/0/10 unit 0 family inet address 10.10.5.2/30
set interfaces ge-2/0/10 unit 0 family mpls
set interfaces ge-2/1/7 encapsulation ethernet-vpls
set interfaces ge-2/1/7 unit 0 description to_CE3
set interfaces ge-2/1/7 unit 0 family vpls
set interfaces lo0 unit 0 family inet address 192.0.2.4/24
set protocols mpls interface ge-2/0/10.0
set protocols bgp local-address 192.0.2.4
set protocols bgp group pe-pe type internal
set protocols bgp group pe-pe connect-retry-interval 1
set protocols bgp group pe-pe family l2vpn auto-discovery-only
set protocols bgp group pe-pe family l2vpn signaling
set protocols bgp group pe-pe neighbor 192.0.2.2
set protocols bgp group pe-pe neighbor 192.0.2.3
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-2/0/10.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-2/0/10.0
set protocols ldp interface lo0.0
set routing-instances inst512 instance-type vpls
set routing-instances inst512 interface ge-2/1/7.0
set routing-instances inst512 route-distinguisher 100:100
set routing-instances inst512 l2vpn-id l2vpn-id:1:2
set routing-instances inst512 vrf-target target:1:1
set routing-instances inst512 protocols vpls
set routing-options autonomous-system 64510

Procedimento

Procedimento passo a passo

Para configurar um grupo de malha:

  1. Configure as interfaces.

    content_copy zoom_out_map
    [edit interfaces]
    user@R2# set ge-2/0/5 encapsulation ethernet-vpls
    user@R2# set ge-2/0/5 unit 0 description to_CE1
    user@R2# set ge-2/0/5 unit 0 family vpls
    user@R2# set ge-2/0/10 unit 0 description to_R3
    user@R2# set ge-2/0/10 unit 0 family inet address 10.10.4.2/30
    user@R2# set ge-2/0/10 unit 0 family mpls
    user@R2# set ge-2/0/11 unit 0 description to_R4
    user@R2# set ge-2/0/11 unit 0 family inet address 10.10.5.1/30
    user@R2# set ge-2/0/11 unit 0 family mpls
    user@R2# set lo0 unit 0 family inet address 192.0.2.2/24
    
  2. Configure o MPLS nas interfaces.

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R2# set interface ge-2/0/10.0
    user@R2# set interface ge-2/0/11.0
    
  3. Configure BGP.

    content_copy zoom_out_map
    [edit protocols bgp]
    user@R2# set local-address 192.0.2.2
    [edit protocols bgp group pe-pe]
    user@R2# set type internal
    user@R2# set connect-retry-interval 1
    user@R2# set family l2vpn auto-discovery-only
    user@R2# set family l2vpn signaling
    user@R2# set neighbor 192.0.2.3
    user@R2# set neighbor 192.0.2.4
    
  4. Defina a meta de rota de importação e exportação para o grupo de malha padrão.

    content_copy zoom_out_map
    [edit protocols ospf]
    user@R2# set traffic-engineering
    user@R2# set area 0.0.0.0 interface lo0.0 passive
    user@R2# set area 0.0.0.0 interface ge-2/0/10.0
    user@R2# set area 0.0.0.0 interface ge-2/0/11.0
    
  5. Configure o LDP nas interfaces voltadas para o núcleo e na interface de loopback.

    content_copy zoom_out_map
    [edit protocols ldp]
    user@R2# set interface ge-2/0/10.0
    user@R2# set interface ge-2/0/11.0
    user@R2# set interface lo0.0
    
  6. Configure a instância de roteamento VPLS.

    Certifique-se de que o distinguidor de rotas do grupo de malha seja único.

    content_copy zoom_out_map
    [edit routing-instances inst512]
    user@R2# set instance-type vpls
    user@R2# set interface ge-2/0/5.0
    user@R2# set route-distinguisher 100:100
    user@R2# set l2vpn-id l2vpn-id:1:2
    user@R2# set vrf-target target:1:1
    user@R2# set protocols vpls mesh-group metro1 vrf-target target:2:1
    user@R2# set protocols vpls mesh-group metro1 route-distinguisher 100:200
    
  7. Configure o número do sistema autônomo (AS).

    content_copy zoom_out_map
    [edit routing-options]
    user@R2# set autonomous-system 64510
    
  8. Se você terminar de configurar o dispositivo, comprometa a configuração.

    content_copy zoom_out_map
    [edit]
    user@R2# commit
    

Resultados

A partir do modo de configuração, confirme sua configuração entrando no show routing-instances comando. Se a saída não exibir a configuração pretendida, repita as instruções neste exemplo para corrigir a configuração.

content_copy zoom_out_map
user@R2# show interfaces
ge-2/0/5 {
    encapsulation ethernet-vpls;
    unit 0 {
        description PE1_to_CE1;
        family vpls;
    }
}
ge-2/0/10 {
    unit 0{
        description to_R3;
        family inet {
            address 10.10.4.2/30;
        }
        family mpls;
    }
}
ge-2/0/11 {
    unit 0 {
        description to_R4;
        family inet {
            address 10.10.5.1/30;
        }
        family mpls;
    }
}
lo0 {
    unit 0{
        family inet {
            address 192.0.2.2/24;
        }
    }
}
content_copy zoom_out_map
user@R2# show protocols
mpls {
    interface ge-2/0/10.0;
    interface ge-2/0/11.0;
}
bgp {
    local-address 192.0.2.2;
    group pe-pe {
        type internal;
        connect-retry-interval 1;
        family l2vpn {
            auto-discovery-only;
            signaling;
        }
        neighbor 192.0.2.3;
        neighbor 192.0.2.4;
    }
}
ospf {
    traffic-engineering;
    area 0.0.0.0 {
        interface lo0.0 {
            passive;
        }
        interface ge-2/0/10.0;
        interface ge-2/0/11.0;
    }
}
ldp {
    interface ge-2/0/10.0;
    interface ge-2/0/11.0;
    interface lo0.0;
}
content_copy zoom_out_map
user@R2# show routing-instances
inst512 {
    instance-type vpls;
    interface ge-2/0/5.0;
    route-distinguisher 100:100;
    l2vpn-id l2vpn-id:1:2;
    vrf-target target:1:1;
    protocols {
        vpls {
            mesh-group metro1 {
                vrf-target target:2:1;
                route-distinguisher 100:200;
            }
        }
    }
}
content_copy zoom_out_map
user@R2# show routing-options
autonomous-system 64510;

Verificação

Confirme que a configuração está funcionando corretamente.

Verificando as rotas

Propósito

Verifique se as rotas esperadas são aprendidas.

Ação

Do modo operacional, entre no show route comando.

content_copy zoom_out_map
user@R2> show route
inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.0.2.2/24         *[Direct/0] 4d 02:42:47
                    > via lo0.0
192.0.2.3/24         *[OSPF/10] 4d 02:41:56, metric 1
                    > to 10.10.4.1 via ge-2/0/10.0
192.0.2.4/24         *[OSPF/10] 4d 02:42:01, metric 1
                    > to 10.10.5.2 via ge-2/0/11.0
10.10.3.2/24       *[Local/0] 4d 02:42:47
                      Reject
10.10.4.0/30       *[Direct/0] 4d 02:42:46
                    > via ge-2/0/10.0
10.10.4.2/32       *[Local/0] 4d 02:42:47
                      Local via ge-2/0/10.0
10.10.5.0/30       *[Direct/0] 4d 02:42:46
                    > via ge-2/0/11.0
10.10.5.1/32       *[Local/0] 4d 02:42:47
                      Local via ge-2/0/11.0
203.0.113.0/24       *[OSPF/10] 4d 02:42:49, metric 1
                      MultiRecv

inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.0.2.3/24         *[LDP/9] 4d 02:01:06, metric 1
                    > to 10.10.4.1 via ge-2/0/10.0
192.0.2.4/24         *[LDP/9] 4d 02:01:06, metric 1
                    > to 10.10.5.2 via ge-2/0/11.0

mpls.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0                  *[MPLS/0] 4d 02:42:49, metric 1
                      Receive
1                  *[MPLS/0] 4d 02:42:49, metric 1
                      Receive
2                  *[MPLS/0] 4d 02:42:49, metric 1
                      Receive
13                 *[MPLS/0] 4d 02:42:49, metric 1
                      Receive
299776             *[LDP/9] 4d 02:01:06, metric 1
                    > to 10.10.5.2 via ge-2/0/11.0, Pop      
299776(S=0)        *[LDP/9] 4d 02:01:06, metric 1
                    > to 10.10.5.2 via ge-2/0/11.0, Pop      
299792             *[LDP/9] 4d 02:01:06, metric 1
                    > to 10.10.4.1 via ge-2/0/10.0, Pop      
299792(S=0)        *[LDP/9] 4d 02:01:06, metric 1
                    > to 10.10.4.1 via ge-2/0/10.0, Pop      
800000             *[VPLS/7] 4d 02:01:05
                    > via vt-2/0/10.185597952, Pop      
800001             *[VPLS/7] 4d 02:01:05
                    > via vt-2/0/10.185597953, Pop      
vt-2/0/10.185597953*[VPLS/7] 4d 02:01:05, metric2 1
                    > to 10.10.5.2 via ge-2/0/11.0, Push 800001
vt-2/0/10.185597952*[VPLS/7] 4d 02:01:05, metric2 1
                    > to 10.10.4.1 via ge-2/0/10.0, Push 800001

bgp.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

100:100:192.0.2.3/96 AD             
                   *[BGP/170] 4d 02:32:41, localpref 100, from 192.0.2.3
                      AS path: I, validation-state: unverified
                    > to 10.10.4.1 via ge-2/0/10.0
100:100:192.0.2.4/96 AD             
                   *[BGP/170] 4d 02:32:41, localpref 100, from 192.0.2.4
                      AS path: I, validation-state: unverified
                    > to 10.10.5.2 via ge-2/0/11.0

inst512.l2vpn.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

100:100:192.0.2.2/96 AD             
                   *[VPLS/170] 4d 02:01:05, metric2 1
                      Indirect
100:100:192.0.2.3/96 AD             
                   *[BGP/170] 4d 02:32:41, localpref 100, from 192.0.2.3
                      AS path: I, validation-state: unverified
                    > to 10.10.4.1 via ge-2/0/10.0
100:100:192.0.2.4/96 AD             
                   *[BGP/170] 4d 02:32:41, localpref 100, from 192.0.2.4
                      AS path: I, validation-state: unverified
                    > to 10.10.5.2 via ge-2/0/11.0
100:200:192.0.2.2/96 AD             
                   *[VPLS/170] 4d 02:01:05, metric2 1
                      Indirect
192.0.2.3:NoCtrlWord:5:1:2:192.0.2.2:192.0.2.3/176               
                   *[VPLS/7] 4d 02:01:05, metric2 1
                    > to 10.10.4.1 via ge-2/0/10.0
192.0.2.3:NoCtrlWord:5:1:2:192.0.2.3:192.0.2.2/176               
                   *[LDP/9] 4d 02:01:05
                      Discard
192.0.2.4:NoCtrlWord:5:1:2:192.0.2.2:192.0.2.4/176               
                   *[VPLS/7] 4d 02:01:05, metric2 1
                    > to 10.10.5.2 via ge-2/0/11.0
192.0.2.4:NoCtrlWord:5:1:2:192.0.2.4:192.0.2.2/176               
                   *[LDP/9] 4d 02:01:05
                      Discard

ldp.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.0.2.3:NoCtrlWord:5:1:2:192.0.2.3:192.0.2.2/176               
                   *[LDP/9] 4d 02:01:05
                      Discard
192.0.2.4:NoCtrlWord:5:1:2:192.0.2.4:192.0.2.2/176               
                   *[LDP/9] 4d 02:01:05
                      Discard

Significado

A saída mostra todas as rotas aprendidas, incluindo as rotas autodiscovered (AD).

Verificando a conectividade

Propósito

Verifique se o dispositivo CE1 pode pingar o dispositivo CE2 e o dispositivo CE3.

Ação

content_copy zoom_out_map
user@CE1> ping 10.255.14.218
PING 10.255.14.218 (10.255.14.218): 56 data bytes
64 bytes from 10.255.14.218: icmp_seq=0 ttl=64 time=0.787 ms
64 bytes from 10.255.14.218: icmp_seq=1 ttl=64 time=0.651 ms
^C
--- 10.255.14.218 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.651/0.719/0.787/0.068 ms
content_copy zoom_out_map
user@CE1> ping 10.255.14.219
PING 10.255.14.219 (10.255.14.219): 56 data bytes
64 bytes from 10.255.14.219: icmp_seq=0 ttl=64 time=1.054 ms
64 bytes from 10.255.14.219: icmp_seq=1 ttl=64 time=0.669 ms
^C
--- 10.255.14.219 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.669/0.862/1.054/0.193 ms

Significado

A saída mostra que o VPLS está operacional.

Verificando as conexões VPLS

Propósito

Certifique-se de que todas as conexões VPLS DA FEC 129 sejam fornecidas corretamente.

Ação

content_copy zoom_out_map
user@R2> show vpls connections
Instance: inst512
  L2vpn-id: 1:2
  Local-id: 192.0.2.2
  Mesh-group connections: __ves__
    Remote-id                 Type  St     Time last up          # Up trans
    192.0.2.4                   rmt   Up     Oct 26 15:11:56 2012           1
      Remote PE: 192.0.2.4, Negotiated control-word: No
      Incoming label: 800001, Outgoing label: 800001
      Local interface: vt-2/0/10.185597953, Status: Up, Encapsulation: ETHERNET
        Description: Intf - vpls inst512 local-id 192.0.2.2 remote-id 192.0.2.4 neighbor 192.0.2.4
    192.0.2.3                   rmt   Up     Oct 26 15:11:56 2012           1
      Remote PE: 192.0.2.3, Negotiated control-word: No
      Incoming label: 800000, Outgoing label: 800001
      Local interface: vt-2/0/10.185597952, Status: Up, Encapsulation: ETHERNET
        Description: Intf - vpls inst512 local-id 192.0.2.2 remote-id 192.0.2.3 neighbor 192.0.2.3

Significado

Como esperado, as conexões estão ativas.

Informações de endereço VPLS MAC aprendidas

Propósito

Verifique se todos os endereços MAC de dispositivos CE são aprendidos e instalados.

Ação

content_copy zoom_out_map
user@R2> show vpls mac-table

MAC flags (S -static MAC, D -dynamic MAC, L -locally learned, C -Control MAC
           SE -Statistics enabled, NM -Non configured MAC, R -Remote PE MAC)

Logical system   : R2
Routing instance : inst512
 Bridging domain : __inst512__, VLAN : NA
   MAC                 MAC      Logical          NH     RTR
   address             flags    interface        Index  ID
   00:21:59:0f:35:32   D        ge-2/0/5.0      
   00:21:59:0f:35:33   D        vt-2/0/10.185597952
   00:21:59:0f:35:d5   D        vt-2/0/10.185597953
external-footer-nav