From: Scott Morris (swm@emanon.com)
Date: Sun Dec 28 2003 - 00:15:53 GMT-3
It's not really that it pre-pended on the right hand side of things,
it's just hard to tell in your example here!
Let's assume that R1's BGP table showed an AS set of "100 200 300 i"
As soon as it pre-pended what you told it, the AS set would be "65401
65402 100 200 300 i"
As soon as the route got advertised to a neighbor, R2's BGP table would
see "65400 65401 65402 100 200 300 i"
So it really pre-pends it, but it pre-pends to the existing AS path, and
BEFORE the route is advertised out with the latest AS number added on.
Hope that helps!!
Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713,
CISSP, JNCIS, et al.
IPExpert CCIE Program Manager
IPExpert Sr. Technical Instructor
swm@emanon.com/smorris@ipexpert.net
http://www.ipexpert.net
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Pun, Alec CL
Sent: Saturday, December 27, 2003 12:10 PM
To: Scott Morris; 'Brown, Jim'; ccielab@groupstudy.com
Subject: RE: BGP as-path prepend confusion !
Scott,
So why the as-prepend command (applied on R1 outbound) put the new AS in
the right-most instead of left-most ? As Ozgur pointed out, the new AS
will be put in the right-most if the same route-map is applied on R2
inbound. Any clue ?
rgds,
alec
R1
router bgp 65400
no synchronization
bgp log-neighbor-changes
network 3.3.3.0 mask 255.255.255.0
neighbor 192.168.4.1 remote-as 1
neighbor 192.168.4.1 route-map prepend-as out
no auto-summary
route-map prepend-as permit 10
set as-path prepend 65401 65402
!
R2#sh ip bgp
BGP table version is 8, local router ID is 204.100.100.97 Status codes:
s suppressed, d damped, h history, * valid, > best, i - internal Origin
codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.3.3.0/24 192.168.4.2 0 0 65400 65401
65402 i
-----Original Message-----
From: Scott Morris [mailto:swm@emanon.com]
Sent: Sunday, December 28, 2003 12:56 AM
To: 'Brown, Jim'; Pun, Alec CL; ccielab@groupstudy.com
Subject: RE: BGP as-path prepend confusion !
I think you are thinking a little backwards.
The list reads just like you would read an english sentence, from left
to right.
The closest AS (one who advertised) is "pre-pended" at the left-most
position in the AS SET (which you have correct). Think of it like
making a word seem longer like a super-long word instead of just a long
word. I pre-pended "super-". But you still read the word the same.
Per RFC 1771:
b) When a given BGP speaker advertises the route to a BGP speaker
located in a neighboring autonomous system, then the advertising
speaker shall update the AS_PATH attribute as follows:
1) if the first path segment of the AS_PATH is of type
AS_SEQUENCE, the local system shall prepend its own AS number
as the last element of the sequence (put it in the leftmost
<<<----
position).
2) if the first path segment of the AS_PATH is of type AS_SET,
the local system shall prepend a new path segment of type
AS_SEQUENCE to the AS_PATH, including its own AS number in that
segment.
Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713,
CISSP, JNCIS, et al. IPExpert CCIE Program Manager IPExpert Sr.
Technical Instructor swm@emanon.com/smorris@ipexpert.net
http://www.ipexpert.net
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Brown, Jim
Sent: Saturday, December 27, 2003 11:43 AM
To: Pun, Alec CL; ccielab@groupstudy.com
Subject: RE: BGP as-path prepend confusion !
The AS Path List reads from right to left with the leftmost side being
the origin.
The AS number is prepended to the beginning of the list which is the
left-hand side.
-----Original Message-----
From: Pun, Alec CL [mailto:Alec.CL.Pun@pccw.com]
Sent: Saturday, December 27, 2003 3:01 AM
To: ccielab@groupstudy.com
Subject: BGP as-path prepend confusion !
Hi group,
I am confused by the command "set as-path prepend" as the new AS #
should be appended instead of prepended to the originated AS #, right ?
My assumption of prepend is that new AS # should be added to the left of
the AS-Path.
rgds,
alec
R1
router bgp 65400
no synchronization
bgp log-neighbor-changes
network 3.3.3.0 mask 255.255.255.0
neighbor 192.168.4.1 remote-as 1
neighbor 192.168.4.1 route-map prepend-as out
no auto-summary
route-map prepend-as permit 10
set as-path prepend 65401 65402
!
R2#sh ip bgp
BGP table version is 8, local router ID is 204.100.100.97 Status codes:
s suppressed, d damped, h history, * valid, > best, i - internal Origin
codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.3.3.0/24 192.168.4.2 0 0 65400 65401
65402 i
This archive was generated by hypermail 2.1.4 : Sat Jan 03 2004 - 08:25:45 GMT-3