Sunday, October 9, 2011

LAB: BGP - BGP Local AS

- AS 100 is planning transition to the AS number 146. Configure R4 and R6 and to use the new AS number while R1 should still use the old AS 100.
- Ensure all BGP peering relationships are still maintained but do not modify the configurations of any routers with except to R1, R4 and R6.

The Hide Local Autonomous System feature could be useful when migrating an autonomous system to a different AS number. When the AS has multiple eBGP peering links, it may become time consuming to negotiate the AS number change with all peering partners. In this case, you may reconfigure the local BGP speakers to use the new AS number but advertise the old AS in BGP OPEN messages and BGP updates. This could be enforced on per-eBGP peer basis using the command 

neighbor <IP> local-as <OldAS> [no-prepend]

The local-as <OldAS> command instructs the local router to advertise the <OldAS> number in BGP OPEN messages instead of the AS number specified with router bgp <NewAS> command. In addition to that, all BGP prefixes advertised to this eBGP peer would have the AS numbers <OldAS> <NewAS> preprended in front of every BGP update’s AS_PATH attribute. Thus, the external system may continue with the local system using the old AS number. In addition to that, the external system will see the updates coming from the <OldAS> looking like they first transited <NewAS>. This is needed to avoid BGP routing loops.
If you specify the no-prepend keyword, then any routes received from the eBGP peer will not have <OldAS> prepended upon reception. By default the AS number specified with the local-as command (<OldAS>) is prepended to all updates received, to avoid potential routing loops. However, this may cause problems with partial transitions, when part of your AS is using the new AS number, and another part is still using the old AS number. The routers using the old number will reject such updates due to the same AS number present in AS_PATH.

configuration:

R1:
neighbor 155.1.146.4 remote-as 146
neighbor 155.1.146.6 remote-as 146
neighbor 155.1.13.3 remote-as 200

R4:
router bgp 146
neighbor 155.1.146.1 remote-as 100
neighbor 204.12.1.254 remote-as 54
neighbor 204.12.1.254 local-as 100 no-prepend
neighbor 155.1.45.5 remote-as 200
neighbor 155.1.45.5 local-as 100 no-prepend
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0 summary-only

R6:
router bgp 146
neighbor 155.1.146.1 remote-as 100
neighbor 54.1.1.254 remote-as 54
neighbor 54.1.1.254 local-as 100 no-prepend
neighbor 155.1.67.7 remote-as 300
neighbor 155.1.67.7 local-as 100 no-prepend
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0 summary-only


verification:

Rack1R1#show ip bgp regexp _54$
BGP table version is 89, local router ID is 150.1.1.1
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
*  28.119.16.0/24   155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  28.119.17.0/24   155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  114.0.0.0        155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  115.0.0.0        155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  116.0.0.0        155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  117.0.0.0        155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  118.0.0.0        155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i
*  119.0.0.0        155.1.146.6                            0 146 54 i
*>                  155.1.146.4                            0 146 54 i

note: Keep in mind that no-prepend feature applies only to inbound learned routes. All externally advertise routes still have the local-as number prepended.

Rack1SW1#show ip bgp reg
Rack1SW1#show ip bgp regexp 146_54$
BGP table version is 159, local router ID is 150.1.77.77
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
*> 28.119.16.0/24   155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 28.119.17.0/24   155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 114.0.0.0        155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 115.0.0.0        155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 116.0.0.0        155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 117.0.0.0        155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 118.0.0.0        155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i
*> 119.0.0.0        155.1.67.6                             0 100 146 54 i
*                   155.1.37.3                             0 200 100 146 54 i

Rack1R6#show ip bgp regexp _54$
BGP table version is 49, local router ID is 150.1.6.6
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
*> 28.119.16.0/24   54.1.1.254                             0 100 54 i
*> 28.119.17.0/24   54.1.1.254                             0 100 54 i
*> 114.0.0.0        54.1.1.254               0             0 100 54 i
*> 115.0.0.0        54.1.1.254               0             0 100 54 i
*> 116.0.0.0        54.1.1.254               0             0 100 54 i
*> 117.0.0.0        54.1.1.254               0             0 100 54 i
*> 118.0.0.0        54.1.1.254               0             0 100 54 i
*> 119.0.0.0        54.1.1.254               0             0 100 54 i


R1 is not installing route learned via R6 which has the 100 146 AS sequence since R1 also belongs to AS 100

Rack1R1#show ip bgp regexp _54$
BGP table version is 89, local router ID is 150.1.1.1
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
*> 28.119.16.0/24   155.1.146.4                            0 146 54 i
*> 28.119.17.0/24   155.1.146.4                            0 146 54 i
*> 114.0.0.0        155.1.146.4                            0 146 54 i
*> 115.0.0.0        155.1.146.4                            0 146 54 i
*> 116.0.0.0        155.1.146.4                            0 146 54 i
*> 117.0.0.0        155.1.146.4                            0 146 54 i
*> 118.0.0.0        155.1.146.4                            0 146 54 i
*> 119.0.0.0        155.1.146.4                            0 146 54 i

No comments:

Post a Comment