La future local-as consente ad un apparato di apparire membro di un secondo AS
in aggiunta al suo reale AS.
Tale future può essere utilizzata solo
per peer ebgp. Supponiamo quindi di avere la seguente situazione (riportata nel
diagramma sottostante) in cui nel dominio 65535 vogliamo che il device R1 per
il neighbor 89.96.14.217 appartenga all’AS 198319.
Se R2 punterà
sempre all’AS 198319 nel caso di R1 avremo la seguente configurazione.
router
bgp 65535
!
neighbor
89.96.14.217 local-as 198319
In questo caso
un eventuale update verso R2 (es rotta 50.1.1.1/24) l’AS path sarà composto da
AS_LOCAL + AS_REAL, per le rotte ricevute invece sarà LOCAL_AS + AS_PEER_REMOTO
R2#show bgp
Fri Apr 12 09:53:42.702 MET
BGP router identifier 10.252.20.56,
local AS number 15500
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 8494826
BGP main routing table version
8494826
BGP NSR Initial initsync version
2100187 (Reached)
BGP tunnel nexthop version 1
BGP scan interval 60 secs
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
*>
50.1.1.0/24 82.149.32.2 0 0 198319 65535 ?
*>
82.149.32.2/32 82.149.32.2 0 0 198319 65535 ?
R2#show bgp
Network Next Hop Metric LocPrf Weight Path
*> 2.228.29.68/30 0.0.0.0 0 32768 ?
*>
7.30.0.252/32 89.96.14.217 65546 0 198319 15500 ?
*>
7.30.0.253/32 89.96.14.217 65546 0 198319 15500 ?
*>
7.30.0.254/32 89.96.14.217 65546 0 198319 15500 ?
*>
7.30.0.255/32 89.96.14.217 65546 0 198319 15500 ?
Se per le rotte ricevute non
voglio aggiungere il LOCAL_AS devo utilizzare keyword “no-prepend”
router bgp 65535
!
neighbor 89.96.14.217 local-as
198319 no-prepend
R1#show bgp
BGP table version is 106, local router
ID is 10.0.0.254
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m
multipath, b backup-path, f RT-Filter,
x best-external, a
additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? -
incomplete
RPKI validation codes: V valid, I
invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>
2.228.29.68/30 0.0.0.0 0 32768 ?
*>
7.30.0.252/32 89.96.14.217 65546 0 15500 ?
*>
7.30.0.253/32 89.96.14.217 65546 0 15500 ?
*>
7.30.0.254/32 89.96.14.217 65546 0 15500 ?
Se nell’update verso R2 non voglio
che il REAL_AS (65535) si aggiunto dobbiamo utilizzare “replace-as”.
router bgp 65535
!
neighbor 89.96.14.217 local-as
198319 no-prepend replace-as
R2#show bgp
Fri Apr 12 10:03:23.289 MET
BGP router identifier 10.252.20.56, local AS
number 15500
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 8494858
BGP main routing table version 8494858
BGP NSR Initial initsync version 2100187
(Reached)
BGP tunnel nexthop version 1
BGP scan interval 60 secs
*> 50.1.1.0/24 82.149.32.2 0 0 198319 ?
*> 82.149.32.2/32 82.149.32.2 0 0 198319