03-16-2024 05:39 PM
Can someone explain what this configuration is doing, at a high-level, I am just trying to understand what is going on here? The route-map statements 20, 30, and 40 really don't do anything, correct?
CPE-1 Configuration
router bgp 2152
neighbor casc-dc peer-group
neighbor casc-dc remote-as 2152
neighbor casc-dc update-source Loopback0
neighbor 1.2.3.4 peer-group casc-dc
neighbor 1.2.3.4 password CISCO
!
address-family ipv4
bgp dampening
redistribute static route-map static-to-bgp
neighbor casc-dc send-community
neighbor 1.2.3.4 activate
exit-address-family
!
!
ip prefix-list cust-no-export seq 10 permit 2.3.4.5/24 le 32
ip prefix-list cust-no-export seq 400 deny 0.0.0.0/0 le 32
!
ip prefix-list cust-announce seq 400 deny 0.0.0.0/0 le 32
!
ip prefix-list cust-backup-announce seq 400 deny 0.0.0.0/0 le 32
!
ip prefix-list cust-backup-no-export seq 400 deny 0.0.0.0/0 le 32
route-map static-to-bgp permit 10
match ip address prefix-list cust-no-export
set ip next-hop 1.1.1.1
set origin igp
set as-path tag
set community 2152:65439 2152:65502 2152:65535
!
route-map static-to-bgp permit 20
match ip address prefix-list cust-announce
set ip next-hop 1.1.1.1
set origin igp
set as-path tag
set community 2152:65298 2152:65436 2152:65438 2152:65439 2152:65498 2152:65502 2153:65418 2153:65436 2153:65438
!
route-map static-to-bgp permit 30
match ip address prefix-list cust-backup-announce
set ip next-hop 1.1.1.1
set local-preference 98
set weight 0
set origin igp
set as-path tag
set community 2152:65298 2152:65436 2152:65438 2152:65439 2152:65498 2152:65502 2153:65418 2153:65436 2153:65438
!
route-map static-to-bgp permit 40
match ip address prefix-list cust-backup-no-export
set ip next-hop 1.1.1.1
set local-preference 98
set weight 0
set origin igp
set as-path tag
set community 2152:65439 2152:65502 2152:65535
!
!
Ip route 1.2.3.4 255.255.255.255 GigabitEthernet0/0/0
ip route 2.3.4.5 255.255.255.0 GigabitEthernet0/0/1 tag 100
Solved! Go to Solution.
03-18-2024 10:53 AM
#1 - I've never used that particular command so unless I've actually done it, I'm hesitant to answer. But from what I've read that is correct. It will show the AS path as being from AS 100. Just the single value though, if you wanted to add more AS's then "set as-path prepend" would be the command. Others more familiar may have a different understanding.
#2 - It represents all subnets in the range of 2.3.4.5/24 through /32. That would include /25, /26, /27..../32. So if there were /32 host routes they would be included too.
03-18-2024 04:49 AM
Hello,
That's the way it looks to me...the "deny 0.0.0.0/0 le 32" denies everything.
BTW - the two statics are technically incorrect in that they need to point to an IP address and not to the GigabitEthernet interfaces.
03-18-2024 07:42 AM
Hello
FYI-
A match can be found pertaining to the below:
ip route 2.3.4.5 255.255.255.0 GigabitEthernet0/0/1 tag 100
ip prefix-list cust-no-export seq 10 permit 2.3.4.5/24 le 32
ip prefix-list cust-no-export seq 400 deny 0.0.0.0/0 le 32
route-map static-to-bgp permit 10
match ip address prefix-list cust-no-export
03-18-2024 09:34 AM
1. So, for this example, with the tag set for route 2.3.4.5/24
ip route 2.3.4.5 255.255.255.0 GigabitEthernet0/0/1 tag 100
the "set as-path tag" in this route map will convert the tag of this route into an autonomous system path of 100, thereby prepending to the existing AS path? So, the bottom line, for this example, is it a case of traffic engineering to lengthen the AS path between the CASc backbone and the subnet 2.3.4.5/24 at CUST-1?
2. The prefix-list, ip prefix-list cust-no-export seq 10 permit 2.3.4.5/24 le 32
Does 2.3.4.5/24 le 32 represent just a single host 2.3.4.5/24 or does it represent all 254 hosts 2.3.4.1 to 2.3.4.254 with subnet mask 255.255.255.0?
03-19-2024 08:19 AM
covert the IGP tag to AS-PATH is used mostly for prevent loop
you mention TE can you more elaborate
MHM
03-18-2024 10:53 AM
#1 - I've never used that particular command so unless I've actually done it, I'm hesitant to answer. But from what I've read that is correct. It will show the AS path as being from AS 100. Just the single value though, if you wanted to add more AS's then "set as-path prepend" would be the command. Others more familiar may have a different understanding.
#2 - It represents all subnets in the range of 2.3.4.5/24 through /32. That would include /25, /26, /27..../32. So if there were /32 host routes they would be included too.
03-20-2024 06:04 PM
Got it. Thank you.
03-19-2024 03:29 PM
Hello
@eagleeye wrote:1. So, for this example, with the tag set for route 2.3.4.5/24
ip route 2.3.4.5 255.255.255.0 GigabitEthernet0/0/1 tag 100
the "set as-path tag" in this route map will convert the tag of this route into an autonomous system path of 100, thereby prepending to the existing AS path? So, the bottom line, for this example, is it a case of traffic engineering to lengthen the AS path between the CASc backbone and the subnet 2.3.4.5/24 at CUST-1?
If you only have a single ebgp peering why do you need to advertise your redistributed statics will as-path prepending?
@eagleeye wrote:
2. The prefix-list, ip prefix-list cust-no-export seq 10 permit 2.3.4.5/24 le 32Does 2.3.4.5/24 le 32 represent just a single host 2.3.4.5/24 or does it represent all 254 hosts 2.3.4.1 to 2.3.4.254 with subnet mask 255.255.255.0?
This PF encompasses 2.3.4.0/24
03-20-2024 06:02 PM
This was an after-class study assignment by my teacher after a tutorial on route-maps. I think I understand it now. Thanks.
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