2

We have BGP running over default route for x.x.x.x/24 subnet, but yesterday after talking to ISP they said if you want to send traffic over to their specific peer ISP then you need to use 65000:170 BGP community, How do i set that in my BGP config to advertise specific communities over BGP and does it work for individual IP address or i have to do /24 whole subnet for example:

does single IP will work or i need to do 255.255.255.0 full subnet?

!
access-list 101 permit ip host 1.1.1.1 host 255.255.255.255
!
route-map Peer-R1 permit 10
 match ip address 101
 set community 65000:170
!
3

You need to set the community on any prefixes that you advertise. It is unlikely that you are advertising only a host prefix.

4
  • I didn't get what you trying to say
    – Satish
    Jan 18 '17 at 4:04
  • 1
    You are using BGP to advertise prefixes. Possibly only the /24 prefix. You can attach a community to any prefixes which you advertise, but not to routes that you do not advertise. If you want this to work, you need to attach a community to all the prefixes you do advertise.
    – Ron Maupin
    Jan 18 '17 at 4:06
  • Yes i understand it will only work for adverties prefix, but question is does it work for single host or set of hosts in advertise prefix?
    – Satish
    Jan 18 '17 at 4:12
  • 1
    It works with any prefixes you are actually advertising. If you are only advertising the /24, then trying to attach a community to a host route (/32), it will not work since you are not advertising the host route. It is unlikely that you are only advertising the host route. Also, you can only advertise prefixes that are actually in your routing table, so if on the /24 is in your routing table, then trying to advertise the host route will not work. It is unlikely that an ISP will advertise any prefix longer than /24, and it will not go very far if it does since the others will not.
    – Ron Maupin
    Jan 18 '17 at 4:17
4

While technically your access-list can specify any length subnet mask you want, most (good) ISPs will only accept a maximum length of a /24 for prefixes advertised by you.

The reason for this is that the global routing table would explode in size (more than it already has) if everyone started advertising /24-/32s.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.