Indexed ranged search algorithm for IP Addresses

后端 未结 3 1598
离开以前
离开以前 2021-02-14 12:52

Given an ACL list with 10 billion IPv4 ranges in CIDR notiation or between two IPs:

x.x.x.x/y
x.x.x.x - y.y.y.y

What is an effecient search/ind

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-14 13:23

    You have 10 billion rules to match 4 billion possible addresses?

    Make a table of 4 billion addresses. For each of the 10 billion rules, 'paint' the addresses it applies to, doing something sensible when two or more rules apply to the same address.

提交回复
热议问题