Identificar rotas aprendidas no BGP e alterando preferências.

1) Para identificar as rotas aprendidas pelo BGP, utilizar o comando:
display bgp routing-table IP de destino

Ex: para o site apple.com, a partir de uma consulta no terminal com o nslookup (nslookup apple.com 168.197.152.21) foi obtido o ip 17.253.144.10, outra possibilidade é através da extensão IPvFOO no chrome.

No roteador BGP

#display bgp routing-table 17.253.144.10

Este comando retornará todos os caminhos aprendidos, como no exemplo:

BGP routing table entry information of 17.253.144.0/24:
 From: 187.16.213.182 (17.0.1.192)  
 Route Duration: 3d10h43m19s
 Direct Out-interface: 100GE0/3/2.3343
 Original nexthop: 187.16.213.182
 Qos information : 0x0
 Community: <65000:40000>
 AS-path 714, origin igp, MED 0, localpref 350, pref-val 0, valid, external, pre 255, not preferred for router ID
 Aggregator: AS 714, Aggregator ID 17.0.1.186, Atomic-aggregate
 Not advertised to any peer yet

 BGP routing table entry information of 17.253.144.0/24:
 From: 200.217.250.121 (200.195.96.81)  
 Route Duration: 5d01h23m56s
 Direct Out-interface: 100GE0/3/2.1220
 Original nexthop: 200.217.250.121
 Qos information : 0x0
 AS-path 7738 714, origin igp, MED 0, pref-val 0, valid, external, pre 255, not preferred for Local_Pref
 Aggregator: AS 714, Aggregator ID 17.0.1.186, Atomic-aggregate
 Not advertised to any peer yet

 BGP routing table entry information of 17.253.144.0/24:
 From: 201.150.148.5 (201.150.148.2)  
 Route Duration: 13d10h25m35s
 Direct Out-interface: 100GE0/3/2.70
 Original nexthop: 201.150.148.5
 Qos information : 0x0
 AS-path 61817 4230 714, origin igp, pref-val 0, valid, external, pre 255, not preferred for AS-Path
 Aggregator: AS 714, Aggregator ID 17.0.1.186, Atomic-aggregate
 Not advertised to any peer yet

Ao todo, 3 rotas foram identificadas:
Direct Out-interface: 100GE0/3/2.3343 (PTT-SP)
Direct Out-interface: 100GE0/3/2.1220 (OI)
Direct Out-interface: 100GE0/3/2.70 (HALLEY)

2) Após identificar as rotas de origem, vamos alterar o tráfego do o bloco desejado para a OI (V-tal), por meio de uma route-policy de entrada. Neste caso utilizaremos o aumento da preferência por esta rota, com a função local-preference.

No Roteador BGP

#display current-configuration | section include OI | section exclude bgp
(o comando acima irá listas todas as route-policies para a OI)

Escolhemos a linha abaixo, resultado do retorno da consulta de route-policy acima:

route-policy RP-UOP-OI-V4-IN permit node 8
 if-match ip-prefix PL-PREFERENCE-OI
 apply local-preference 380

3) Ao selecionar essa prefix-list dentro da route-policy, adicionaremos uma regra de permissão.

No Roteador BGP

#display current-configuration | include PL-PREFERENCE-OI
(o comando acima consulta a prefix-list que desejamos)

aparece então a lista de regras já configuradas

if-match ip-prefix PL-PREFERENCE-OI
if-match ipv6 address prefix-list PL-PREFERENCE-OI-V6
ip ip-prefix PL-PREFERENCE-OI index 11 permit 8.240.0.0 12
ip ip-prefix PL-PREFERENCE-OI index 12 permit 199.7.91.0 24
ip ip-prefix PL-PREFERENCE-OI index 13 permit 168.232.123.0 24
ip ipv6-prefix PL-PREFERENCE-OI-V6 index 10 permit 2001:500:A8:: 48

adicionamos a PL a partir do último index disponível e com o ip e máscara aprendidos no bgp

#system-view
#ip ip-prefix PL-PREFERENCE-OI index 14 permit 17.253.144.0 24
#commit

Pronto! Após aplicar o comando acima, a preferência será para a rota escolhida. A alteração pode ser validada através da ferramenta traceroute ou MTR.