BGP local-AS
Great examples Ivan!
On Mon, Jan 12, 2009 at 11:53 AM, Ivan Walker wrote:
> Hi Praveen, > > local-as : the AS that the router is masquerading as is prepended to > incoming routes and prepended to outgoing routes following the configured > AS > no-prepend: the AS that the router is masquerading as is no longer > prepended to incoming routes > replace-as: the AS that the router is configured with as is no longer > prepended to outgoing routes - only the AS that the router is > masquerading as is prepended > dual-as: allow the neighbor to use the configured as or the AS that the > router is masquerading as > > the following should help illustrate > > R1 Initial Config: > ================== > interface Loopback0 > ip address 1.1.1.1 255.255.255.0 > interface FastEthernet0/0 > ip address 12.12.12.1 255.255.255.0 > router bgp 111 > bgp router-id 1.1.1.1 > no bgp default ipv4-unicast > bgp log-neighbor-changes > neighbor 12.12.12.2 remote-as 222 > neighbor 12.12.12.2 version 4 > address-family ipv4 > neighbor 12.12.12.2 activate > no auto-summary > no synchronization > network 1.1.1.0 mask 255.255.255.0 > exit-address-family > > R2 Initial Config: > =================== > interface Loopback0 > ip address 2.2.2.2 255.255.255.0 > interface FastEthernet0/0 > ip address 12.12.12.2 255.255.255.0 > router bgp 222 > bgp router-id 2.2.2.2 > no bgp default ipv4-unicast > bgp log-neighbor-changes > neighbor 12.12.12.1 remote-as 111 > neighbor 12.12.12.1 version 4 > address-family ipv4 > neighbor 12.12.12.1 activate > no auto-summary > no synchronization > network 2.2.2.0 mask 255.255.255.0 > exit-address-family > > R1#show ip bgp 2.2.2.0 > BGP routing table entry for 2.2.2.0/24, version 9 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 222 > 12.12.12.2 from 12.12.12.2 (2.2.2.2) > Origin IGP, metric 0, localpref 100, valid, external, best > > R2#show ip bgp 1.1.1.0 > BGP routing table entry for 1.1.1.0/24, version 3 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 111 > 12.12.12.1 from 12.12.12.1 (1.1.1.1) > Origin IGP, metric 0, localpref 100, valid, external, best > > ++++++++++++++++++++++local-as+++++++++++++++++++++++++++++++ > > R1 to masquerade as AS666 > R1(config-router)# neighbor 12.12.12.2 local-as 666 > > R2 updated to peer with AS666 > R2(config-router)# neighbor 12.12.12.1 remote-as 666 > > R1#show ip bgp 2.2.2.0 > BGP routing table entry for 2.2.2.0/24, version 3 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 666 222 > 12.12.12.2 from 12.12.12.2 (2.2.2.2) > Origin IGP, metric 0, localpref 100, valid, external, best > > R2#show ip bgp 1.1.1.0 > BGP routing table entry for 1.1.1.0/24, version 17 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 666 111 > 12.12.12.1 from 12.12.12.1 (1.1.1.1) > Origin IGP, metric 0, localpref 100, valid, external, best > > ++++++++++++++++++++++no-prepend+++++++++++++++++++++++++++++++ > > R1(config-router)# neighbor 12.12.12.2 local-as 666 no-prepend > > R1#show ip bgp 2.2.2.0 > BGP routing table entry for 2.2.2.0/24, version 5 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 222 > 12.12.12.2 from 12.12.12.2 (2.2.2.2) > Origin IGP, metric 0, localpref 100, valid, external, best > > R2#show ip bgp 1.1.1.0 > BGP routing table entry for 1.1.1.0/24, version 19 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 666 111 > 12.12.12.1 from 12.12.12.1 (1.1.1.1) > Origin IGP, metric 0, localpref 100, valid, external, best > > ++++++++++++++++++++++replace-as+++++++++++++++++++++++++++++++ > > R1(config-router)# neighbor 12.12.12.2 local-as 666 no-prepend replace-as > > R1#show ip bgp 2.2.2.0 > BGP routing table entry for 2.2.2.0/24, version 7 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 222 > 12.12.12.2 from 12.12.12.2 (2.2.2.2) > Origin IGP, metric 0, localpref 100, valid, external, best > > R2#show ip bgp 1.1.1.0 > BGP routing table entry for 1.1.1.0/24, version 21 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 666 > 12.12.12.1 from 12.12.12.1 (1.1.1.1) > Origin IGP, metric 0, localpref 100, valid, external, best > > ++++++++++++++++++++++dual-as+++++++++++++++++++++++++++++++ > > R2(config-router)#neighbor 12.12.12.1 remote-as 111 > [R2] %BGP-3-NOTIFICATION: sent to neighbor 12.12.12.1 2/2 (peer in wrong > AS) 2 bytes 029A > [R2] FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 002D 0104 029A 00B4 0101 0101 > 1002 0601 0400 0100 0102 0280 0002 0202 00 > > R1(config-router)# neighbor 12.12.12.2 local-as 666 no-prepend replace-as > dual-as > [R2] %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up > > R1#show ip bgp 2.2.2.0 > BGP routing table entry for 2.2.2.0/24, version 9 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Not advertised to any peer > 222 > 12.12.12.2 from 12.12.12.2 (2.2.2.2) > Origin IGP, metric 0, localpref 100, valid, external, best > > R2#show ip bgp 1.1.1.0 > BGP routing table entry for 1.1.1.0/24, version 23 > Paths: (1 available, best #1, table Default-IP-Routing-Table) > Flag: 0×820 > Not advertised to any peer > 111 > 12.12.12.1 from 12.12.12.1 (1.1.1.1) > Origin IGP, metric 0, localpref 100, valid, external, best > > Ivan > > > > > Hi GS, > > > > Need some help in BGP local-AS parameter? > > > > I tried it in my lab without any problem but not able to understand the > > difference between No-prepend, Replace-as and dual-as parameter. > > > > Thanks > > > > > > Blogs and organic groups at http://www.ccie.net > > > > _______________________________________________________________________ > > Subscription information may be found at: > > http://www.groupstudy.com/list/CCIELab.html > > > Blogs and organic groups at http://www.ccie.net > > _______________________________________________________________________ > Subscription information may be found at: > http://www.groupstudy.com/list/CCIELab.html > > > > > > > >
— Pavel Bykov —————- Don’t forget to help stopping the braindumps, use of which reduces value of your certifications. Sign the petition at http://www.stopbraindumps.com/
Blogs and organic groups at http://www.ccie.net
























