06-15-2022
04:27 PM
- last edited on
06-19-2022
02:35 AM
by
Translator
ip prefix-list RTBH-filter permit 100.68.0.0/16 ge 32 !
Does that mean any prefix that has 100.68.x.x where the x.x has to be filled out?
for example it includes 100.68.10.1 and not 100.68.10.0
and so does
ip prefix-list RTBH-filter permit 100.68.0.0/16 ge 24
mean 100.68.x.y where it has to be 100.68.x with y 0-255?
i.e it includes both 100.68.10.0 and 100.68.10.1
am I right in my assumptions?
Thank you
Solved! Go to Solution.
06-16-2022
12:03 PM
- last edited on
06-19-2022
02:42 AM
by
Translator
So i created some LoopBacks on R2, some with /17 and some with /24 and then some with /32 subnet mask, like this :
int lo1
ip address 100.68.0.1 255.255.128.0
int lo2
ip address 100.68.128.1 255.255.128.0
int lo3
ip address 100.68.129.1 255.255.255.0
int lo4
ip address 100.68.130.1 255.255.255.0
int lo10
ip address 100.68.250.1 255.255.255.255
int lo11
ip address 100.68.251.1 255.255.255.255
int lo12
ip address 100.68.252.1 255.255.255.255
###PREFIX-LIST###
ip prefix-list RTBH-filter seq 5 permit 100.68.0.0/16 ge 32
###ROUTE-MAP###
R2#show run | s route-map
redistribute connected route-map RM-RTBH
route-map RM-RTBH permit 10
match ip address prefix-list RTBH-filter
####ROUTER BGP####
R2#show run | s router bgp
router bgp 20
bgp log-neighbor-changes
neighbor 192.168.1.1 remote-as 10
!
address-family ipv4
redistribute connected route-map RM-RTBH
neighbor 192.168.1.1 activate
exit-address-family
I am redistributing all the connected routes but if you check the routes on other side, only /32 routes are learned
R1#show bgp ipv4 unicast
BGP table version is 6, local router ID is 192.168.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 100.68.250.1/32 192.168.1.2 0 0 20 ?
*> 100.68.251.1/32 192.168.1.2 0 0 20 ?
*> 100.68.252.1/32 192.168.1.2 0 0 20 ?
Rest of the routes are not learend
06-15-2022
04:37 PM
- last edited on
06-19-2022
02:36 AM
by
Translator
I will run
lab now
and check your statement.
06-15-2022 05:12 PM
The article was very helpful, I think I need more practice and so I will do a cisco created lab on prefix lists
06-15-2022
05:34 PM
- last edited on
06-19-2022
02:37 AM
by
Translator
this photo I make it as reference for me
NOW for your statement
ip prefix-list RTBH-filter permit 100.68.0.0/16 ge 32
/16 the prefix-list don't care about what you enter
32<- this value is wrong
if we change the statement into
ip prefix-list RTBH-filter permit 100.68.0.0/0 ge 16
here the prefix-list will include all subnet form
100.68.0.0/16-------100.68.0.0/32
06-15-2022 04:40 PM
Hi
ip prefix-list RTBH-filter permit 100.68.0.0/16 ge 32
This prefix list dont make sense to me as "ge" is "greater than" and how can you have a net mask greater than 32?
Should be ge /16 or le /32.
06-15-2022 05:07 PM
Ayye Ok, it is what was included in the lab
06-16-2022 01:07 PM
06-15-2022 07:00 PM - edited 06-15-2022 07:00 PM
As others mentioned, ge 32 does not makes sense in this. But let's say it was given to you as ge /24 , then 100.68.0.0/16 will act as basé and any route with /24 or more was going to be matched and rest not.
For example 100.68.10.0/17 was not going to be matched but 100.68.10.0/25 was going to be matched with your statemenr
06-16-2022
12:25 AM
- last edited on
06-19-2022
02:39 AM
by
Translator
Hello
@hfakoor222 wrote:
ip prefix-list RTBH-filter permit 100.68.0.0/16 ge 32 !
This prefix-list states - Allow all 100.68.x.x routes/network that has a prefix-length that is greater or equal to /32
meaning any 100.68.x.x host routes
100.68.x.x/32
@hfakoor222 wrote:
ip prefix-list RTBH-filter permit 100.68.0.0/16 ge 24
This prefix-list states - Allow all 100.68.x.x routes/networks that has a prefix-length that is greater or equal to /24
100.68.x.x/24
100.68.x.x/25
100.68.x.x/26
etc..
100.68.x.x/32
06-16-2022 09:42 AM
To explain what Paul mentioned... I will lab it up for you. Stay tuned
06-16-2022
12:03 PM
- last edited on
06-19-2022
02:42 AM
by
Translator
So i created some LoopBacks on R2, some with /17 and some with /24 and then some with /32 subnet mask, like this :
int lo1
ip address 100.68.0.1 255.255.128.0
int lo2
ip address 100.68.128.1 255.255.128.0
int lo3
ip address 100.68.129.1 255.255.255.0
int lo4
ip address 100.68.130.1 255.255.255.0
int lo10
ip address 100.68.250.1 255.255.255.255
int lo11
ip address 100.68.251.1 255.255.255.255
int lo12
ip address 100.68.252.1 255.255.255.255
###PREFIX-LIST###
ip prefix-list RTBH-filter seq 5 permit 100.68.0.0/16 ge 32
###ROUTE-MAP###
R2#show run | s route-map
redistribute connected route-map RM-RTBH
route-map RM-RTBH permit 10
match ip address prefix-list RTBH-filter
####ROUTER BGP####
R2#show run | s router bgp
router bgp 20
bgp log-neighbor-changes
neighbor 192.168.1.1 remote-as 10
!
address-family ipv4
redistribute connected route-map RM-RTBH
neighbor 192.168.1.1 activate
exit-address-family
I am redistributing all the connected routes but if you check the routes on other side, only /32 routes are learned
R1#show bgp ipv4 unicast
BGP table version is 6, local router ID is 192.168.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 100.68.250.1/32 192.168.1.2 0 0 20 ?
*> 100.68.251.1/32 192.168.1.2 0 0 20 ?
*> 100.68.252.1/32 192.168.1.2 0 0 20 ?
Rest of the routes are not learend
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: