ā06-07-2023 05:11 AM - last edited on ā06-22-2023 01:55 AM by Translator
Dear all,
I have a following topology in my lab:
R1 (as 208097) -- > R2 ISP (as16010) -- R3 (as 35805)
|
R4 (as 10101)
I want to
prepend
my announce for AS35805 only with
as-path access-list
and
route-map
like this:
R1
interface FastEthernet0/0
ip address 2.2.2.1 netmask 255.255.255.252
duplex auto
speed auto
router bgp 20809
no synchronization
bgp router-id 1.1.1.254
bgp log-neighbor-changes
network 1.1.1.0 netmask 255.255.255.0
neighbor 2.2.2.2 remote-as 16010
neighbor 2.2.2.2 route-map BGP_OUT_RMAP out
ip as-path access-list 50 permit ^20809 16010 35805$
ip as-path access-list 50 deny .*
ip prefix-list MM seq 10 permit 1.1.1.0/24
route-map BGP_OUT_RMAP permit 10
match ip address prefix-list MM
match as-path 50
set as-path prepend 20809 20809
But it doesn't work
Does it possible?
Solved! Go to Solution.
ā06-07-2023 11:19 AM - last edited on ā06-22-2023 01:59 AM by Translator
Using the
AS-PATH
I can change the path from R2 instead of go direct it go through the R1 and R3 AS300
what I do in R2 (backup)
R2#show running-config
Building configuration...
Current configuration : 2114 bytes
!
upgrade fpd auto
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
!
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
!
interface FastEthernet0/0
ip address 10.0.0.2 255.255.255.0
duplex half
!
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
!
interface FastEthernet2/0
ip address 100.0.0.2 255.255.255.0
duplex auto
speed auto
!
!
interface FastEthernet2/1
no ip address
shutdown
duplex auto
speed auto
!
!
interface FastEthernet3/0
no ip address
shutdown
duplex auto
speed auto
!
!
interface FastEthernet3/1
no ip address
shutdown
duplex auto
speed auto
!
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 10.0.0.1 remote-as 100
neighbor 10.0.0.1 next-hop-self
neighbor 10.0.0.1 route-map MHM in
neighbor 100.0.0.4 remote-as 400
neighbor 100.0.0.4 route-map MHMb in
no auto-summary
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
ip as-path access-list 100 permit ^300_600$
ip as-path access-list 100 permit ^300_500$
!
!
no cdp log mismatch duplex
!
!
!
!
route-map MHMb permit 10
set weight 500
!
route-map MHM permit 10
match as-path 100
set weight 1000
!
route-map MHM permit 20
!
!
!
control-plane
!
!
!
mgcp fax t38 ecm
mgcp behavior g729-variants static-pt
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
ā06-07-2023 05:33 AM - last edited on ā06-22-2023 02:11 AM by Translator
The
as-path
filter list should be
ip as-path access-list 50 permit ^$
ip as-path access-list 50 deny .*
ā06-07-2023 05:35 AM - last edited on ā06-21-2023 10:27 PM by Translator
NO it not possible.
if the AS20809 is origin of prefix then the
as-path
is it
AS-path
only no more
^$
what you can do in using same but in 35805 and here also you need from R2 (in your topology) send multipath hence the AS35805 can use as-prepend IN direction
ā06-07-2023 05:43 AM
R2 is an ISP (in real life), so I unable to change anythig there.
Is there any way to solve my issue?
I want to accept incomming traffic from AS16010, and for any other AS after AS 16010 make this path as backup..
ā06-07-2023 05:45 AM - edited ā06-07-2023 05:46 AM
sorry your in your topology can point each AS for each router
and which router you want to configure primary and backup R1 I think
thanks
ā06-07-2023 05:51 AM
So, it is not possible in this topology, correct?
ā06-07-2023 05:52 AM
You dont answer me,
R1 you want to use primary and backup ?
ā06-07-2023 06:07 AM - edited ā06-07-2023 06:44 AM
check below
ā06-07-2023 06:18 AM - edited ā06-07-2023 06:20 AM
No,
This device is backup BGP link. But hase an direct access for AS16010. I want to use it only for them (as16010) when another device (not in topology) is active.
ā06-07-2023 06:28 AM - edited ā06-07-2023 06:32 AM
I see you edit the post
just want to mention which one need primary and backup
ā06-07-2023 06:44 AM
ā06-07-2023 06:46 AM - last edited on ā06-21-2023 10:28 PM by Translator
Please, check full topology image.
R5 is a primary router, connected to primary isp. R1 is Backup router, connected to backup isp.
I want to load-balance incomming traffic as follows:
Incomming traffic from AS 35805 and 10101 to AS 20809 need to receive via AS 34797, and traffic from AS 16010 ONLY to AS20809 via R1.
For outgoing traffic all is done via local preferene and
as-path access-list
, but my trouble is inbound traffic.
ā06-07-2023 07:12 AM
if there is bgp between AS35805/AS10101 and primary ISP AS then it easy
ā06-07-2023 07:45 AM
Yes, these AS have BGP connection between
ā06-07-2023 07:56 AM
then I will share the solution tonight
MHM
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