cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
896
Views
0
Helpful
3
Replies
trevor240
Beginner

AS Path Prepending not working - Cisco Catalyst 3560-X

Hello everyone,

 

I am trying to get AS-Path prepending to work on my switch in my network but it isn't prepending the AS as it should be doing per the route-map. This is all within my home lab that I am also using to connect to the internet. I am peering with my two upstream routers and sending down a default route from both of those. The routes that you see with my own AS being prepended is the upstream router doing that. As an example Router A (172.16.1.1) shows the AS being prepended 5 times.

 

Here is my configuration:

 

show run | s route-map

route-map Failover permit 10

set metric 15000

set as-path prepend 64512 64512 64512 64512 64512 64512 64512 64512

route-map Primary permit 10

set metric 5000

set as-path prepend 64512 64512 64512 64512 64512

route-map Secondary permit 10

set metric 10000

set as-path prepend 64512 64512 64512 64512 64512 64512

 

show run | section bgp

router bgp 64512

bgp log-neighbor-changes

network 10.10.10.0 mask 255.255.255.0

network 10.40.20.0 mask 255.255.255.0

network 172.16.1.0 mask 255.255.255.252

network 172.16.1.4 mask 255.255.255.252

network 172.16.1.8 mask 255.255.255.252

network 172.16.10.0 mask 255.255.255.0

network 172.16.20.0 mask 255.255.255.0

network 172.16.30.0 mask 255.255.255.0

network 172.16.75.0 mask 255.255.255.0

network 172.16.100.0 mask 255.255.255.0

neighbor IBGP peer-group

neighbor IBGP remote-as 64512

neighbor IBGP route-reflector-client

neighbor IBGP next-hop-self

neighbor IBGP soft-reconfiguration inbound

neighbor Cox peer-group

neighbor Cox remote-as 64512

neighbor Cox route-reflector-client

neighbor Cox next-hop-self

neighbor Cox soft-reconfiguration inbound

neighbor Cox route-map Primary in

neighbor Cox route-map Primary out

neighbor CenturyLink peer-group

neighbor CenturyLink remote-as 64512

neighbor CenturyLink route-reflector-client

neighbor CenturyLink next-hop-self

neighbor CenturyLink soft-reconfiguration inbound

neighbor CenturyLink route-map Secondary in

neighbor CenturyLink route-map Secondary out

neighbor 172.16.1.1 peer-group Cox

neighbor 172.16.1.1 fall-over bfd

neighbor 172.16.1.5 peer-group CenturyLink

neighbor 172.16.20.210 peer-group IBGP

neighbor 172.16.30.5 peer-group IBGP

 

show ip bgp:

     Network          Next Hop            Metric LocPrf Weight Path

*>i 0.0.0.0          172.16.1.1            5000    100      0 i

* i                  172.16.1.5           10000    100      0 i

*>i 10.1.2.0/30      172.16.1.1            5000    100      0 64512 64512 64512 64512 64512 64512 65535 i

*>i 10.2.2.0/30      172.16.1.1            5000    100      0 i

* i                  172.16.1.5           10000    100      0 i

*>  10.10.10.0/24    0.0.0.0                  0         32768 i

*>  10.40.20.0/24    0.0.0.0                  0         32768 i

*>i 10.200.1.1/32    172.16.1.1            5000    100      0 64512 64512 64512 64512 64512 64512 65535 i

*>i 10.200.1.2/32    172.16.1.1            5000    100      0 64512 64512 64512 64512 64512 64512 65535 i

*>i 10.200.1.3/32    172.16.1.1            5000    100      0 i

*>i 10.200.1.4/32    172.16.1.5           10000    100      0 i

     Network          Next Hop            Metric LocPrf Weight Path

*>i 10.200.1.9/32    172.16.20.210            0    100      0 i

*>i 10.200.1.10/32   172.16.30.5              0    100      0 64513 i

*>i 10.200.1.11/32   172.16.30.5              0    100      0 64513 i

*>  172.16.1.0/30    0.0.0.0                  0         32768 i

* i                  172.16.1.1            5000    100      0 i

*>  172.16.1.4/30    0.0.0.0                  0         32768 i

* i                  172.16.1.5           10000    100      0 i

*>i 172.16.3.0/25    172.16.30.5              0    100      0 64513 i

*>  172.16.10.0/24   0.0.0.0                  0         32768 i

* i 172.16.20.0/24   172.16.20.210            0    100      0 i

*>                   0.0.0.0                  0         32768 i

* i 172.16.30.0/24   172.16.30.5              0    100      0 i

*>                   0.0.0.0                  0         32768 i

*>  172.16.75.0/24   0.0.0.0                  0         32768 i

*>  172.16.100.0/24  0.0.0.0                  0         32768 i

*>i 172.16.130.0/28  172.16.30.5              0    100      0 i

*>i 192.168.0.0      172.16.1.1            5000    100      0 i

* i                  172.16.1.5           10000    100      0 i

*>i 192.168.8.0/23   172.16.1.1            5000    100      0 i

 

3 REPLIES 3
Georg Pauwen
VIP Master

Hello,

 

at first glance, it looks like all your BGP neighbors are iBGP neighbors ? AS-PATH prepending doesn't work for iBGP, only for eBGP.

On this switch, you are correct, this is all iBGP. 

Hello,

 

so none of the AS-PATH prepend route maps will work, since it is all iBGP:

 

router bgp 64512
!
neighbor Cox remote-as 64512
neighbor Cox route-map Primary in
neighbor Cox route-map Primary out
!
neighbor CenturyLink remote-as 64512
neighbor CenturyLink route-map Secondary in
neighbor CenturyLink route-map Secondary out