Tag Archives: BGP

Renewing my JNCIP-ENT

Once you got the email from the vendor saying something like “Your certification is about to expire”, the only thing which come to my mind is “Dam it! Again…..”

So long story short, the exam is 120 minutes, 65 questions  and the same blueprint from last time. The only change i noticed was the Junos Software release, it is 15.1 now
I used my notes here from my previous studies.
There is another exam to achieve the JNCIP-ENT (JN0-646) which has the same blueprint but uses an Enhanced Layer 2 Software (ELS). The CLI it’s slightly on switching configs.

I got 73%, so it’s a pass! Maybe i get energy to face the JNCIE before i receive again the famous email “…about to expire”

I don’t remember the price of the JNCIP exam because i did it 3 years ago, but by the priced published by PearsonVue it increased apparently

Share

BGP Free Core

“BGP Free Core” is a typical topology in MPLS Service Provider Networks where you run IGP+Label. This allows traffic to transit over devices which don’t know traffic final destination, instead they look only for labels, bring more performance at the end. MPLS allow applications such as L2VPN, L3VPN and much more.

bgp-free-core

Normal Forwarding

In normal forwarding traffic towards to destination will go hop-by-hop (lookup next-hop) until reach destination

R4#show ip route
Codes: L – local, 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, H – NHRP, l – LISP
a – application route
+ – replicated route, % – next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
i L2     10.1.1.1/32 [115/30] via 10.4.12.12, 00:13:18, GigabitEthernet1.412
[115/30] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
i L2     10.1.2.0/24 [115/20] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
i L2     10.1.11.0/24 [115/30] via 10.4.12.12, 00:13:18, GigabitEthernet1.412
[115/30] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
i L2     10.1.12.0/24 [115/20] via 10.4.12.12, 00:15:50, GigabitEthernet1.412
i L2     10.2.2.2/32 [115/20] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
C        10.2.4.0/24 is directly connected, GigabitEthernet1.24
L        10.2.4.4/32 is directly connected, GigabitEthernet1.24
i L2     10.2.11.0/24 [115/20] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
i L2     10.2.12.0/24 [115/20] via 10.4.12.12, 00:13:18, GigabitEthernet1.412
[115/20] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
i L2     10.2.13.0/24 [115/20] via 10.4.13.13, 00:13:18, GigabitEthernet1.413
[115/20] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
C        10.4.4.4/32 is directly connected, Loopback0
C        10.4.12.0/24 is directly connected, GigabitEthernet1.412
L        10.4.12.4/32 is directly connected, GigabitEthernet1.412
C        10.4.13.0/24 is directly connected, GigabitEthernet1.413
L        10.4.13.4/32 is directly connected, GigabitEthernet1.413
i L2     10.11.11.11/32
[115/30] via 10.4.12.12, 00:13:18, GigabitEthernet1.412
[115/30] via 10.2.4.2, 00:13:18, GigabitEthernet1.24
i L2     10.11.12.0/24 [115/20] via 10.4.12.12, 00:15:50, GigabitEthernet1.412
i L2     10.12.12.12/32
[115/20] via 10.4.12.12, 00:15:50, GigabitEthernet1.412
i L2     10.12.13.0/24 [115/20] via 10.4.13.13, 00:15:50, GigabitEthernet1.413
[115/20] via 10.4.12.12, 00:15:50, GigabitEthernet1.412
i L2     10.13.13.13/32
[115/20] via 10.4.13.13, 00:15:50, GigabitEthernet1.413

R4#show ip cef
Prefix               Next Hop             Interface
0.0.0.0/0            no route
0.0.0.0/8            drop
0.0.0.0/32           receive
10.1.1.1/32          10.2.4.2             GigabitEthernet1.24
10.4.12.12           GigabitEthernet1.412
10.1.2.0/24          10.2.4.2             GigabitEthernet1.24
10.1.11.0/24         10.2.4.2             GigabitEthernet1.24
10.4.12.12           GigabitEthernet1.412
10.1.12.0/24         10.4.12.12           GigabitEthernet1.412
10.2.2.2/32          10.2.4.2             GigabitEthernet1.24
10.2.4.0/24          attached             GigabitEthernet1.24
10.2.4.0/32          receive              GigabitEthernet1.24
10.2.4.2/32          attached             GigabitEthernet1.24
10.2.4.4/32          receive              GigabitEthernet1.24
10.2.4.255/32        receive              GigabitEthernet1.24
10.2.11.0/24         10.2.4.2             GigabitEthernet1.24

What is the exact path(or multiple)?

R4#trace 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.2.4.2 3 msec
10.4.12.12 4 msec
10.2.4.2 3 msec
2 10.1.12.1 3 msec
10.1.2.1 3 msec
10.1.12.1 2 msec

CSR-4#show mpls forwarding-table
no MPLS apps enabled or MPLS not enabled on any interfaces

MPLS Forwarding

On MPLS we have LIB and LFIB. LIB essentially holds all the labels and associated information, while LFIB do the forwarding based on incoming labeled packets. CEF is a pre-requirement to run MPLS.
For MPLS the routing table (RIB) still the same as we see on Normal Forwarding.

This is the LFIB table….

R4#show mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
16         Pop Label  10.12.12.12/32   0             Gi1.412    10.4.12.12
17         Pop Label  10.13.13.13/32   0             Gi1.413    10.4.13.13
18         Pop Label  10.1.12.0/24     0             Gi1.412    10.4.12.12
19         Pop Label  10.2.12.0/24     0             Gi1.24     10.2.4.2
Pop Label  10.2.12.0/24     0             Gi1.412    10.4.12.12
20         Pop Label  10.11.12.0/24    0             Gi1.412    10.4.12.12
21         Pop Label  10.12.13.0/24    0             Gi1.412    10.4.12.12
Pop Label  10.12.13.0/24    0             Gi1.413    10.4.13.13
22         Pop Label  10.2.13.0/24     0             Gi1.24     10.2.4.2
Pop Label  10.2.13.0/24     0             Gi1.413    10.4.13.13
23         22         10.11.11.11/32   0             Gi1.24     10.2.4.2
24001      10.11.11.11/32   0             Gi1.412    10.4.12.12
24         16         10.1.1.1/32      0             Gi1.24     10.2.4.2
24003      10.1.1.1/32      0             Gi1.412    10.4.12.12
25         17         10.1.11.0/24     0             Gi1.24     10.2.4.2
24004      10.1.11.0/24     0             Gi1.412    10.4.12.12
26         Pop Label  10.2.11.0/24     0             Gi1.24     10.2.4.2
27         Pop Label  10.1.2.0/24      0             Gi1.24     10.2.4.2
28         Pop Label  10.2.2.2/32      0             Gi1.24     10.2.4.2

Doing a trace to R1 we get a labeled path

R4#trace 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.2.4.2 [MPLS: Label 16 Exp 0] 3 msec
10.4.12.12 [MPLS: Label 24003 Exp 0] 10 msec
10.2.4.2 [MPLS: Label 16 Exp 0] 3 msec
2 10.1.12.1 3 msec
10.1.2.1 3 msec *

Share

Exame JNCIP-ENT JN0-643

Hoje realizei o exame JN0-643 da Juniper, este exame não é abrangido pelo “Fast track Program” :(. Depois de realizar as formações Advanced Junos Enterprise Routing (AJER) e Advanced Junos Enterprise Switching (AJEX) foi rever as notas e praticar mais a componente de Multicast e QoS.

Pré-Requisitos

É necessário ter a certificação JNCIA-Junos e JNCIS-ENT

Material de Estudo

Como referi anteriormente as formações foram uma base muito importante bem como os materiais disponibilizados. Além dos Labs durante as formações,  usei posteriormente o Juniper Olive , Virtual Labs e o JunosSphere.

Junos Software Release

  • 12.3
  • 12.1 for SRX Series Devices

Treinamento recomendado

Advanced Junos Enterprise Routing (AJER)

Advanced Junos Enterprise Switching (AJEX)

Download Notas Estudo Advanced Junos Enterprise Routing (AJER)

Download Notas Estudo Advanced Junos Enterprise Switching (AJEX)

Objectivos Exame

  • OSPF
  • BGP
  • IP Multicast
  • Ethernet Switching and Spanning Tree
  • Layer 2 Authentication and Access Control
  • IP Telephony Features
  • Class of Service (CoS)
**Clique para expandir/colapsar os objectivos em detalhe**

Exame

A prova tem a duração de 120 minutos com 70 questões. O minimo para passar é de 65%

Resultado

Como sempre o resultado é temporário, mas desta vez as as boas noticias chegaram mais depressa que o previsto. Passei!
juniper_certmanager_09112014
Aqui fica o logo oficial

junipe-jncip-ent

 

Referências:

Juniper Learning Portal

Juniper JNCIS-ENT

Junos documentation

Junos documentation for EX Series switches

Juniper Certificações Junho 2013

Exame JNCIA-Junos JN0-102

Exame JNCIS-ENT JN0-643

Share

Notas estudo JNCIS-ENT parte 11

Nota: Este Post faz parte do guide de Routing.

Monitoring Commands

show ospf route
show ospf database
show ospf statistics
show ospf log

[email protected]> show ospf interface extensive
Interface           State   Area            DR ID           BDR ID          Nbrs
ge-0/0/3.0          DR      0.0.0.1         192.168.1.2     192.168.1.1        1
Type: LAN, Address: 172.26.1.2, Mask: 255.255.255.252, MTU: 1500, Cost: 1
DR addr: 172.26.1.2, BDR addr: 172.26.1.1, Priority: 128, Adj count: 1
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
Topology default (ID 0) -> Cost: 0
ge-0/0/1.0          BDR     0.0.0.0         192.168.1.3     192.168.1.2        1
Type: LAN, Address: 172.26.2.1, Mask: 255.255.255.252, MTU: 1500, Cost: 1
DR addr: 172.26.2.2, BDR addr: 172.26.2.1, Priority: 128, Adj count: 1
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
Topology default (ID 0) -> Cost: 0

O campos de output do comando show ospf interface são:
• Intf: Displays the name of the interface running OSPF.
• State: Displays the state of the interface. It can be BDR ,  Down,  DR,  DRother,  Loop,  PtToPt , or  Waiting.
• Area: Displays the number of the area in which the interface is located.
• DR ID: Displays the address of the area’s designated router.
• BDR ID : Displays the BDR for a particular subnet.
• Nbrs: Displays the number of neighbors on this interface.
• Type (detail and extensive output only): Displays the type of interface. It can be  LAN ,  NBMA,  P2MP,  P2P , or
Virtual.
• address (detail and extensive output only): Displays the IP address of the neighbor.
• mask (detail and extensive output only): Displays the mask of the interface.
• MTU  (detail and extensive output only): Displays the interface’s maximum transmission unit (MTU).
• cost (detail and extensive output only): Displays the interface’s cost (metric).
• DR addr (detail and extensive output only): Displays the address of the designated router.
• BDR addr : Displays the address of the BDR.
• adj count (detail and extensive output only): Displays the number of adjacent neighbors.
• Flood list (extensive output only): Displays the list of LSAs pending flood on this interface.
• Ack list  (extensive output only): Displays the list of pending acknowledgments on this interface.
• Descriptor list (extensive output only): Displays the list of packet descriptors.
• Dead (detail and extensive output only): Displays the configured value for the dead timer.
• Hello (detail and extensive output only): Displays the configured value for the hello timer.
• ReXmit  (detail and extensive output only): Displays the configured value for the retransmit timer.
• OSPF area type (detail and extensive output only): Displays the type of OSPF area, which can be Stub,  Not
Stub, or  NSSA.

O campos de output do comando show ospf route são:
• Prefix : Displays the destination of the route.
• Route/Path Type: Displays how the route was learned:
– ABR : Route to area border router;
– ASBR: Route to AS border router;
– Ext : External router;
– Inter: Interarea route;
– Intra: Intra-area route; or
– Network: Network router.
• Metric : Displays the route’s metric value.
• Next hop i/f: Displays the interface through which the route’s next hop is reachable.
• Next hop addr : Displays the address of the next hop.
• area (detail output only): Displays the area ID of the route.
• options (detail output only): Displays the option bits from the LSA.
• origin  (detail output only): Displays the router from which the route was learned.

O campos de output do comando show ospf database extensive são:
• bits: Displays the flags describing the router that generated the LSP.
• link count: Displays the number of links in the advertisement.
• Each link contains the following output fields:
– id: Displays the ID of a router or subnet on the link.
– data: For stub networks, displays the subnet mask; otherwise, it displays the IP address of the router that
generated the LSP.
– type: Displays the type of link; it can be  PointToPoint,  Transit,  Stub, or  Virtual.
– TOS count: Displays the number of type-of-service (ToS) entries in the advertisement.
– TOS 0 metric: Displays the metric for ToS 0.
• Each ToS entry contains the following output fields:
– TOS : Displays the ToS value.
– metric : Displays the metric for the ToS.
– Aging timer  (extensive output only): Displays how long until the LSA expires (displayed as hrs:min:sec).
– Installed (extensive output only): Displays how long ago the route was installed.
– expires (extensive output only): Displays how long until the route expires (displayed in hrs:min:sec).
– Ours (extensive output only): Indicates that this advertisement is local.

!Visualizar as ocorrências dos cálculos do SPF
show ospf log

OSPF Tracing

set protocols ospf traceoptions file trace-ospf
set protocols ospf traceoptions flag error detail
set protocols ospf traceoptions flag event detail
set protocols ospf area 0 interface ge-0/0/0.0
set protocols ospf area 0 interface lo0.0

Viewing OSPF Error Counters

show ospf statistics
clear ospf statistics

Chapter 4 Border Gateway Protocol

Why BGP?
BGP é um path-vector protocol usado para interdomain routing.

RFC 4271 – BGP version 4 (BGP4)

BGP Peering Sessions

Neighbor States:
TCP Connectivity
Idle
Connect
Active

BGP Connectivity:
OpenSent
OpenConfirm
Established

BGP Message Types
Open
Update
Keepalive
Notification
Refresh – soft clearing do BGP

BGP Update Messages

Descrevem um single path para múltiplos prefixos. BGP peer assume essa informação enquanto não receber nenhum update subsequente advertindo um novo path para o prefixo ou lista-lo como unreachable.

BGP Message Types

BGP Attributes
Type Well-know mandatory
AS Path
Origin
Next-hop

Type Well-know discretionary:
Local Preference
Atomic Aggregator

Type Optional transitive:
Community
Agregator

Type Optional nontransitive:
MED
Cluster List
Originator ID

BGP Attributes

Type Well-know mandatory – A implementação do BGP deve obrigatoriamente suportar
Type Well-know discretionary – A implementação do BGP deve obrigatoriamente suportar
Type Optional transitive – a sua implementação não é obrigatória, mas caso suportado devem ser passados sem serem modificados aos outros Peers BGP
Type Optional nontransitive – a sua implementação não é obrigatória. Se um atributo optional nontransitive não for reconhecido, e ignorado e não enviado aos outros peers

Os Common BGP Attributes:Next-hop,Local Preference,AS-Path,Origin,MED,Community

Next-Hop Attribute

Se o next-hop para um determinado prefixo não for reachable, e colocado na tabela de routing como hidden

show route hidden

Local-Preference Attribute

Atributo visível apenas entre iBGP peers, permite direcionar tráfego de outbound para um determinado peer

Caso seja configurado o local-preference na config e via routing policy, o sistema usa o valor da routing policy

AS-Path Attribute

Verifica o AS-Path e caso o router identifique o seu próprio AS number neste update, é feito Drop devido ao mecanismo de Loop.

É advertido aos restantes peers o best path (menor AS Path para um prefixo)

Origin Attribute

O router que adverte o prefixo e responsável por inserir o atributo Origin

IGP – BGP assigna valor 0 a rota IGP. Exemplos: OSPF, IS-IS, static, e aggregate.
EGP – BGP assigna valor 1 a rota. Rotas EGP do protocolo EGP original, predecessor do BGP
Incomplete – BGP assigna valor 3 a rotas unknown. Estas rotas são conhecidas como não tendo origem no IGP ou EGP

By default o junOS assigna o valor I de IGP, este pode ser alterado usando um routing policy

MED Attribute

Usado para influenciar tráfego inbound (para o meu AS), o BGP assume o MED com valor 0 caso não seja usado o atributo.

Usar o comando metric-out no BGP protocol, group ou neighbor, é possível também usar na routing policy usando metric

Community Attribute

Permite identificar um conjunto de atributos de um grupo de prefixos

set policy-options policy-statement ibgp-export from neighbor 172.25.125.2
set policy-options policy-statement ibgp-export then community set custom-routes

set policy-options community custom-routes members 64700:133

[email protected]# set policy-options policy-statement ibgp-export then community ?
Possible completions:
<community_name>     Name to identify a BGP community
+                    Add BGP communities to the route
–                    Remove BGP communities from the route
=                    Set the BGP communities in the route
add                  Add BGP communities to the route
delete               Remove BGP communities from the route
set                  Set the BGP communities in the route

Summary of BGP Active Route Selection

1. Maior Local Preference
2. AS-Path mais curto
3. Menor Origin Value (I [IGP] < E [EGP] < ? [Incomplete])
4. Menor MED
5. Preferencia de rotas eBGP sob iBGP
6. Prefere best exit do AS (Escolhe o menor cost IGP para o next-hop do BGP)
7. Para rotas eBGP recebidas, prefere a corrente rota, de outra forma prefere a com o menor RID
8. Cluster Length mais curto
9.Prefere as rotas do peer com o menor Peer ID

Descrição de algumas das regras:

6. Escolhe o menor cost IGP para o next-hop do BGP. Para iBGP peer, instala os next-hop com base nas seguintes 3 regras:
a. BGP examina as tabelas inet.0 e inet.3 para encontrar o next-hop. É escolhido o next-hop com menor preference, frequentemente o BGP usa a versão do next-hop inet.3, via MPLS LSP.

b. A preference deve empatar na inet.0 e inet.3, e usado o next-hop na instance inet.3

c. Quando existe um empate na preference e a instance esta na mesma routing table, e examinado o numero de equal-cost paths por cada instance. E instalado o next-hop da instance com mais paths
Este empate é capaz ocorrer quando traffic-engineering bgp-igp é usado no MPLS.

7. BGP usa a rota advertida pelo peer com menor RID. Quando comparando rotas external de 2 External ASs distinctos, se as rotas forem iguais ate a comparação do RID, e preferida a corrente rota.
Esta preferência previne issues relacionados com oscilação de rotas relacionados com o MED
O comando external-router-id sobrepoem-se a este comportamento e prefere a rota external com o menor RID, independentemente de que rota esta atualmente activa.

IBGP Next-Hop Propagation

By default o Next-hop de uma rota eBGP não e alterada, quando e injectada no iBGP.
Usar o comando next-hop self na routing policy

Referências:

Notas estudo JNCIS-ENT parte 1

Notas estudo JNCIS-ENT parte 2

Notas estudo JNCIS-ENT parte 3

Notas estudo JNCIS-ENT parte 4

Notas estudo JNCIS-ENT parte 5

Notas estudo JNCIS-ENT parte 6

Notas estudo JNCIS-ENT parte 7

Notas estudo JNCIS-ENT parte 8

Notas estudo JNCIS-ENT parte 9

Notas estudo JNCIS-ENT parte 10

Share

Notas Outbound Route Filtering (ORF)

Esta feature do BGP permite ao router controlar através de um prefix-list quais os prefixos que o BGP peer deve enviar, permitindo assim reduzir o numero de prefixos processados. Sintaxe:

router bgp autonomous-system-number
 
neighbor ip-address capability orf prefix-list [send | receive | both]
 
neighbor {ip-address| peer-group-name} prefix-list prefix-list-name {in | out}

Notas:

  • Apenas é usado em eBGP
  • Não suporta multicast
  • Deve ser configurado apenas por address family

Diagrama

BGP Outbound Router Filtering (ORF)

Exemplo 1

O router R2 pretende receber apenas o prefixo 192.168.2.0/24

R1

router bgp 65100
neighbor 192.168.1.2 remote-as 65200
address-family ipv4
neighbor 192.168.1.2 capability orf prefix-list receive

R2

ip prefix-list ORFFILTER seq 5 permit 192.168.2.0/24
 
router bgp 65200
neighbor 192.168.1.1 remote-as 65100
address-family ipv4
neighbor 192.168.1.1 capability orf prefix-list send
neighbor 192.168.1.1 prefix-list ORFFILTER in

 
Verificar os prefixos a filtrar no peering com o R2, definidos pelo prefix-list em R2:

R1#show ip bgp neighbors 192.168.1.2 received prefix-filter
Address family: IPv4 Unicast ip prefix-list 192.168.1.2: 1 entries seq 5 permit 192.168.2.0/24
 
R1#show ip bgp neighbors 192.168.1.2 | beg ORF
Outbound Route Filter (ORF) type (128) Prefix-list:
Send-mode: received
Receive-mode: advertised
Outbound Route Filter (ORF): received (1 entries)

Sent Rcvd
Prefix activity: —- —-
Prefixes Current: 0 0
Prefixes Total: 0 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 0
Used as multipath: n/a 0

Outbound Inbound
Local Policy Denied Prefixes: ——– ——-
ORF prefix-list: 4 n/a
Total: 4 0
Number of NLRIs in the update sent: max 3, min 1

Tabela de routing do R2

R2#show ip route bgp
 
B 192.168.2.0/24 [20/0] via 192.168.1.1, 00:01:12

 

Exemplo 2

O router R2 pretende receber todos os prefixos excepto o 192.168.2.0/24

R1

router bgp 65100
neighbor 192.168.1.2 remote-as 65200
address-family ipv4
neighbor 192.168.1.2 capability orf prefix-list receive

R2

ip prefix-list ORFFILTER seq 5 deny 192.168.2.0/24
ip prefix-list ORFFILTER seq 10 permit le 0.0.0.0/0 le 32
 
router bgp 65200
neighbor 192.168.1.1 remote-as 65100
address-family ipv4
neighbor 192.168.1.1 capability orf prefix-list send
neighbor 192.168.1.1 prefix-list ORFFILTER in

Verificar os prefixos a filtrar no peering com o R2, definidos pelo prefix-list em R2:

R1#show ip bgp neighbors 192.168.1.2 received prefix-filter
Address family: IPv4 Unicast
ip prefix-list 192.168.1.2: 2 entries
seq 5 deny 192.168.2.0/24
seq 10 permit 0.0.0.0/0 le 32
 
R1#show ip bgp neighbors 192.168.1.2 | beg ORF
Outbound Route Filter (ORF) type (128) Prefix-list:
Send-mode: received
Receive-mode: advertised
Outbound Route Filter (ORF): received (2 entries)
Sent Rcvd
Prefix activity: —- —-
Prefixes Current: 3 0
Prefixes Total: 3 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 0
Used as multipath: n/a 0Outbound Inbound
Local Policy Denied Prefixes: ——– ——-
ORF prefix-list: 1 n/a
Total: 1 0
Number of NLRIs in the update sent: max 3, min 1

Tabela de routing do R2

R2#show ip route bgp
B 192.168.4.0/24 [20/0] via 192.168.1.1, 00:00:36
B 192.168.5.0/24 [20/0] via 192.168.1.1, 00:00:36
B 192.168.3.0/24 [20/0] via 192.168.1.1, 00:00:36

Nota:As alterações efetuadas na prefix-list não são propagadas automaticamente, sendo necessário forçar usando:

R2#clear ip bgp 192.168.1.1 in prefix-filter

@Atualizado 19/12/2015

Share

Notas BGP regex

O regex e essencialmente um parser, mas aplicado ao BGP torna-se um utilitário muito útil no parsing de rotas aprendidas pelo router. Existem alguns servidores públicos de rotas onde e possível testar o regex no BGP (consultar lista abaixo).

Exemplos:

!Rotas originadas no AS 21740

ns-route-server> sh ip bg reg _21740$
BGP table version is 934229088, local router ID is 24.137.100.8
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path
*>i8.5.0.0/24       77.67.70.141           622    100      0 3257 21740 i
*>i8.5.0.0/23       77.67.70.141           622    100      0 3257 21740 i

!Rotas com origem nos neighbors do AS 3257

ns-route-server>sh ip bg reg ^3257_([0-9]+)?$
BGP table version is 934227310, local router ID is 24.137.100.8
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path
* i1.9.0.0/16       77.67.70.77             90    100      0 3257 4788 i
*>i1.9.52.0/24      77.67.70.77            180    100      0 3257 4788 ?
*>i1.9.53.0/24      77.67.70.141           613    100      0 3257 4788 ?

 

Tabela Caracteres no Regex:

Caracter Significado
^ Start of string
$ End of string
[] Range of characters
Used to specify range ( i.e. [0-9] )
( ) Logical grouping
. Any single character
* Zero or more instances
+ One or more instance
? Zero or one instance
_(underscore) Comma, open or close brace, open or close parentheses, start or end of string, or space
\ Matches the character following the backslash. Also matches (escapes) special characters.
| Concatenates constructs. Matches one of the characters or character patterns on either side of the vertical bar.

Lista servidores públicos de rotas:

Country City

Provider

ASN

Africa/Ghana MTN Ghana 37255
Australia/Chatswood Optus Australia 7474
Brazil/Sao Paulo PTT-Metro Sao Paulo 22548
Brazil/Sao Paulo Terremark Internet Exchange Sao Paulo 1251
Canada/Vancouver GT Group Telecom (West) 6539
Canada GT Group Telecom (East) 6539
Canada/Burnaby Telus – Eastern Canada 852
Canada Telus – Western Canada 852
Canada/Toronto Allstream – Central 15290
Canada/Montreal Allstream – East 15290
Canada/Vancouver Allstream – West 15290
Canada/Halifax Eastlink 11260
Germany/Hamburg Broadnet Mediascape Communications AG 9132
France OpenTransit 5511
Finland Eunet Finland 6667
Germany Tiscali 3257
Germany/Stuttgart BelWue 553
Japan Oregon Route Views Project 2500
Mexico Rio Grande do Sul Internet Exchange 1916
Netherlands Zebra Route Views on  Swift Global 21280
Philippines Bayan Telecom Inc. 6648
Philippines Manila Internet Exchange 9670
Romania Astral Telecom 6746
Switzerland Swisscom IP Plus 3303
South Africa South AfricanInternet Exchange – SAIX 5713
South Africa/Mauritius Internet Solutions 3741
Switzerland Sunrise Switzerland 6730
USA/Denver Time Warner Telecom 4323
USA/Ashburn Nlayer 4436
USA/Boca Raton, FL Host.net 13645
USA/Santa Clara Savvis 3561
USA/Sunnyvale Global Crossing 3549
USA/Oregon University of Oregon Route Views Project 6447
USA/Ashburn, VA Zebra Route Views on Sprint Network 1239
USA/CA Zebra Route Views on ISC.org 3557
USA/Fremont,  CA Hurricane Electric 6939
USA/New York AT&T 7018
USA/Las Vergas Switch Communications 23005
USA/SanDiego CERFnet 1838
USA/Broomfield, CO Wiltel 7911
UK Colt Internet 8220
UK Oregon Route Views with Verizon UK 5459
UK Global Crossing – Europe 3549
UK Energis / Planet Online 5388
UK PIPEX 5413
UK/London MainzKom Telekommunikation GmbH 15837

Share