Chapterبەش 5 · Lectureوانە 5.5
Subnetting Step by Stepژێرڕایەڵەسازی هەنگاو بە هەنگاو
Subnetting cuts one network into smaller subnets by borrowing bits from the host part: subnets with hosts each. Learn why networks are subnetted (smaller broadcast domains, order, security), how to plan, how to find the block size (the “magic number”, 256 minus the mask octet) and the subnet ID, broadcast and host range of every subnet — with a college in Erbil, a quick /24 table, exam examples, the classic /28–/31 exercise and why /31 is valid on router links.
یەک دەکات بە چەند بچووکتر بە قەرزکردنی لە : ، هەریەکە . فێر ببە بۆچی دەکرێت ( بچووکتر، ڕێکوپێکی، )، چۆن پلان دادەنێیت، چۆن قەبارەی بلۆک (، 256 لابردنی ) و ، و مەودای هەر دەدۆزیتەوە — لەگەڵ کۆلێژێک لە هەولێر، خشتەیەکی خێرای /24، نموونەی تاقیکردنەوە، ڕاهێنانی ناسراوی /28–/31 و بۆچی /31 لە بەستەری دروستە.
What you will learnچی فێر دەبیت
- Explain why networks are subnetted and count the subnets a network diagram needs.
- Choose the number of borrowed bits with subnets and hosts, and write the new mask.
- Find the block size and list every subnet with its subnet ID, host range and broadcast address.
- Find the subnet of a given address and explain when a /31 is valid.
- ڕوونی بکەیتەوە بۆچی دەکرێت و ئەو بژمێریت کە پێویستی پێیانە.
- ژمارەی قەرزکراو بە و هەڵبژێریت و نوێ بنووسیت.
- قەبارەی بلۆک بدۆزیتەوە و هەموو لەگەڵ ، مەودای و بنووسیت.
- ناونیشانێکی دراو بدۆزیتەوە و ڕوونی بکەیتەوە
/31کەی دروستە.
Why cut a network into subnets?بۆچی ڕایەڵەیەک دەبڕین بە چەند ژێرڕایەڵەیەک؟
Subnetting means making several smaller networks out of one network. Each smaller network is a subnet: a subdivision of a bigger block, chosen by the network administrator. You do it by taking some bits from the host part and using them to number the subnets; the bits that are left number the hosts inside each subnet. A longer English guide is Geek University's What Is Subnetting?.
واتە دروستکردنی چەند بچووکتر لە یەک . هەر بچووکتر : بەشێکی بلۆکێکی گەورەتر کە بەڕێوەبەری هەڵیدەبژێرێت. بۆ ئەمە هەندێک لە وەردەگریت و بۆ ژمارەکردنی بەکاریان دەهێنیت؛ ئەو دەمێننەوە ناو هەر ژمارە دەکەن. ڕێبەرێکی درێژتر بە ئینگلیزی What Is Subnetting?ـی Geek Universityـیە.
Nobody eats a two-metre sandwich in one bite: you cut it into pieces that people can hold. A /24 is the long sandwich; subnetting cuts it into 2, 4 or 8 equal pieces. For example, 192.168.14.0/24 has one range of hosts, .1 to .254; cut in two, it becomes 192.168.14.0/25 (.1–.126) and 192.168.14.128/25 (.129–.254).
کەس ساندویچێکی دوو مەتری بە یەک پاروو ناخوات: دەیبڕیت بە چەند پارچەیەک کە خەڵک بتوانن بیگرن بە دەستەوە. /24 ساندویچە درێژەکەیە؛ دەیبڕێت بە 2، 4 یان 8 پارچەی یەکسان. بۆ نموونە، 192.168.14.0/24 یەک مەودای هەیە، لە .1 تا .254؛ کە بە دوو بڕدرا، دەبێتە 192.168.14.0/25 (.1–.126) و 192.168.14.128/25 (.129–.254).
Where the analogy stops workingسنووری ئەم نموونەیە
In basic subnetting all pieces are equal and their size is a power of two; you cannot cut a piece of any size you like. VLSM, in a later lesson, allows pieces of different sizes.
لە سادەدا هەموو پارچەکان یەکسانن و قەبارەیان توانێکی دووە؛ ناتوانیت پارچەیەک بە هەر قەبارەیەک کە دەتەوێت ببڕیت. ، لە وانەیەکی دواتردا، ڕێگە بە پارچەی قەبارە جیاواز دەدات.


/24 بڕدراو بۆ 2، 4 و 8 .CêITWhat subnets give youژێرڕایەڵەکان چیت پێ دەدەن
Picture a university in Erbil with 3,000 devices in one flat network. Every ARP or DHCP broadcast reaches all of them, every faculty can reach every other faculty directly, and nobody knows which address belongs where. Give each faculty its own subnet — Engineering 172.20.1.0/24, Science 172.20.2.0/24 and so on — and a router joins them.
زانکۆیەک لە هەولێر بهێنە پێش چاوت کە 3,000 ئامێری لە یەک تەختدا هەیە. هەر یان دەگاتە هەموویان، هەر کۆلێژێک ڕاستەوخۆ دەگاتە هەموو کۆلێژەکانی تر و کەس نازانێت کام ناونیشان هی کوێیە. تایبەت بدە بە هەر کۆلێژێک — ئەندازیاری 172.20.1.0/24، زانست 172.20.2.0/24 و هتد — و پێکیانەوە دەبەستێتەوە.
- Smaller broadcast domains: a broadcast stays inside its subnet, because routers do not forward it (Broadcast domains).
- Order: each place or department has its own range, so an address tells you where a device is.
- Security: traffic between subnets passes a router or firewall, where it can be filtered (Network segmentation).
- Fewer wasted addresses: each subnet is only as big as its group needs.
- بچووکتر: لە ناو خۆیدا دەمێنێتەوە، چونکە نایگوازنەوە (پاوانەکانی پەخش).
- ڕێکوپێکی: هەر شوێن یان بەشێک مەودای خۆی هەیە، بۆیە ناونیشانێک پێت دەڵێت ئامێرەکە لە کوێیە.
- : هاتوچۆی نێوان بە یان تێدەپەڕێت و لەوێ دەتوانرێت پاڵاوتە بکرێت (بەشبەشکردنی ڕایەڵە).
- ناونیشانی بەفیڕۆچووی کەمتر: هەر تەنیا ئەوەندە گەورەیە کە گرووپەکەی پێویستیەتی.
Your home is a small example: the home router separates your LAN from the ISP's network. Millions of homes can all use 192.168.1.0/24 because these are private addresses, and NAT shares one public address (NAT) — subnetting itself only splits one block into smaller blocks.
ماڵەکەت نموونەیەکی بچووکە: ماڵەوە لە جیا دەکاتەوە. ملیۆنان ماڵ دەتوانن هەموویان 192.168.1.0/24 بەکار بهێنن، چونکە ئەمانە و یەک بەش دەکات (وەرگێڕانی ناونیشانی ڕایەڵە) — خۆی تەنیا بلۆکێک دەکات بە چەند بلۆکێکی بچووکتر.
Before you start: count what you needپێش دەستپێکردن: ئەوەی پێویستتە بیژمێرە
Subnetting has three stages: analyse the needs, design the subnets (choose the block and one mask, list the subnets), then plan the implementation (which subnet goes where, static addresses, DHCP ranges). The analysis asks four questions: which hosts belong together in one subnet? How many subnets are needed? How many hosts does each subnet need? One subnet size for all, or different sizes?
سێ قۆناغی هەیە: شیکردنەوەی پێویستییەکان، دیزاینی (بلۆکەکە و یەک هەڵبژێرە، بنووسە)، پاشان پلانی جێبەجێکردن (کام بۆ کوێ، ناونیشانی جێگیر، مەوداکانی ). شیکردنەوەکە چوار پرسیار دەکات: کام پێکەوە لە یەک ؟ چەند پێویستە؟ هەر چەند پێویستە؟ یەک قەبارە بۆ هەموو، یان قەبارەی جیاواز؟
The grouping rule: addresses in the same subnet are not separated by a router; addresses in different subnets are separated by at least one router. So count every LAN behind a router interface and every link between two routers — even a router-to-router link is a subnet. Then find the subnet with the most hosts: it decides the size.
یاسای گرووپکردن: ناونیشانەکانی ناو هەمان بە لە یەک جیا ناکرێنەوە؛ ناونیشانەکانی جیاواز بە لانیکەم یەک لە یەک جیا دەکرێنەوە. بۆیە هەر لە پشت و هەر بەستەرێکی نێوان دوو بژمێرە — تەنانەت بەستەرێکی نێوان دوو . پاشان ئەو بدۆزەوە کە زۆرترین هەیە: ئەو قەبارەکە دیاری دەکات.
Borrowing host bitsقەرزکردنی بیتەکانی میوانگر
Before subnetting, an address has two parts with a fixed size: the network part (N bits) and the host part. Subnetting borrows S bits from the host part, so three parts appear: N + S + H = 32. With S subnet bits you get subnets, and with H host bits each subnet has usable addresses. One subnet bit gives 2 subnets, two bits give 4, three bits give 8.
پێش ، ناونیشان دوو بەشی قەبارە جێگیری هەیە: (N ) و . S لە قەرز دەکات، بۆیە سێ بەش دەردەکەون: N + S + H = 32. بە S وەردەگریت و بە H هەر ناونیشانی بەکارهاتووی هەیە. یەک 2 دەدات، دوو 4 و سێ 8.
Choose S so that you get at least X subnets, then check that H still gives at least Y hosts.
S بە جۆرێک هەڵبژێرە کە لانیکەم X وەربگریت، پاشان بپشکنە کە H هێشتا لانیکەم Y دەدات.
Design example: the class B network 172.16.0.0 must have 200 subnets with 200 hosts each. is too few, so S = 8 ( subnets, 56 spare). That leaves H = 32 − 16 − 8 = 8: hosts, 54 spare. The new prefix is 16 + 8 = /24.
نموونەی دیزاین: پۆلی B 172.16.0.0 دەبێت 200 هەبێت، هەریەکە 200 . کەمە، بۆیە S = 8 ( ، 56 زیادە). کەواتە : ، 54 زیادە. پێشگری نوێ ، واتە /24.
The magic number: block sizeژمارەی جادوویی: قەبارەی بلۆک
Where do the subnets start? Look at the interesting octet: the mask octet that is neither 255 nor 0 (for /26 it is the last one, 192). The block size — in class often called the magic number — is 256 minus that octet: 256 − 192 = 64. 256 is , the number of values one octet of 8 bits can hold. The subnet IDs are the multiples of the block size: 0, 64, 128 and 192.
لە کوێ دەست پێ دەکەن؟ سەیری ئەو بکە کە نە 255ـە و نە 0 (بۆ /26 دوایین ، 192). قەبارەی بلۆک — کە لە پۆلدا زۆرجار پێی دەگوترێت — بریتییە لە 256 لابردنی ئەو : . 256 دەکاتە ، ژمارەی ئەو بەهایانەی یەک 8 دەتوانێت هەڵیبگرێت. چەندجارەکانی قەبارەی بلۆکن: 0، 64، 128 و 192.
Two ways give the same number: 256 ÷ (number of subnets) = 256 ÷ 4 = 64, or = = 64. The last subnet always starts at 256 − block size: 256 − 64 = 192. You will use the same block size of 64, in the third octet, in a RIP lab with /18 subnets.
دوو ڕێگە هەمان ژمارە دەدەن: (256 دابەش بە ژمارەی )، یان . دوایین هەمیشە لە 256 لابردنی قەبارەی بلۆکەوە دەست پێ دەکات: . هەمان قەبارەی بلۆک، 64، لە سێیەمدا لە تاقیکردنەوەیەکی RIP بە ژێرڕایەڵەکانی /18 بەکار دەهێنیتەوە.
Subnet ID, broadcast and usable addressesناسەڕایەڵە، ناسەپەخش و ناونیشانە بەکارهاتووەکان
Every subnet has the same four key numbers as a network. The subnet ID (subnet number, subnet address) is the lowest number of the subnet and names the subnet. The subnet broadcast address (also called the directed broadcast address) is the highest number. Neither can be given to a host. All the numbers between them are the usable addresses for hosts.
هەر هەمان چوار ژمارە سەرەکییەکەی هەیە. (ژمارە یان ناونیشانی ) نزمترین ژمارەی و ناوی دیاری دەکات. (کە پێی دەگوترێت ئاڕاستەکراویش) بەرزترین ژمارەیە. هیچیان نادرێن بە . هەموو ژمارەکانی نێوانیان ناونیشانە بەکارهاتووەکانن بۆ .
So for each subnet: first host = subnet ID + 1, broadcast = next subnet ID − 1 (or subnet ID + block size − 1), and last host = broadcast − 1. For 192.168.4.64/26: subnet ID .64, first host .65, last host .126, broadcast .127 — and the next subnet starts at .128.
کەواتە بۆ هەر : یەکەم = + 1، = دواتر − 1 (یان + قەبارەی بلۆک − 1) و دوایین = − 1. بۆ 192.168.4.64/26: .64، یەکەم .65، دوایین .126، .127 — و دواتر لە .128ـەوە دەست پێ دەکات.
The seven numbers of every subnet: size, mask and CIDR prefix, network ID, broadcast address, first and last host, and the next network.
حەوت ژمارەکەی هەر : قەبارە، و پێشگری ، ، ، یەکەم و دوایین و دواتر.
Watch from 1:40: the seven numbers of a subnet, with the network ID, the broadcast address and the first and last host.
لە 1:40ـەوە سەیر بکە: حەوت ژمارەکەی ، لەگەڵ ، و یەکەم و دوایین .
Worked example: three departments of a college in Erbilنموونەی کارپێکراو: سێ بەشی کۆلێژێک لە هەولێر
You are the network engineer of a university in Erbil. The College of Informatics has the network 192.168.4.0/24 and three departments — Information Technology, Networks and Database. Each department must exchange data inside its own subnet, separated from the others.
تۆ ئەندازیاری زانکۆیەکی لە هەولێر. کۆلێژی ئینفۆرماتیک 192.168.4.0/24ـی هەیە و سێ بەش — ، بەشی و . دەبێت هەر بەشێک لە ناو خۆیدا ئاڵوگۆڕ بکات، جیا لە ئەوانی تر.
Three subnets are needed, but subnets come in powers of two: is too few, is enough. Borrow 2 bits: /26. Each subnet has 64 addresses (including the subnet ID and the broadcast), so 62 hosts. The animation goes through the steps.
سێ پێویستە، بەڵام ژمارەی توانێکی دووە: کەمە، بەسە. 2 قەرز بکە: /26. هەر 64 ناونیشانی هەیە (بە و )، واتە 62 . ئەنیمەیشنەکە هەنگاوەکان نیشان دەدات.


Worked example: three departments of a college in Erbilنموونەی کارپێکراو: سێ بەشی کۆلێژێک لە هەولێر
The finished table, column by columnخشتە تەواوکراوەکە، ستوون بە ستوون
| Departmentبەش | Subnet ID | Mask | Host rangeمەودای | Broadcast | Hosts |
|---|---|---|---|---|---|
| Information Technology | 192.168.4.0 | /26 | .1 – .62 | 192.168.4.63 | 62 |
| Networksبەشی | 192.168.4.64 | /26 | .65 – .126 | 192.168.4.127 | 62 |
| Database | 192.168.4.128 | /26 | .129 – .190 | 192.168.4.191 | 62 |
| spareیەدەگ | 192.168.4.192 | /26 | .193 – .254 | 192.168.4.255 | 62 |
- Subnet IDناسەڕایەڵە
Start with the college's 192.168.4.0, then add the block size, 64, each time.
بە 192.168.4.0ـی کۆلێژەکە دەست پێ بکە، پاشان هەر جارە قەبارەی بلۆک، 64، زیاد بکە.
- Maskماسکی ژێرڕایەڵە
The same for all four: /26 (255.255.255.192).
بۆ هەر چواریان هەمانە:
/26(255.255.255.192). - Hostsمیوانگرەکان
62, not 64: the 64 addresses include the subnet ID and the broadcast.
62، نەک 64: 64 ناونیشانەکە و لەخۆ دەگرن.
- Broadcastناسەپەخش
The next subnet ID minus 1; the last one ends at .255. Or add 64 to the previous broadcast: .191 + 64 = .255.
دواتر لابردنی 1؛ دوایینیان بە
.255کۆتایی دێت. یان 64 بخە سەر پێشوو:.191+ 64 =.255. - Host rangeمەودای میوانگرەکان
Everything between the subnet ID and the broadcast: first host = ID + 1, last host = broadcast − 1.
هەموو ئەوانەی لە نێوان و : یەکەم = + 1، دوایین = − 1.
Three departments use three subnets; the fourth stays free. With equal-size subnets one block is left over — keep it for a new department, or split it further with VLSM (VLSM: subnets of different sizes).
سێ بەش سێ بەکار دەهێنن؛ چوارەمیان بەتاڵ دەمێنێتەوە. بە قەبارە یەکسان، بلۆکێک زیاد دەمێنێتەوە — بۆ بەشێکی نوێ هەڵیبگرە، یان بە زیاتر دابەشی بکە (VLSM: ژێرڕایەڵەکانی قەبارە جیاواز).
A quick table for /24 to /32خشتەیەکی خێرا بۆ /24 تا /32
For a /24 the whole job fits in one table. Find the number of subnets you need (or the hosts per subnet) and read the prefix, the mask, the block size and the usable hosts on the same row. Needing 3 subnets? 3 is not in the table, so take the next bigger number, 4: /26, block 64, 62 hosts.
بۆ /24 هەموو کارەکە لە یەک خشتەدا جێ دەبێتەوە. ژمارەی ئەو پێویستتە (یان هەر ) بدۆزەوە و پێشگر، ، قەبارەی بلۆک و بەکارهاتوو لە هەمان ڕیزدا بخوێنەوە. 3 پێویستە؟ 3 لە خشتەکەدا نییە، بۆیە ژمارەی گەورەتری دواتر بگرە، 4: /26، بلۆکی 64، 62 .
Which subnet is this address in?ئەم ناونیشانە لە کام ژێرڕایەڵەدایە؟
Exams often give one address with a prefix and ask for its subnet. Method: find the block size, then find the largest multiple of the block size that is not bigger than the address's interesting octet. That multiple is the subnet ID; the next multiple minus 1 is the broadcast.
پرسیارەکانی تاقیکردنەوە زۆرجار یەک ناونیشان لەگەڵ پێشگرێک دەدەن و دەپرسن. ڕێگە: قەبارەی بلۆک بدۆزەوە، پاشان گەورەترین چەندجارەی قەبارەی بلۆک بدۆزەوە کە لە گۆڕاوەکەی ناونیشانەکە گەورەتر نەبێت. ئەو چەندجارەیە ؛ چەندجارەی دواتر لابردنی 1 .
- 192.168.1.77/25 — block 128 (2 subnets, 126 hosts each): 77 is in .0–.127 → subnet ID 192.168.1.0, broadcast 192.168.1.127.
- 192.168.1.200/25 — same two subnets: 200 is in .128–.255 → subnet ID 192.168.1.128, broadcast 192.168.1.255.
- 192.168.1.200/26 — block 64 (4 subnets, 62 hosts each): 200 is in .192–.255 → 192.168.1.192, broadcast 192.168.1.255.
- 192.168.1.100/27 — block 32 (8 subnets, 30 hosts each: 0–31, 32–63, 64–95, 96–127 …): 100 is in .96–.127 → 192.168.1.96, broadcast 192.168.1.127.
- 192.168.1.77/25 — بلۆکی 128 (واتە 2 ، هەریەکە 126 ): 77 لە
.0–.127ـدایە ← 192.168.1.0، 192.168.1.127. - 192.168.1.200/25 — هەمان دوو : 200 لە
.128–.255ـدایە ← 192.168.1.128، 192.168.1.255. - 192.168.1.200/26 — بلۆکی 64 (واتە 4 ، هەریەکە 62 ): 200 لە
.192–.255ـدایە ← 192.168.1.192، 192.168.1.255. - 192.168.1.100/27 — بلۆکی 32 (واتە 8 ، هەریەکە 30 : 0–31، 32–63، 64–95، 96–127 …)؛ 100 لە
.96–.127ـدایە ← 192.168.1.96، 192.168.1.127.
The mask may also be given in dotted decimal: 192.168.0.100 with 255.255.255.128 is the same as /25 — 1 borrowed bit, block 128, subnets 192.168.0.0–192.168.0.127 and 192.168.0.128–192.168.0.255, so .100 is in the first.
دەکرێت بە بدرێت: 192.168.0.100 لەگەڵ 255.255.255.128 هەمان /25ـە — 1 قەرزکراو، بلۆکی 128، 192.168.0.0–192.168.0.127 و 192.168.0.128–192.168.0.255، بۆیە .100 لە یەکەمیاندایە.
One address, four masksیەک ناونیشان، چوار ماسکی ژێرڕایەڵە
A classic exercise: subnet 192.168.1.100 with /28, /29, /30 and /31 (class C, so the starting mask is /24). For each mask: borrowed bits = prefix − 24, subnets = , block size = 256 ÷ subnets, hosts = block − 2, and the subnet of .100 is the block that holds 100.
ڕاهێنانێکی ناسراو: 192.168.1.100 بە /28، /29، /30 و /31 (پۆلی C، بۆیە سەرەتا /24ـە). بۆ هەر : قەرزکراو = پێشگر − 24، ژمارەی = ، قەبارەی بلۆک = 256 ÷ ژمارەی ، = بلۆک − 2 و .100 ئەو بلۆکەیە کە 100ـی تێدایە.
| Prefixپێشگر | Mask | Borrowed bits قەرزکراو | Subnets | Blockبلۆک | Hosts | Subnet of .100 .100 |
|---|---|---|---|---|---|---|
| /28 | 255.255.255.240 | 4 | 16 | 16 | 14 | 192.168.1.96 – .111 |
| /29 | 255.255.255.248 | 5 | 32 | 8 | 6 | 192.168.1.96 – .103 |
| /30 | 255.255.255.252 | 6 | 64 | 4 | 2 | 192.168.1.100 – .103 |
| /31 | 255.255.255.254 | 7 | 128 | 2 | 2 (router link)2 (بەستەری ) | 192.168.1.100 – .101 |
To list all the subnets quickly, count up in steps of the block size: for /29, 0, 8, 16, 24 … The last subnet ID is always 256 − block size (for /29: 256 − 8 = 248, the same as “255 − (block − 1)”), and the last broadcast is .255.
بۆ نووسینی خێرای هەموو ، بە هەنگاوی قەبارەی بلۆک بژمێرە: بۆ /29، 0، 8، 16، 24 … دوایین هەمیشە ـە (بۆ /29: ، هەمان ) و دوایین .255ـە.
/31: two addresses for a router link/31: دوو ناونیشان بۆ بەستەری ڕێدۆز
What about /31? The block size is 2, so the old rule leaves no host at all (2 − 2 = 0), and for a long time /31 was treated as unusable. Since RFC 3021 (December 2000) that is no longer true for point-to-point links: a link between two routers has exactly two ends and needs no broadcast, so both addresses of a /31 are host addresses. A /30 wastes half of its four addresses on the same link.
ئەی /31؟ قەبارەی بلۆک 2ـە، بۆیە یاسا کۆنەکە هیچ ناهێڵێتەوە () و بۆ چەندین ساڵ /31 بە بەکارنەهاتوو دادەنرا. لە RFC 3021ـەوە (کانوونی یەکەمی 2000) ئەمە بۆ بەستەری ڕاست نییە: بەستەرێکی نێوان دوو تەنیا دوو سەری هەیە و پێویستی بە نییە، بۆیە هەردوو ناونیشانی /31 ناونیشانی . /30 لە هەمان بەستەردا نیوەی چوار ناونیشانەکەی بەفیڕۆ دەدات.
In a normal LAN a /31 is still useless: there would be no room for a broadcast address or a third device. And /32 is one single address — used, for example, for a router's loopback interface in the routing lessons. Python agrees: ip_network('198.51.100.0/31').hosts() returns both addresses.
لە ئاساییدا /31 هێشتا بێسوودە: شوێن بۆ یان ئامێری سێیەم نامێنێت. /32ـیش تەنیا یەک ناونیشانە — بۆ نموونە بۆ لە وانەکانی بەکار دێت. هەمان شت دەڵێت: ip_network('198.51.100.0/31').hosts() هەردوو ناونیشانەکە دەگەڕێنێتەوە.
/31 نیوەی ناونیشانەکانی هەموو بەستەرێکی نێوان دوو دەپارێزێت.CêITExam question: what exists before subnetting?پرسیاری تاقیکردنەوە: پێش ژێرڕایەڵەسازی چی هەیە؟
A favourite exam question: before an engineer subnets the class B network 172.16.0.0, which parts of its address structure already exist, with a fixed size? Think of N + S + H: the subnet part is created by borrowing, so before subnetting there are only two parts: the network part and the host part (16 bits each).
پرسیارێکی خۆشەویستی تاقیکردنەوە: پێش ئەوەی ئەندازیارێک پۆلی B 172.16.0.0 بکات، کام بەشەکانی پێکهاتەی ناونیشانەکانی بە قەبارەیەکی دیاریکراو هەن؟ بیر لە N + S + H بکەرەوە: بەشی بە قەرزکردن دروست دەبێت، بۆیە پێش تەنیا دوو بەش هەن: و (هەریەکە 16 ).
Plan the implementation, then try itپلانی جێبەجێکردن، پاشان تاقیکردنەوە
The last stage maps the subnets onto the real network: look at the network diagram and give every location that needs a subnet its own block. In the example below the class B network 172.16.0.0 is cut into /24 subnets: one for each of the three LANs and one for each of the two links between routers (a serial link and an Ethernet WAN). Then decide the static addresses (router interfaces, servers) and the DHCP ranges in each subnet.
قۆناغی کۆتایی دەخاتە سەر ڕاستەقینەکە: سەیری بکە و بلۆکی تایبەت بدە بە هەر شوێنێک کە پێویستی بە هەیە. لە نموونەی خوارەوەدا پۆلی B 172.16.0.0 بڕدراوە بۆ /24: یەکێک بۆ هەریەک لە سێ و یەکێک بۆ هەریەک لە دوو بەستەرەکەی نێوان (بەستەرێکی زنجیرەیی و Ethernet WAN). پاشان ناونیشانە جێگیرەکان ( ، ) و مەوداکانی لە هەر دیاری بکە.
/24ـی 172.16.0.0.CêITTry it: in the CêIT network lab build two subnets joined by a router — for example 192.168.1.0/26 and 192.168.1.64/26 — give each PC an address of its subnet and the router interface as gateway, then ping across. In Packet Tracer the same works with a router and two switches; the next lesson builds bigger designs.
تاقیی بکەرەوە: لە تاقیگەی ڕایەڵەی CêIT دوو دروست بکە کە بە پێکەوە بەستراون — بۆ نموونە 192.168.1.0/26 و 192.168.1.64/26 — بە هەر PCـێک ناونیشانێکی بدە و وەک ، پاشان بکە بۆ ئەوبەر. لە Packet Tracerـیش بە و دوو هەمان کار دەکرێت؛ وانەی داهاتوو دیزاینی گەورەتر دروست دەکات.
Common mistakesهەڵە باوەکان
| Mistakeهەڵە | What is trueڕاستییەکە |
|---|---|
A /26 subnet has 64 hosts. /26 64 هەیە. | 64 addresses, 62 hosts: the subnet ID and the broadcast are not hosts.64 ناونیشان، 62 : و نین. |
| The first host is the subnet ID; the last host is the broadcast.یەکەم ؛ دوایین . | First host = subnet ID + 1; last host = broadcast − 1.یەکەم = + 1؛ دوایین = − 1. |
| Need 3 subnets → borrow 3 bits.3 پێویستە ← 3 قەرز بکە. | Borrow the fewest bits with : 2 bits give 4.کەمترین قەرز بکە کە : 2 4 دەدەن. |
| Block size = the mask octet (192).قەبارەی بلۆک = (192). | Block size = 256 − 192 = 64.قەبارەی بلۆک = . |
| The block size is always applied to the last octet.قەبارەی بلۆک هەمیشە لە دوایین بەکار دێت. | It applies to the octet where the mask is neither 255 nor 0 (the third octet for /17–/23).لەو بەکار دێت کە تێیدا نە 255ـە نە 0 ( سێیەم بۆ /17–/23). |
/31 is never valid./31 هەرگیز دروست نییە. | It is valid on point-to-point router links (RFC 3021).لە بەستەری دروستە (RFC 3021). |
| Two subnets can be on the same LAN without a router.دوو دەتوانن بێ لەسەر هەمان بن. | Different subnets need a router between them to talk. جیاواز بۆ قسەکردن پێویستیان بە هەیە لە نێوانیاندا. |
Exercisesڕاهێنانەکان
Subnet 192.168.1.100 with /28, /29 and /30. For each: borrowed bits, number of subnets, block size, hosts per subnet, the first three subnets, the last subnet and the subnet that holds .100.
192.168.1.100 بە /28، /29 و /30 بکە. بۆ هەریەکە: قەرزکراو، ژمارەی ، قەبارەی بلۆک، هەر ، سێ یەکەم، دوایین و ئەو .100ـی تێدایە.
Show answerوەڵامەکە پیشان بدە
| Mask | Borrowed bits (S) قەرزکراو (S) | Subnets | Blockبلۆک | Hosts | First threeسێی یەکەم | Lastدوایین | .100 is in.100 لە |
|---|---|---|---|---|---|---|---|
| /28 | 4 | 16 | 16 | 14 | .0, .16, .32 | .240 – .255 | .96 – .111 |
| /29 | 5 | 32 | 8 | 6 | .0, .8, .16 | .248 – .255 | .96 – .103 |
| /30 | 6 | 64 | 4 | 2 | .0, .4, .8 | .252 – .255 | .100 – .103 |
The network 192.168.5.0/24 must be split into 5 subnets. Give the new mask, the block size, the hosts per subnet and the list of subnet IDs.
192.168.5.0/24 دەبێت بکرێت بە 5 . نوێ، قەبارەی بلۆک، هەر و لیستی بنووسە.
Show answerوەڵامەکە پیشان بدە
, so borrow 3 bits: /27 = 255.255.255.224. Block 32, 30 hosts per subnet. Subnet IDs: .0, .32, .64, .96, .128, .160, .192, .224 (five used, three spare).
، بۆیە 3 قەرز بکە: /27 = 255.255.255.224. بلۆکی 32، 30 لە هەر . : .0، .32، .64، .96، .128، .160، .192، .224 (پێنجیان بەکار دێن و سێیان یەدەگن).
The documentation network 203.0.113.0/24 must be split into 10 subnets. Which prefix do you use, and what are the first two subnets with their host ranges?
203.0.113.0/24 دەبێت بکرێت بە 10 . کام پێشگر بەکار دەهێنیت و دوو یەکەم لەگەڵ مەودای چین؟
Show answerوەڵامەکە پیشان بدە
: /28 (255.255.255.240), block 16, 14 hosts. 203.0.113.0/28: hosts .1–.14, broadcast .15. 203.0.113.16/28: hosts .17–.30, broadcast .31.
: /28 (255.255.255.240)، بلۆکی 16، 14 . 203.0.113.0/28: .1–.14، .15. 203.0.113.16/28: .17–.30، .31.
Each subnet of 192.168.7.0/24 must hold 25 hosts. Which prefix do you choose, and how many such subnets are there?
هەر 192.168.7.0/24 دەبێت 25 هەڵبگرێت. کام پێشگر هەڵدەبژێریت و چەند لەم جۆرە هەیە؟
Show answerوەڵامەکە پیشان بدە
(but is too few), so H = 5 and the prefix is 32 − 5 = /27: 8 subnets of 30 hosts.
(بەڵام کەمە)، بۆیە H = 5 و پێشگرەکە ، واتە /27: 8 ، هەریەکە 30 .
Is 192.168.4.191 a usable host address in 192.168.4.128/26? What about 192.168.4.100?
ئایا 192.168.4.191 ناونیشانێکی بەکارهاتووی لە 192.168.4.128/26ـدا؟ ئەی 192.168.4.100؟
Show answerوەڵامەکە پیشان بدە
No: .191 is the broadcast of 192.168.4.128/26 (.128–.191). And .100 is not in this subnet at all: it belongs to 192.168.4.64/26.
نەخێر: .191 192.168.4.128/26ـە (.128–.191). .100ـیش هەر لەم نییە: سەر بە 192.168.4.64/26ـە.
Summaryپوختە
- Subnetting borrows S bits from the host part: N + S + H = 32, subnets, hosts each.
- Block size (magic number) = 256 − the interesting mask octet; subnet IDs are its multiples.
- First host = ID + 1, broadcast = next ID − 1, last host = broadcast − 1.
- Subnets give smaller broadcast domains, order and security; a router joins them.
- /31 is valid on point-to-point router links (RFC 3021); /32 is a single address.
- S لە قەرز دەکات: N + S + H = 32، ، هەریەکە .
- قەبارەی بلۆک () = 256 − گۆڕاوەکەی ؛ چەندجارەکانی ئەون.
- یەکەم = + 1، = دواتر − 1، دوایین = − 1.
- بچووکتر، ڕێکوپێکی و دەدەن؛ پێکیانەوە دەبەستێتەوە.
/31لە بەستەری دروستە (RFC 3021)؛/32تەنیا یەک ناونیشانە.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
A short Kurdish worked example of subnetting with one mask for every subnet (FLSM), written out by hand.
نموونەیەکی کورتی چارەسەرکراو بە کوردی بۆ بە یەک بۆ هەموو (FLSM)، کە بە دەست نووسراوە.
Whole video, in Kurdish: one subnetting example worked by hand.
هەموو ڤیدیۆکە، بە کوردی: نموونەیەکی کە بە دەست چارەسەر دەکرێت.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
More Subnetting: Bigger Networks, Exam Questions and VLSMژێرڕایەڵەسازیی زیاتر: ڕایەڵە گەورەکان، پرسیاری تاقیکردنەوە و VLSM
Related lecturesوانە پەیوەندیدارەکان
- Address Classes, and Why CIDR Replaced Themپۆلەکانی ناونیشانی IP و بۆچی CIDR جێگەیانی گرتەوە
- More Subnetting: Bigger Networks, Exam Questions and VLSMژێرڕایەڵەسازیی زیاتر: ڕایەڵە گەورەکان، پرسیاری تاقیکردنەوە و VLSM
- Collision Domains and Broadcast Domainsپاوانەکانی پێکدادان و پاوانەکانی پەخش
- How a Packet Finds Its Way: Gateways and Routing Tablesپاکێت چۆن ڕێگای خۆی دەدۆزێتەوە: دەروازەی بنەڕەتی و خشتەکانی ڕێدۆزی
- IP Addresses and MAC Addressesناونیشانەکانی IP و ناونیشانەکانی MAC
- Network Defences: Firewalls, Segmentation, Monitoring and SIEMبەرگرییەکانی ڕایەڵە: ئاگرەدیوار، بەشبەشکردنی ڕایەڵە، چاودێریی ئاسایش و SIEM
- Route Summarizationڕاپوختکردن
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
- RFC 950 (1985): Internet Standard Subnetting Procedure
- RFC 3021 (2000): Using 31-Bit Prefixes on IPv4 Point-to-Point Links
- Cisco: Subnet Zero and the All-Ones Subnet (ip subnet-zero on by default since IOS 12.0)
- Cisco: Configure IP Addresses and Unique Subnets for New Users
- RFC 4632 (2006): Classless Inter-domain Routing (CIDR)
- Python documentation: ipaddress — subnets(), hosts() and /31 networks
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.