BGP local-as

Create an alternate AS for certain neighbors…
Say you change AS but just for one neighbor and do not want to delete your entire BGP configuration:

NewYork#sh run | s bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
network 10.200.255.1 mask 255.255.255.255
network 222.222.222.0
neighbor 10.200.254.2 remote-as 1
neighbor 10.200.254.2 local-as 65000
neighbor 10.200.254.2 ebgp-multihop 2
neighbor 10.200.254.2 update-source Loopback0
no auto-summary

Router#sh run | s bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 10.200.254.1 remote-as 65000
neighbor 10.200.254.1 ebgp-multihop 2
neighbor 10.200.254.1 update-source Loopback0
no auto-summary

Router#sh ip bgp
BGP table version is 7, local router ID is 10.200.254.2
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
*> 10.200.255.1/32 10.200.254.1 0 0 65000 2 i
*> 222.222.222.0 10.200.254.1 0 0 65000 2 i

Router#sh ip bgp summary
BGP router identifier 10.200.254.2, local AS number 1
BGP table version is 7, main routing table version 7
2 network entries using 240 bytes of memory
2 path entries using 104 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 616 total bytes of memory
BGP activity 4/2 prefixes, 4/2 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.200.254.1 4 65000 20 18 7 0 0 00:05:20 2

use no-prepend to hide local AS on advertisements of externally learned routes, in this case HIDE AS 2:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s