cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
737
Views
10
Helpful
6
Replies

about prefix-list issue??

shan-cao
Level 1
Level 1

Hi,I want to control the router only receive the specific routes which are 199.172.1.0/24, 199.172.4.0/24, 199.172.5.0/24. I can use the standard access-list: access-list 1 permit 199.172.0.0 0.0.5.0 to fulfill the mission. But I don't know how to fulfill it well with prefix-list? Who can tell me how to do it with prefix-list? Thanks a lot.

Sincerely

6 Replies 6

shan-cao
Level 1
Level 1

Who can give me a help about the issue? Thanks a lot!!!

Hi,

I assume that you are asking about eBGP neighbor configuration:

Example:

router bgp

network x.y.z.0 mask 255.255.255.0

neighbor 10.10.10.10 remote-as

neighbor 10.10.10.10 prefix-list ABC in

exit

ip prefix-list ABC seq 5 permit 199.172.1.0/24

ip prefix-list ABC seq 10 permit 199.172.4.0/24

ip prefix-list ABC seq 15 permit 199.172.5.0/24

end

Regards

Krishnamurthy Suresh

ip prefix-list PREFIX seq 5 permit 199.172.1.0/24

ip prefix-list PREFIX seq 10 permit 199.172.4.0/24

ip prefix-list PREFIX seq 15 permit 199.172.5.0/24

If you want to use only 1 command line then the most specific match would be using a /21 mask for the prefix 199.172.0.0. Since it's not like wild-card mask so I believe this is the most specific match.

Harold Ritter
Spotlight
Spotlight

The prefix-list will not allow you to set discontiguous bits like the ACL does. The best you could do in this scenario is to permit a /21 that would include 199.172.0.0 to 199.172.7.0 as follow:

ip prefix-list test seq 5 permit 199.172.0.0/21

If only want to allow the 3 subnets you mentioned then you need to use an ACL.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

jawad1979
Level 1
Level 1

Hi,

Try those :

ip prefix-list mylist seq 5 permit 199.172.1.0/24

ip prefix-list mylist seq 10 permit 199.172.4.0/24

ip prefix-list mylist seq 15 permit 199.172.5.0/24

or

ip prefix-list mylist seq 5 permit 199.172.1.0/24

ip prefix-list mylist seq 10 permit 199.172.4.0/23 le 24

The 199.172.0.0/21 is an exact match, it won't do the job.

Thanks,

Jawad