6

I'm managing one BGP router, under the router I'm trying to announce the following IP prefix:161.117.25.0/24. But the problem is that some of the IP addresses were borrowed by other AS(Autonomous System), for example the IP address 161.117.25.100 and 161.117.25.200 were borrowed by other AS. So how should I announce the remaining IP addresses please.

Following questions please:

  1. Can I announce 161.117.25.0/30?
  2. Is it possible that two Autonomous Systems announce or have the same IP prefix?
2
  • 2
    ISPs will only advertise /24 or shorter IPv4 prefixes. You need to ask your ISP if you can announce a longer prefix to it, but it will not advertise it to the Internet. No, two ASes advertising the same prefix will break things, and likely get both blocked.
    – Ron Maupin
    Feb 26, 2019 at 21:13
  • Is the prefix yours or not? It does not appear to be publicly assigned to you. It should go without saying that if the prefix is not yours, you can't announce it. Feb 27, 2019 at 0:34

3 Answers 3

18

That /24 is part of a larger block (161.117.0.0/16) which is assigned to Alibabacom Singapore and announced by AS45102 (which is Alibaba again). My guess is that you're a customer of them and have been assigned a number of IP addresses to use from that /24. However, that does not give you the right to advertise them under your own ASN in BGP. If you do so, it would be considered a BGP Hijack.

Hopefully, it wouldn't work very well due to filters in place at upstream networks, but if it would, IP addresses in that /24 used by others would become unreachable.

The conclusion here is: you don't announce the /24 unless you're authorized to do so.

6

Is it possible that two Autonomous Systems announce or have the same ip prefix?

It is entirely possible for multiple ASNs to announce the same prefix -- the shortest AS-PATH from any given perspective "wins". However, it's a poor practice that will trigger warnings in any BGP monitoring systems. (see also: route hijacking) If AS1 and AS2 both announce the same prefix, those closest to AS1 will prefer AS1; those closest to AS2 will prefer AS2. As long as you are connected to both ASNs it will usually work, but you've create a very fragile arrangement.

Beyond BGP (once routes are in the FIB), IP routing uses a longest-match algorithm. The /32 routes for 100 and 200 will match before the /24 (which will match before the /16, etc.) As others have already said, one cannot announce [BGP] anything more specific than /24 globally, so it would be up to you and/or your ISP(s) to make sure those two specific addresses are handled appropriately.

4

Just to be concrete, you advertise the blocks you do have. Given a "/24 without .100 and .200", the minimal number of blocks is 14:

A.B.C.0/26
A.B.C.64/27
A.B.C.96/30
A.B.C.101/32
A.B.C.102/31
A.B.C.104/29
A.B.C.112/28
A.B.C.128/26
A.B.C.192/29
A.B.C.201/32
A.B.C.202/31
A.B.C.204/30
A.B.C.208/28
A.B.C.224/27

enter image description here

Whether your ISP or other organisation will accept such long prefixes is a matter to take up with them: most ISPs have a limit shorter than /24.

Other, non-minimal, groupings are also possible in principle, up to the limiting case of 254 blocks each /32.

4
  • If 161.117.25.0/24 is assigned to a LAN, some trickery would be necessary to put 100 and 200 somewhere else. (I've done this very thing.) From a route table perspective, 161.117.25.0/24, 161.117.25.100/32, 161.117.25.200/32 do not create a conflict.
    – Ricky
    Feb 27, 2019 at 0:21
  • @RickyBeam ... from the point of view of routes, certainly. As for advertising blocks across organisations, surely you only say what you actually have, per the other answers.
    – jonathanjo
    Feb 27, 2019 at 14:55
  • He announces the /24 and the others announce their /32. Of course, one can't globally route a /32, so he who has the /24 has to rig up a way to deliver the two /32's. (just like how the ISP announces a /16 to the world, and internally figures out how to divide it up)
    – Ricky
    Feb 27, 2019 at 18:07
  • My understanding of the question is that the upstream ISP is cutting out the two /32s, not the owner of the nearly-/24.
    – jonathanjo
    Feb 27, 2019 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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