To generate a set of all IPv4's one could use a cross join and a CTE with 16 records and a cross join. But I'm not sure what you're really after yet.
with cte (A) as (
SELECT 0 from dual UNION ALL
SELECT 1 from dual UNION ALL
SELECT 2 from dual UNION ALL
SELECT 3 from dual UNION ALL
SELECT 4 from dual UNION ALL
SELECT 5 from dual UNION ALL
SELECT 6 from dual UNION ALL
SELECT 7 from dual UNION ALL
SELECT 8 from dual UNION ALL
SELECT 9 from dual UNION ALL
SELECT 10 from dual UNION ALL
SELECT 11 from dual UNION ALL
SELECT 12 from dual UNION ALL
SELECT 13 from dual UNION ALL
SELECT 14 from dual UNION ALL
SELECT 15 from dual),
--Get data set for 0 to 255 numbers.
Get256Range as (SELECT row_number() over (order by A.A)-1 seg
FROM CTE A
CROSS JOIN cte B)
--Now cross join the 256 4 times for each class of Ip.
SELECT A.Seg ||'.'|| B.Seg||'.'|| C.Seg||'.'||D.Seg as IPAddress
from Get256Range A
CROSS JOIN Get256Range B
CROSS JOIN Get256Range C
CROSS JOIN Get256Range D
--Not sure what part of the "set" you need but one could change these values
--Limited for sizing; but one could create a table of all IPv4 addresses...
WHERE A.seg = 12
and B.seg = 123;
if needed you can include the leading zeros'...
lpad(A.Seg,3,'0') ||'.'|| lpad(B.Seg,3,'0')||'.'|| lpad(C.Seg,3,'0')||'.'|| lpad(D.Seg,3,'0') IpAddressWithLeadZero
This is so one could sort or filter based on a specific range
so only return those greater than 012.123.060.165
(not the most efficient though)
WHERE lpad(A.Seg,3,'0') ||'.'|| lpad(B.Seg,3,'0')||'.'|| lpad(C.Seg,3,'0')||'.'|| lpad(D.Seg,3,'0') >='012.123.060.165'
Possibly more efficient:
WHERE
(A.Seg = 12 and B.Seg = 123 and C.Seg = 60 and D.Seg > 165)
OR (A.Seg = 12 and B.Seg = 123 and C.Seg > 60)
OR (A.Seg = 12 and B.Seg > 123)
OR (A.Seg > 12)