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?
Jack
  • 317
  • 2
  • 8

3 Answers3

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.

Teun Vink
  • 17,433
  • 6
  • 46
  • 70
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.

Ricky
  • 32,810
  • 2
  • 45
  • 85
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.

jonathanjo
  • 16,424
  • 2
  • 25
  • 57