កម្មវិធីគណនាបណ្ដាញរង (IPv4 CIDR)
ការបំបែកបណ្តាញរង IPv4 ពេញលេញ ៖ បណ្តាញផ្សាយ
លទ្ធផលធ្វើឲ្យទាន់សម័យតាមដែលអ្នកវាយ ។
អំពីម៉ាស៊ីនគិតលេខនេះ
This subnet calculator turns an IPv4 address and a CIDR prefix into the full structure of a subnet. An IPv4 address is 32 bits, usually written as four dot-separated octets like 192.168.1.10, and a CIDR prefix such as /24 splits those 32 bits into a network part (the leading bits, fixed for every host in the subnet) and a host part (the remaining bits, unique to each device). This calculator takes an address and a prefix length and derives the network address, broadcast address, subnet mask, wildcard mask and the range of usable host addresses, along with the IP class and total address count.
The size of a subnet is set by the prefix: a /n block holds 2^(32−n) addresses, of which two are reserved — the network address (all host bits 0, naming the subnet) and the broadcast address (all host bits 1, reaching every host). So a /24 has 2^8 = 256 addresses and 254 usable hosts, a /25 has 128 addresses and 126 usable hosts, and each extra prefix bit halves the block. As a worked example, 192.168.1.10/24 gives a network of 192.168.1.0, a broadcast of 192.168.1.255, a 255.255.255.0 mask, a 0.0.0.255 wildcard mask, and a usable host range of 192.168.1.1 to 192.168.1.254.
Subnetting is how networks are carved into manageable, secure segments — separating departments, sizing VLANs, planning address allocation and writing firewall and routing rules. The wildcard mask (the bitwise inverse of the subnet mask) is what Cisco access-control lists and OSPF use to match ranges of addresses. The /31 and /32 prefixes are special cases: /31 is used for point-to-point links with two usable addresses and no broadcast, and /32 describes a single host.
សំណួរដែលសួរញឹកញាប់
តើមានម៉ាស៊ីនប៉ុន្មាននៅក្នុងបណ្ដាញរង ?
បណ្តាញរង /n មាន 2^ (32-n) អាសយដ្ឋាន, បន្ថយពីរដែលសំរេចចិត្តសម្រាប់បណ្តាញនិងផ្សាយ។ /24 មាន 256 អាសយដ្ឋាននិង 254 ម៉ាស៊ីនប្រើបាន។
តើរបាំងតួអក្សរជំនួសជាអ្វី ?
A wildcard mask is the bitwise inverse of the subnet mask (255.255.255.0 → 0.0.0.255). Access-control lists and OSPF use it to match ranges of addresses.
តើអ្វីជាភាពខុសគ្នារវាងបណ្ដាញ និងអាសយដ្ឋានផ្សាយ ?
អាសយដ្ឋានបណ្ដាញ (ប៊ីតម៉ាស៊ីនទាំងអស់ ០) ដាក់ឈ្មោះបណ្ដាញរង អាសយដ្ឋានផ្សាយ (ប៊ីតម៉ាស៊ីនទាំងអស់ ១) ដល់ម៉ាស៊ីនទាំងអស់នៅលើវា ។ ទាំងពីរមិនអាចត្រូវបានផ្ដល់ទៅឧបករណ៍បានទេ ។
តើបុព្វបទ CIDR (/ 24, / 16) មានន័យថាអ្វី ?
វាជាចំនួនប៊ីតដែលនាំមុខដែលបង្កើតផ្នែកបណ្ដាញនៃអាសយដ្ឋាន ។ បុព្វបទធំមានន័យថាប៊ីតបណ្ដាញច្រើនជាង និងប៊ីតម៉ាស៊ីនតិចជាង ដូច្នេះបណ្ដាញរងតូចជាង ៖ /24 ផ្ដល់ម៉ាស៊ីន 254 /25 ផ្ដល់ 126 និងប៊ីតបន្ថែមមួយចំនួនបន្ថែមទៀតពាក់កណ្ដាលប្លុក ។
តើខ្ញុំអាចបែងចែកបណ្ដាញទៅជាបណ្ដាញរងតូចជាងនេះដោយរបៀបណា ?
ខ្ចីប៊ីតម៉ាស៊ីនដោយបង្កើនបុព្វបទ ។ ការបំបែក /24 ទៅជាពីរ /25s ផ្តល់ប្លុកពីរនៃ 126 ម៉ាស៊ីនទៅ /26 ផ្តល់ប្លុកបួននៃ 62 ។ ប៊ីតបុព្វបទដែលបានបន្ថែមនីមួយៗបង្កើនចំនួនបណ្ដាញរងទ្វេដង និងកាត់ទំហំរបស់ពួកវាពាក់កណ្ដាល ។
តើអ្វីជាថ្នាក់អាសយដ្ឋាន IP ?
គ្រោងការណ៍ classful ចាស់ ចែក អាសយដ្ឋាន ដោយ ដំបូង របស់ពួកគេ octet: ថ្នាក់ A (1-126), ថ្នាក់ B (128-191) និង ថ្នាក់ C (192-223) សម្រាប់ unicast, បន្ថែម D សម្រាប់ multicast និង E បាន រក្សា ទុក ។ CIDR បាន ជំនួស ថ្នាក់ សម្រាប់ ការ ចែក រំលែក ប៉ុន្តែ ម៉ាស៊ីន គិត លេខ នៅតែ រាយការណ៍ ថ្នាក់ អាសយដ្ឋាន ធ្លាក់ ចូល ។
តើអ្វីជា /31 និង /32 បណ្ដាញរងដែលប្រើសម្រាប់?
A /31 មានតែអាសយដ្ឋានពីរនិងគ្មានការផ្សាយ, ប្រើសម្រាប់តំណចំណុចទៅចំណុចរវាងរ៉ោតទ័រ. A /32 គឺជាអាសយដ្ឋានម៉ាស៊ីនតែមួយ, ទូទៅសម្រាប់ loopbacks និងផ្លូវម៉ាស៊ីន. ម៉ាស៊ីនគិតលេខគ្រប់គ្រងករណីពិសេសទាំងពីរ.
API — ប្រើម៉ាស៊ីនគិតលេខនេះពីកូដ
ទូរស័ព្ទទៅម៉ាស៊ីនគិតលេខនេះជាចំណុចបញ្ចប់ JSON ឥតគិតថ្លៃ - គ្មានគ្រាប់ចុចដែលត្រូវការ ។ ផ្ញើតម្លៃវាលខាងក្រោមជាប៉ារ៉ាម៉ែត្រសំណួរ ឬ JSON ។ អ្វីដែលអ្នករំលងប្រើលំនាំដើមដូចគ្នាដែលទំព័រនេះត្រូវបានបំពេញជាមុនជាមួយប៉ារ៉ាម៉ែត្រមិនស្គាល់គឺ ៤០០ មិនមែនសូន្យស្ងាត់ទេ ។ អានឯកសារ API ពេញលេញ →
ចំណុចបញ្ចប់
GET https://calculator.free/api/v1/subnet/
curl
curl "https://calculator.free/api/v1/subnet/?ip=192.168.1.10&cidr=24"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/subnet/?" + new URLSearchParams({
"ip": "192.168.1.10",
"cidr": "24"
}));
const data = await r.json();
console.log(data.results);
លទ្ធផលគឺការប៉ាន់ប្រមាណសម្រាប់តែការណែនាំទូទៅប៉ុណ្ណោះ, មិនហិរញ្ញវត្ថុ, វេជ្ជសាស្ត្រឬដំបូន្មានពន្ធ.