12-12-2018 03:08 PM
I am trying to filter a host route(/32) with an IP prefix-list. I will use it on OSPF distribute-list inbound.
Right now I am using an access-list and it working. However, the list is getting longer.
router ospf 1
router-id 192.168.19.2
area 0 authentication message-digest
network 192.168.0.121 0.0.0.0 area 0
distribute-list HOST_ROUTE in
ip access-list standard HOST_ROUTE
deny 192.168.1.235
permit any
The prefix-list will match any /32 IP address between 192.168.1.2 - 192.168.1.254.
Solved! Go to Solution.
12-13-2018 06:18 AM
Could be,
ip prefix-list HOST_ROUTES permit 192.168.1.1/32
ip prefix-list HOST_ROUTES permit 192.168.1.255/32
ip prefix-list HOST_ROUTES deny 192.168.1.0/24 ge 32 le 32
ip prefix-list HOST_ROUTES permit 0.0.0.0/0 le 32
12-12-2018 03:47 PM
Hello,
so you want to allow 192.168.1.1 and 192.168.1.255, deny everything else from that range, and allow every other route ?
ip access-list standard HOSTS
permit 192.168.1.1
permit 192.168.1.255
deny 192.168.1.0 0.0.0.255
permit any
12-12-2018 04:29 PM
Can I do it with Prefix-list?
12-12-2018 06:15 PM
12-13-2018 12:57 AM
Hello,
here is the equivalent of the prefix list:
ip prefix-list HOST_ROUTES seq 10 permit 192.168.1.1/32
ip prefix-list HOST_ROUTES seq 20 permit 192.168.1.255/32
ip prefix-list HOST_ROUTES seq 30 deny 192.168.1.0/24
ip prefix-list HOST_ROUTES seq 40 permit 0.0.0.0/0
!
router ospf 1
router-id 192.168.19.2
area 0 authentication message-digest
network 192.168.0.121 0.0.0.0 area 0
distribute-list prefix HOST_ROUTES in
12-13-2018 06:18 AM
Could be,
ip prefix-list HOST_ROUTES permit 192.168.1.1/32
ip prefix-list HOST_ROUTES permit 192.168.1.255/32
ip prefix-list HOST_ROUTES deny 192.168.1.0/24 ge 32 le 32
ip prefix-list HOST_ROUTES permit 0.0.0.0/0 le 32
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