BGP Non-contiguous repeats

Have a question or want to start a discussion? Post it! No Registration Necessary.  Now with pictures!

Threaded View
If I see an AS path like 1234 5678 2345 5678 6789, shall I conclude
that the repeat was _unintentional_ and an error? Or can someone do
that non-contiguous repeat intentionally? If so, what can one achieve
by repeating an AS non-contiguously in an AS path?


Re: BGP Non-contiguous repeats
vijay wrote:

Quoted text here. Click to load it

Are you suggesting the same AS can appear twice in an AS_PATH? That would mean
a routing loop.

I might have a play in the LAB and see if I can manage that by a prepend or
something...
--
Paul Matthews                          
paul@cattytown.me.uk
http://www.hepcats.co.uk

Re: BGP Non-contiguous repeats
Quoted text here. Click to load it

Yes. I mean the same. You can see many in route-views archive. My
question is "Is this a mistake?" or people can do this intentionally
for some sort of _traffic engineering_.


Re: BGP Non-contiguous repeats
Quoted text here. Click to load it

It should not "just happen" as the AS-PATH attribute is the primary loop
prevention mechanism. if a BGP speaker sees an update with its own AS number in
it, that update is dropped.

It is certainly possible to force it. I set three routers up in the lab with
three separate AS nos.

R9 (9) was the originator, R2 (2) a transit SS and R3 (3) the end AS. Setting
route maps on R2 out on the neighbor statement:

route-map loop permit 10
 match ip address 10
 set as-path prepend 10 11 12 11 12 11 12
!
!
route-map add permit 10
 match ip address 10
 set as-path prepend 2


router bgp 9
 neighbor 10.20.29.2 route-map loop out


with the "add" route map. the update was dropped at R2 - as it thought i had
already been through AS 2.


With the loop I got:
r2#sh ip bgp

BGP table version is 9, local router ID is 10.45.45.4
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
*> 10.20.9.0/24     10.20.29.9               0             0 9 10 11 12 11 12
11 12 i

*> 10.35.35.0/24    10.20.23.3               0             0 3 i

on R2.

So I namaged to force it. I also got the following on R3:

3660-r3#sh ip bgp
BGP table version is 5, local router ID is 10.35.35.3
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
*> 10.20.9.0/24     10.20.23.2                             0 2 9 10 11
12 11 12 11 12 i
*> 10.35.35.0/24    0.0.0.0                  0         32768 i

So it was onwards advertised.

Why would we want to do that? TBH I am struggling a little. Listing an AS could
be used as a rudimentary propagation control - "I want this go go everywhere
but AS 9,10 and 11" kind of thing.

The path length can be used to select routes, but it is a pretty blunt
instrument.
--
Paul Matthews                          
paul@cattytown.me.uk
http://www.hepcats.co.uk

Re: BGP Non-contiguous repeats
Paul Matthews wrote:
Quoted text here. Click to load it

Forgot to add - this *can* be turned off.
--
Paul Matthews                          
paul@cattytown.me.uk
http://www.hepcats.co.uk

Site Timeline