02-06-2021 10:57 PM - edited 02-06-2021 11:03 PM
I am facing issue with the AS-Path prepend. On R6, I increased as-path towards ebgp neighbor of R1 in order to influence inbound traffic coming from R10 - 10.10.10.10/32
Please refer below config:
R6:
R6#sh run | s route-map
neighbor 16.0.0.1 route-map AS-PREP out
route-map AS-PREP permit 10
match ip address 1
set as-path prepend 4755 4755 4755 4755 4755 4755
route-map AS-PREP permit 20
R6#sh run | s r b
router bgp 100
no synchronization
bgp router-id 6.6.6.6
bgp log-neighbor-changes
network 16.0.0.0 mask 255.255.255.252
neighbor 16.0.0.1 remote-as 4755
neighbor 16.0.0.1 soft-reconfiguration inbound
neighbor 16.0.0.1 route-map AS-PREP out
neighbor 192.168.1.1 remote-as 100
neighbor 192.168.1.1 next-hop-self
neighbor 192.168.1.1 soft-reconfiguration inbound
neighbor 192.168.1.3 remote-as 100
neighbor 192.168.1.3 next-hop-self
neighbor 192.168.1.3 soft-reconfiguration inbound
no auto-summary
Output:
R6#sh ip bgp | in 10.10.10.10
*> 10.10.10.10/32 16.0.0.1 0 4755 200 I
Trace from R10:
R10#trace 9.9.9.9 so 10.10.10.10
Type escape sequence to abort.
Tracing the route to 9.9.9.9
1 172.31.1.2 40 msec 28 msec 24 msec
2 28.0.0.1 16 msec 56 msec 44 msec
3 10.1.12.1 80 msec 88 msec 60 msec
4 16.0.0.2 [AS 100] 68 msec 96 msec 108 msec
5 192.168.1.1 [AS 100] 100 msec 116 msec *
Please help on how do I influence the inbound traffic with AS-path attribute.
Solved! Go to Solution.
02-07-2021 12:11 AM
Hello,
you need to apply the route map inbound:
--> neighbor 16.0.0.1 route-map AS-PREP in
02-07-2021 04:17 AM - edited 02-07-2021 04:19 AM
Hello
If you want to influence inbound traffic for r6 the you can indeed use as-path pressing from r6 Outbound
From what i see your route-map is incorrect you need to pre-pend on R6 own ASN not that of R1 ASN
route-map AS-PREP
set as-path prepend 100 100 100
02-07-2021 12:11 AM
Hello,
you need to apply the route map inbound:
--> neighbor 16.0.0.1 route-map AS-PREP in
02-07-2021 12:40 AM - edited 02-07-2021 12:42 AM
Then it will affect the outbound traffic right. I want to influence inbound traffic with AS path.
02-07-2021 01:15 AM
Hello,
not sure what you mean. 10.10.10.10/32 is coming from another router, so the route map needs to be in (for inbound traffic). Outbound would mean that 10.10.10.10/32 is originating on R1. An outbound route map does not match anything (as you can see in the output), since 10.10.10.10/32 is not a local network.
02-07-2021 01:37 AM - edited 02-07-2021 01:45 AM
Hi, I was informed that for BGP route-map, inbound traffic will have route-map out and for outbound traffic, it will be in.
So to receive traffic from R10 on R6 (CE) i.e inbound traffic from R10 - 10.10.10.10/32 destined for R9 - 9.9.9.9/32, do I have to use route-map out for as-path attribute?
Also, the below points.
if it is IN, you will receive the prefixes with the AS-path prepend string that you have configured on your route-map.
If it is OUT, you will advertise the prefixes with the AS Path prepend string configured on your route-map.
02-07-2021 02:19 AM
Hello,
if you apply the route map inbound and then do the traceroute from R10:
R10#trace 9.9.9.9 so 10.10.10.10
what path does it take ?
02-07-2021 02:32 AM - edited 02-07-2021 02:49 AM
Applied the Route-map as inbound on R6 and trace from R9 towards R10 is choosing R7 instead of R6 - hence, affecting outbound traffic. Trace from R10 to R9 is through R6 only.
R6#sh run | s route-map
neighbor 16.0.0.1 route-map AS-PREP in
route-map AS-PREP permit 10
set as-path prepend 4755 4755 4755
route-map AS-PREP permit 20
R6#sh ip bgp | in 10.10.10.10
* 10.10.10.10/32 16.0.0.1 0 4755 4755 4755 4755 200 i
Trace from R10 to R9 loopback:
R10 -> R8 -> R2 -> R1 -> R6 -> R9
R10#trace 9.9.9.9 so 10.10.10.10
Type escape sequence to abort.
Tracing the route to 9.9.9.9
1 172.31.1.2 76 msec 56 msec 40 msec
2 28.0.0.1 108 msec 164 msec 52 msec
3 10.1.12.1 144 msec 204 msec 84 msec
4 16.0.0.2 [AS 100] 160 msec 184 msec 136 msec
5 192.168.1.1 [AS 100] 200 msec 276 msec *
_________________________________________________
Trace from R9 to R10 loopback:
R9 -> R7 -> R1 -> R2 -> R8 -> R10
R9#trace 10.10.10.10 so 9.9.9.9
Type escape sequence to abort.
Tracing the route to 10.10.10.10
1 192.168.1.3 80 msec 96 msec 68 msec
2 17.0.0.1 80 msec 120 msec 132 msec
3 10.1.12.2 128 msec 132 msec 120 msec
4 28.0.0.2 [AS 200] 172 msec 172 msec 172 msec
5 172.31.1.1 [AS 200] 168 msec 180 msec *
02-07-2021 04:17 AM - edited 02-07-2021 04:19 AM
Hello
If you want to influence inbound traffic for r6 the you can indeed use as-path pressing from r6 Outbound
From what i see your route-map is incorrect you need to pre-pend on R6 own ASN not that of R1 ASN
route-map AS-PREP
set as-path prepend 100 100 100
02-07-2021 09:28 PM
Thank you very much Paul. It is working now.
R6#sh run | s route-map AS-PREP
neighbor 16.0.0.1 route-map AS-PREP out
route-map AS-PREP permit 10
set as-path prepend 100 100 100
route-map AS-PREP permit 20
R1#sh ip bgp
BGP table version is 26, local router ID is 1.1.1.1
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
* 9.9.9.9/32 16.0.0.2 0 100 100 100 100 i
*> 17.0.0.2 0 100 i
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide