06-14-2018 11:00 AM - edited 03-05-2019 10:35 AM
Hi Guys,
We're given a subnet 172.20.0.0/23 and we're told that we need to advertise whole subnet /23 to the ISP so I create a static route with Null 0. Below is my eBGP router setup with my ISP.
Router A:
ip route 172.20.0.0/23 null 0
router bgp 12345
neighbor 207.12.12.x remote-as 34567
network 172.20.0.0 mask 255.255.254.0
interface g1/0
ip address 172.20.1.1 mask 255.255.255.0
How do I make sure that 172.20.0.0/23 is still advertised to my ISP but only 172.20.1.0/24 is allowed to access the internet and not the rest?
Thanks.
Solved! Go to Solution.
06-14-2018 12:07 PM
Hello,
most ISPs will accept /24 prefixes but nothing smaller. They prefer /23 because it keeps their (and the global) routing table smaller...
06-14-2018 11:24 AM
Hello,
since your ISP won't accept the /24 route, the easiest option would be to advertise the /23 route and use an access list on the outgoing interface to allow only the /24:
interface GigabitEthernet0/0
description Link to ISP
access-group 101 in
!
access-list 101 permit ip 172.20.0.0 255.255.255.0 any
06-14-2018 11:31 AM
Can I use prefix list and route-map in this case instead of ACL? Thanks.
06-14-2018 11:43 AM
Hello,
that would work, too.
route-map 24_PREFIX_RM permit 10
match ip address prefix-list 24_PREFIX_LIST
set interface GigabitEthernet0/0
!
route-map 24_PREFIX_RM deny 20
ip prefix-list 24_PREFIX_LIST permit 172.20.0.0/24
Apply this to your LAN interface, e.g.:
interface GigabitEthernet0/1
description LAN
ip policy route-map 24_PREFIX_RM
06-14-2018 12:04 PM
Thanks alot!
I've called the ISP and able to speak with their engineers if they accept /24 or not, they all confirmed that they do accept /24 but neither of them was able to answer me why they wanted me to advertise /23 to the bgp. Do you happen to know the reason behind that? Thanks again.
06-14-2018 12:07 PM
Hello,
most ISPs will accept /24 prefixes but nothing smaller. They prefer /23 because it keeps their (and the global) routing table smaller...
06-14-2018 12:22 PM
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