Chapterبەش 5 · Lectureوانە 5.6

More Subnetting: Bigger Networks, Exam Questions and VLSMژێرڕایەڵەسازیی زیاتر: ڕایەڵە گەورەکان، پرسیاری تاقیکردنەوە و VLSM

Subnetting beyond class C: the interesting octet moves to the third and second octets, the class B and class A examples, a Packet Tracer build, how many bits to borrow, real exam questions with every answer checked — one has no correct option — a ten-address drill checked with Python, and VLSM: subnets of different sizes, biggest first, with /30 or /31 router links.

لە دەرەوەی پۆلی C: بۆ سێیەم و دووەم دەچێت، نموونەکانی پۆلی B و پۆلی A، دروستکردن لە Packet Tracerـدا، چەند قەرز بکەیت، پرسیاری ڕاستەقینەی تاقیکردنەوە کە هەموو وەڵامێکیان پشکنراوە — یەکێکیان وەڵامی دروستی نییە — ڕاهێنانێکی دە ناونیشان کە بە پشکنراوە و : قەبارە جیاواز، گەورەترین یەکەم، لەگەڵ بەستەری بە /30 یان /31.

23 min read25 خولەک خوێندنەوە · 19 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Analyse a subnetting question: what is given, what is asked, borrowed bits and block size.
  • Subnet class B and class A networks, working in the third or second octet.
  • Find the subnet, broadcast address and usable range of any address with a prefix.
  • Solve exam questions on network, subnet and host bits — and recognise a broken question.
  • Design a VLSM plan, biggest first, with /30 or /31 router links.
  • پرسیارێکی شی بکەیتەوە: چی زانراوە، چی داواکراوە، چەند قەرز دەکرێت و قەبارەی بلۆک چەندە.
  • پۆلی B و پۆلی A بکەیت بە ، بە کارکردن لە سێیەم یان دووەمدا.
  • ، و مەودای بەکارهاتووی هەر ناونیشانێک لەگەڵ بدۆزیتەوە.
  • پرسیارەکانی تاقیکردنەوە لەسەر ، و چارەسەر بکەیت — و پرسیارێکی هەڵە بناسیتەوە.
  • پلانێکی دیزاین بکەیت، گەورەترین یەکەم، لەگەڵ بەستەری بە /30 یان /31.

The method in one cardڕێگەکە لە یەک کارتدا

You can already cut a class C network into subnets step by step (Subnetting Step by Step). This lesson uses the same six steps on bigger networks, on real exam questions and on subnets of different sizes (VLSM).

تۆ پێشتر دەتوانیت پۆلی C هەنگاو بە هەنگاو بکەیت بە چەند (ژێرڕایەڵەسازی هەنگاو بە هەنگاو). ئەم وانەیە هەمان شەش هەنگاو بەکار دەهێنێت بۆ ، بۆ پرسیاری ڕاستەقینەی تاقیکردنەوە و بۆ قەبارە جیاواز ().

Two words do most of the work. The block size (in class often called the magic number) is 256 minus the mask's value in the interesting octet — the octet where the mask stops being 255 (The magic number). In a class C example that is always the 4th octet. In this lesson it moves.

دوو وشە زۆربەی کارەکە دەکەن. قەبارەی بلۆک (کە لە پۆلدا زۆرجار پێی دەگوترێت ) بریتییە لە ⁦256⁩ لابردنی بەهای لە — ئەو کە تێیدا لە ⁦255⁩ دەگۆڕێت (ژمارەی جادوویی). لە نموونەیەکی پۆلی C هەمیشە چوارەمە. لەم وانەیەدا جێگۆڕکێ دەکات.

Six numbered steps for 192.168.1.0/26. 1: prefix length to subnet mask, /26 = 255.255.255.192. 2: borrowed bits S = 26 − 24 = 2 and host bits H = 32 − 26 = 6. 3: 2² = 4 subnets and 2⁶ − 2 = 62 usable hosts. 4 (highlighted): the interesting octet gives the block size: 4th octet, 256 − 192 = 64. 5: network addresses, add the block: .0, .64, .128, .192. 6: broadcast = next network − 1: .63, .127, .191, .255. Note: the same six steps work for every class; only the octet you work in changes.شەش هەنگاوی ژمارەدار بۆ 192.168.1.0/26. 1: درێژیی پێشگر ← ماسکی ژێرڕایەڵە، /26 = 255.255.255.192. 2: بیتی قەرزکراو S = 26 - 24 = 2 و بیتەکانی بەشی میوانگر H = 32 - 26 = 6. 3: 2² = 4 ژێرڕایەڵە و 2⁶ - 2 = 62 میوانگر. 4 (دیارکراو): هەشتەی گۆڕاو ژمارەی جادوویی دەدات: هەشتەی چوارەم، 256 - 192 = 64. 5: ناسەڕایەڵەکان: بلۆکەکە زیاد بکە: .0، .64، .128، .192. 6: ناسەپەخش = ناسەڕایەڵەی داهاتوو − 1: .63، .127، .191، .255. تێبینی: هەمان شەش هەنگاو بۆ هەموو پۆلێک کار دەکەن؛ تەنیا ئەو هەشتەیەی تێیدا کار دەکەیت دەگۆڕێت.
The whole method on one card.هەموو ڕێگەکە لەسەر یەک کارت.CêIT

Read the question first: given and askedسەرەتا پرسیارەکە بخوێنەوە: زانراو و داواکراو

Before any arithmetic, find two things. Given: an address with its prefix length (192.168.1.77/25) — or, when no prefix is written, a subnet mask (255.255.255.128). Asked: the subnets, the subnet one address lives in, its broadcast address, or a number of bits.

پێش هەر ژماردنێک دوو شت بدۆزەرەوە. زانراو: ناونیشانێک لەگەڵ ⁦(192.168.1.77/25)⁩ — یان ئەگەر نەنووسرابوو، ⁦(255.255.255.128)⁩. داواکراو: ، ئەو ناونیشانێک تێیدایە، یان ژمارەیەک .

The book's four steps, classlessچوار هەنگاوەکەی کتێبەکە، بە شێوەی بێ‌پۆل
  1. Mask. Write the mask of the prefix: /25 = 255.255.255.128. Exam questions often add 'class C': the old default mask (/24) only tells you how many bits were borrowed: 25 − 24 = 1.

    . بنووسە: /25 = ⁦255.255.255.128⁩. پرسیاری تاقیکردنەوە زۆرجار دەڵێت «پۆلی C»: بنەڕەتیی کۆن (/24) تەنیا پێت دەڵێت چەند قەرز کراوە: 25−24=125 - 24 = 1.

  2. Count. S borrowed bits give 2S2^S subnets; H host bits give 2H−22^H - 2 usable hosts: 21=22^1 = 2 subnets of 27−2=1262^7 - 2 = 126 hosts.

    بژمێرە. S قەرزکراو 2S2^S دەدات؛ H 2H−22^H - 2 بەکارهاتوو دەدات: 21=22^1 = 2 ، هەریەکە 27−2=1262^7 - 2 = 126 .

  3. Block size. 256 minus the mask in the interesting octet: 256 − 128 = 128. When all borrowed bits are in one octet, 256 ÷ (number of subnets) gives the same: 256 ÷ 2 = 128.

    قەبارەی بلۆک. ⁦256⁩ لابردنی لە : 256−128=128256 - 128 = 128. کاتێک هەموو ئەو قەرز کراون لە یەک ، 256÷2=128256 \div 2 = 128 (⁦256⁩ دابەش بە ژمارەی ) هەمان ژمارە دەدات.

  4. List. Start at the first network address (192.168.1.0) and add the block: 192.168.1.128. Each broadcast is the next network address − 1 (192.168.1.127); the last one ends in 255.

    ڕیزیان بکە. لە یەکەم ⁦(192.168.1.0)⁩ دەست پێ بکە و بلۆکەکە زیاد بکە: ⁦192.168.1.128⁩. هەر داهاتووە لابردنی ⁦1 (192.168.1.127)⁩؛ دوایینیان بە ⁦255⁩ کۆتایی دێت.

Worked card for Question 1. Given: 192.168.1.77/25, an address with its prefix. Working: /25 = 255.255.255.128; S = 25 − 24 = 1, so 2¹ = 2 subnets; block = 256 − 128 = 128; H = 7, so 2⁷ − 2 = 126 hosts. Asked: the subnets, and the one .77 is in. A number line of the last octet: subnet 1, 192.168.1.0/25, covers .0 to .127 and .77 is marked inside it; subnet 2, 192.168.1.128/25, covers .128 to .255. Results: subnet 1 — network address 192.168.1.0, usable .1 – .126, broadcast 192.168.1.127; subnet 2 — network address 192.168.1.128, usable .129 – .254, broadcast 192.168.1.255.کارتی کارپێکراوی پرسیاری یەکەم. زانراو: 192.168.1.77/25، ناونیشانێک لەگەڵ درێژیی پێشگرەکەی. کارکردن: /25 = 255.255.255.128؛ S = 25 - 24 = 1، بۆیە 2¹ = 2 ژێرڕایەڵە؛ بلۆک = 256 - 128 = 128؛ H = 7، بۆیە 2⁷ - 2 = 126 میوانگر. داواکراو: ژێرڕایەڵەکان و ئەوەی .77ی تێدایە. هێڵی ژمارەی دوایین هەشتە: ژێرڕایەڵەی یەکەم، 192.168.1.0/25، لە .0 تا .127 دەگرێتەوە و .77 لە ناویدا نیشانە کراوە؛ ژێرڕایەڵەی دووەم، 192.168.1.128/25، لە .128 تا .255. ئەنجام: ژێرڕایەڵەی یەکەم — ناسەڕایەڵە 192.168.1.0، بەکارهاتوو .1 تا .126، ناسەپەخش 192.168.1.127؛ ژێرڕایەڵەی دووەم — ناسەڕایەڵە 192.168.1.128، بەکارهاتوو .129 تا .254، ناسەپەخش 192.168.1.255.
Given → working → answer, and which subnet holds .77.زانراو، کارکردن و وەڵام — هەروەها کام .77ی تێدایە.CêIT

The answer also says where 192.168.1.77 lives: 77 is less than 128, so it is in subnet 1 (192.168.1.0/25, broadcast 192.168.1.127). The method for that question is in Which subnet is this address in?.

وەڵامەکە ئەوەش دەڵێت کە ⁦192.168.1.77⁩ لە کوێدایە: ⁦77⁩ لە ⁦128⁩ کەمترە، بۆیە لە یەکەمدایە (⁦192.168.1.0/25⁩، ⁦192.168.1.127⁩). ڕێگەی ئەو پرسیارە لە ئەم ناونیشانە لە کام ژێرڕایەڵەدایە؟ هەیە.

Bigger networks: the interesting octet movesڕایەڵە گەورەکان: هەشتە گۆڕاوەکە جێگۆڕکێ دەکات

Nothing changes in the method for class B or class A networks. What changes is where you work: the block size always lives in the interesting octet. You find it from the prefix length:

لە ڕێگەکەدا هیچ شتێک بۆ پۆلی B یان پۆلی A ناگۆڕێت. ئەوەی دەگۆڕێت ئەو شوێنەیە کە تێیدا کار دەکەیت: قەبارەی بلۆک هەمیشە لە . لە دەیدۆزیتەوە:

  • /25 to /32: the 4th octet (/26 = 255.255.255.192).
  • /17 to /24: the 3rd octet (/18 = 255.255.192.0).
  • /9 to /16: the 2nd octet (/10 = 255.192.0.0).
  • /25 تا /32: چوارەم (/26 = ⁦255.255.255⁩.⁦192⁩).
  • /17 تا /24: سێیەم (/18 = ⁦255.255⁩.⁦192⁩.⁦0⁩).
  • /9 تا /16: دووەم (/10 = ⁦255⁩.⁦192⁩.⁦0.0⁩).

Octets to the left of it are copied from the address — the network octets never change. Octets to the right of it are 0 in every network address and 255 in every broadcast address.

ئەو لە چەپیـن وەک خۆیان لە ناونیشانەکەوە دەگوازرێنەوە — هەرگیز ناگۆڕێن. ئەوانەی لە ڕاستیـن لە هەموو 0ـن و لە هەموو ⁦255⁩.

Animation in four steps with the mask drawn as four octet boxes. 1: /26 in 192.168.1.0/24, mask 255.255.255.192, the 4th octet is highlighted; block = 256 − 192 = 64; subnets 192.168.1.0, .64, .128, .192; first subnet 192.168.1.0 – 192.168.1.63. 2: /18 in 172.16.0.0/16, mask 255.255.192.0, the 3rd octet is highlighted; block 64; subnets 172.16.0.0, 172.16.64.0, 172.16.128.0, 172.16.192.0; first subnet 172.16.0.0 – 172.16.63.255. 3: /10 in 10.0.0.0/8, mask 255.192.0.0, the 2nd octet is highlighted; block 64; subnets 10.0.0.0, 10.64.0.0, 10.128.0.0, 10.192.0.0; first subnet 10.0.0.0 – 10.63.255.255. 4: one rule for every class: /25–/32 the 4th octet, /17–/24 the 3rd, /9–/16 the 2nd; all three examples use block 64, in a different octet.
Animation in four steps with the mask drawn as four octet boxes. 1: /26 in 192.168.1.0/24, mask 255.255.255.192, the 4th octet is highlighted; block = 256 − 192 = 64; subnets 192.168.1.0, .64, .128, .192; first subnet 192.168.1.0 – 192.168.1.63. 2: /18 in 172.16.0.0/16, mask 255.255.192.0, the 3rd octet is highlighted; block 64; subnets 172.16.0.0, 172.16.64.0, 172.16.128.0, 172.16.192.0; first subnet 172.16.0.0 – 172.16.63.255. 3: /10 in 10.0.0.0/8, mask 255.192.0.0, the 2nd octet is highlighted; block 64; subnets 10.0.0.0, 10.64.0.0, 10.128.0.0, 10.192.0.0; first subnet 10.0.0.0 – 10.63.255.255. 4: one rule for every class: /25–/32 the 4th octet, /17–/24 the 3rd, /9–/16 the 2nd; all three examples use block 64, in a different octet.
Same block size, three different octets.هەمان قەبارەی بلۆک، سێ جیاواز.CêIT

Class B: 172.16.0.0/16 cut into /17, /18 and /24پۆلی ⁦B: 172.16.0.0/16⁩ دەبڕدرێت بە /17، /18 و /24

Take the private class B block 172.16.0.0/16. Borrowing 1 bit gives /17 (255.255.128.0): the third octet is interesting and the block size is 128. Borrow 2 bits for /18 or 8 bits for /24:

بلۆکی تایبەتی پۆلی B، ⁦172.16.0.0/16⁩، وەربگرە. قەرزکردنی 1 /17 دەدات ⁦(255.255.128.0)⁩: سێیەم و قەبارەی بلۆک ⁦128⁩ـە. بۆ /18 دوو و بۆ /24 هەشت قەرز بکە:

New prefix نوێMaskSS (قەرزکراو)SubnetsBlock (3rd octet)بلۆک ( سێیەم)Usable hosts each هەریەکە
/17255.255.128.012128215−2=32,7662^{15} - 2 = 32{,}766
/18255.255.192.02464214−2=16,3822^{14} - 2 = 16{,}382
/24255.255.255.08256128−2=2542^{8} - 2 = 254

The two /17 subnets are 172.16.0.0–172.16.127.255 and 172.16.128.0–172.16.255.255. So 172.16.0.200/17 lives in 172.16.0.0/17 (broadcast 172.16.127.255) and 172.16.128.200/17 in 172.16.128.0/17 (broadcast 172.16.255.255). The /18 subnets start at 172.16.0.0, 172.16.64.0, 172.16.128.0 and 172.16.192.0; the /24 subnets at 172.16.0.0, 172.16.1.0 … 172.16.255.0.

دوو /17 بریتین لە ⁦172.16.0.0⁩ تا ⁦172.16.127.255⁩ و ⁦172.16.128.0⁩ تا ⁦172.16.255.255⁩. بۆیە ⁦172.16.0.200/17⁩ لە ⁦172.16.0.0/17⁩ـدایە ( ⁦172.16.127.255⁩) و ⁦172.16.128.200/17⁩ لە ⁦172.16.128.0/17⁩ـدا ( ⁦172.16.255.255⁩). /18 لە ⁦172.16.0.0⁩، ⁦172.16.64.0⁩، ⁦172.16.128.0⁩ و ⁦172.16.192.0⁩ دەست پێ دەکەن؛ هی /24 لە ⁦172.16.0.0⁩، ⁦172.16.1.0 … 172.16.255.0⁩.

Three bars for the third octet of 172.16.0.0/16, from 0 to 255. /17: two halves, 172.16.0.0 – 172.16.127.255 and 172.16.128.0 – 172.16.255.255. /18: four quarters starting at 172.16.0.0, 172.16.64.0, 172.16.128.0 and 172.16.192.0, ending at .63.255, .127.255, .191.255 and .255.255. /24: 256 thin stripes, 256 subnets of 254 hosts from 172.16.0.0 to 172.16.255.0. Two dashed markers: 172.16.0.200 falls in the first /17 (broadcast 172.16.127.255) and 172.16.128.200 in the second /17 (broadcast 172.16.255.255).سێ هێڵ بۆ هەشتەی سێیەمی 172.16.0.0/16، لە 0 تا 255. /17: دوو نیوە، 172.16.0.0 تا 172.16.127.255 و 172.16.128.0 تا 172.16.255.255. /18: چوار چارەک کە لە 172.16.0.0، 172.16.64.0، 172.16.128.0 و 172.16.192.0 دەست پێ دەکەن. /24: 256 هێڵی باریک، 256 ژێرڕایەڵەی 254 میوانگر، لە 172.16.0.0 تا 172.16.255.0. دوو نیشانەی پچڕپچڕ: 172.16.0.200 دەکەوێتە یەکەم /17 (ناسەپەخش 172.16.127.255) و 172.16.128.200 دەکەوێتە دووەم /17 (ناسەپەخش 172.16.255.255).
In class B the block size works in the third octet.لە پۆلی Bـدا قەبارەی بلۆک لە سێیەمدا کار دەکات.CêIT

Class A: 10.0.0.0/8 cut into /9, /10 and /16پۆلی ⁦A: 10.0.0.0/8⁩ دەبڕدرێت بە /9، /10 و /16

With the private class A block 10.0.0.0/8 the interesting octet is the second one for prefixes /9 to /16. The block sizes are the same numbers as in class C — just one octet further left:

لەگەڵ بلۆکی تایبەتی پۆلی A، ⁦10.0.0.0/8⁩، بۆ /9 تا /16 دووەم . قەبارەی بلۆکەکان هەمان ژمارەکانی پۆلی Cـن — تەنیا یەک زیاتر بەرەو چەپ:

New prefix نوێMaskSS (قەرزکراو)SubnetsBlock (2nd octet)بلۆک ( دووەم)Usable hosts each هەریەکە
/9255.128.0.012128223−2=8,388,6062^{23} - 2 = 8{,}388{,}606
/10255.192.0.02464222−2=4,194,3022^{22} - 2 = 4{,}194{,}302
/16255.255.0.082561216−2=65,5342^{16} - 2 = 65{,}534

The two /9 subnets are 10.0.0.0–10.127.255.255 and 10.128.0.0–10.255.255.255. The four /10 subnets: 10.0.0.0–10.63.255.255, 10.64.0.0–10.127.255.255, 10.128.0.0–10.191.255.255 and 10.192.0.0–10.255.255.255. The /16 subnets run from 10.0.0.0/16 to 10.255.0.0/16. Because the interesting octet is the second, the third and fourth octets are 0.0 in a network address and 255.255 in a broadcast.

دوو /9 بریتین لە ⁦10.0.0.0⁩ تا ⁦10.127.255.255⁩ و ⁦10.128.0.0⁩ تا ⁦10.255.255.255⁩. چوار /10: ⁦10.0.0.0⁩ تا ⁦10.63.255.255⁩، ⁦10.64.0.0⁩ تا ⁦10.127.255.255⁩، ⁦10.128.0.0⁩ تا ⁦10.191.255.255⁩ و ⁦10.192.0.0⁩ تا ⁦10.255.255.255⁩. /16 لە ⁦10.0.0.0/16⁩ـەوە تا ⁦10.255.0.0/16⁩ دەڕۆن. لەبەر ئەوەی دووەم ، سێیەم و چوارەم لە 0.0ـن و لە 255.255.

Top: the second /10 subnet written as four octet boxes. Network address 10 . 64 . 0 . 0 = 10.64.0.0/10 and broadcast 10 . 127 . 255 . 255; the first octet (10) is copied, the second is the interesting octet, and the last two are 0 in the network address and 255 in the broadcast. Below: bars for the second octet. /9: 10.0.0.0 – 10.127.255.255 and 10.128.0.0 – 10.255.255.255. /10: 10.0.0.0 – 10.63.255.255, 10.64.0.0 – 10.127.255.255, 10.128.0.0 – 10.191.255.255, 10.192.0.0 – 10.255.255.255. Notes: a /16 makes 256 subnets, 10.0.0.0/16 to 10.255.0.0/16, each with 65,534 hosts; the block sizes are the same as in class C, one octet further left.سەرەوە: دووەم ژێرڕایەڵەی /10 بە چوار سندووقی هەشتە نووسراوە. ناسەڕایەڵە 10 . 64 . 0 . 0 = 10.64.0.0/10 و ناسەپەخش 10 . 127 . 255 . 255؛ هەشتەی یەکەم (10) وەک خۆیەتی، دووەم هەشتە گۆڕاوەکەیە و دوو هەشتەی کۆتایی لە ناسەڕایەڵەدا 0ـن و لە ناسەپەخشدا 255. خوارەوە: هێڵەکانی هەشتەی دووەم. /9: 10.0.0.0 تا 10.127.255.255 و 10.128.0.0 تا 10.255.255.255. /10: 10.0.0.0 تا 10.63.255.255، 10.64.0.0 تا 10.127.255.255، 10.128.0.0 تا 10.191.255.255، 10.192.0.0 تا 10.255.255.255. تێبینی: /16 دەکاتە 256 ژێرڕایەڵە، لە 10.0.0.0/16 تا 10.255.0.0/16، هەریەکە 65,534 میوانگر؛ قەبارەی بلۆکەکان هەمان هی پۆلی Cـن، یەک هەشتە زیاتر بەرەو چەپ.
In class A the second octet does the work.لە پۆلی Aـدا دووەم کارەکە دەکات.CêIT

Is every .255 a broadcast? A /17 labئایا هەموو .255ـێک ناسەپەخشە؟ تاقیگەیەکی /17

In a /24, every address ending in .255 is a broadcast. In bigger subnets that is no longer true. In this Packet Tracer practice two /17 subnets sit behind one router: PC6 172.16.127.254, PC7 172.16.15.255 and the router interface 172.16.0.1 in the first; the router interface 172.16.128.1, PC8 172.16.255.254 and PC9 172.16.200.255 in the second.

لە /24ـدا هەموو ناونیشانێک کە بە .255 کۆتایی بێت . لە ئەمە ئیتر ڕاست نییە. لەم ڕاهێنانەی Packet Tracerـدا دوو /17 لە پشت یەک : ⁦PC6 172.16.127.254⁩، ⁦PC7 172.16.15.255⁩ و ⁦172.16.0.1⁩ لە یەکەمدا؛ ⁦172.16.128.1⁩، ⁦PC8 172.16.255.254⁩ و ⁦PC9 172.16.200.255⁩ لە دووەمدا.

PC7 and PC9 end in .255 but they are ordinary hosts: their host bits are not all 1. A /17 has 15 host bits (the last 7 bits of the third octet and the whole fourth octet), so in 172.16.0.0/17 only 172.16.127.255 has all host bits 1. In the same way an address ending in .0, such as 172.16.1.0/17, can be a host.

⁦PC7⁩ و ⁦PC9⁩ بە .255 کۆتایی دێن، بەڵام ئاسایین: هەموو 1 نین. /17 پازدە هەیە (⁦7⁩ کۆتایی سێیەم و هەموو چوارەم)، بۆیە لە ⁦172.16.0.0/17⁩ـدا تەنیا ⁦172.16.127.255⁩ هەموو 1ـن. بە هەمان شێوە ناونیشانێک کە بە .0 کۆتایی بێت، وەک ⁦172.16.1.0/17⁩، دەتوانێت بێت.

Packet Tracer practice redrawn: router R1 in the middle. Left subnet 172.16.0.0/17 (mask 255.255.128.0): R1's interface 172.16.0.1, switch SW1, PC6 172.16.127.254 and PC7 172.16.15.255. Right subnet 172.16.128.0/17: R1's interface 172.16.128.1, switch SW2, PC8 172.16.255.254 and PC9 172.16.200.255. PC7 and PC9 are highlighted: they end in .255 but are still hosts. Bottom: the only broadcasts are 172.16.127.255 and 172.16.255.255 (all 15 host bits = 1); each PC uses its router interface as the default gateway.ڕاهێنانی Packet Tracer بە کێشانەوەیەکی نوێ: ڕێدۆز R1 لە ناوەڕاست. ژێرڕایەڵەی چەپ 172.16.0.0/17 (ماسکی ژێرڕایەڵە 255.255.128.0): نێوبەستەی R1 172.16.0.1، سویچ SW1، PC6 172.16.127.254 و PC7 172.16.15.255. ژێرڕایەڵەی ڕاست 172.16.128.0/17: نێوبەستەی R1 172.16.128.1، سویچ SW2، PC8 172.16.255.254 و PC9 172.16.200.255. PC7 و PC9 دیار کراون: بە .255 کۆتایی دێن، بەڵام هێشتا میوانگرن. خوارەوە: تاکە ناسەپەخشەکان 172.16.127.255 و 172.16.255.255ـن (هەر 15 بیتی بەشی میوانگر = 1)؛ هەر PCـێک نێوبەستەی ڕێدۆزەکەی لای خۆی وەک دەروازەی بنەڕەتی بەکار دەهێنێت.
Ends in .255, yet a valid host address.بە .255 کۆتایی دێت، بەڵام ناونیشانێکی دروستی .CêIT

Build it in Packet Tracer: one router, four subnetsلە Packet Tracerـدا دروستی بکە: یەک ڕێدۆز، چوار ژێرڕایەڵە

To see subnets work, build them. Example 1 splits 192.168.1.0/24 into two /25s: the router interface 192.168.1.1 is the default gateway of subnet 1 (PC2 192.168.1.5, PC3 192.168.1.126) and 192.168.1.129 of subnet 2 (PC4 192.168.1.150, PC5 192.168.1.244). Every device uses the mask 255.255.255.128.

بۆ ئەوەی ببینیت چۆن کار دەکەن، دروستیان بکە. نموونەی یەکەم ⁦192.168.1.0/24⁩ دەکات بە دوو /25: ⁦192.168.1.1⁩ یەکەمە (⁦PC2 192.168.1.5⁩، ⁦PC3 192.168.1.126⁩) و ⁦192.168.1.129⁩ هی دووەم (⁦PC4 192.168.1.150⁩، ⁦PC5 192.168.1.244⁩). هەموو ئامێرێک ⁦255.255.255.128⁩ بەکار دەهێنێت.

Example 2 cuts the same /24 into four /26s (192.168.1.200/26 lives in the fourth, 192.168.1.192–192.168.1.255). Put one switch in each subnet and connect each switch to its own router interface. Give each interface the first usable address of its subnet, and give each PC an address from its range, the mask 255.255.255.192 and that interface as its default gateway.

نموونەی دووەم هەمان /24 دەبڕێت بە چوار /26 (⁦192.168.1.200/26⁩ لە چوارەمیاندایە، ⁦192.168.1.192⁩ تا ⁦192.168.1.255⁩). لە هەر دابنێ و هەر بە تایبەتی ببەستەوە. یەکەم ناونیشانی بەکارهاتووی هەر بدە بە ، بە هەر PCـێکیش ناونیشانێک لە مەوداکەی، ⁦255.255.255.192⁩ و ئەو وەک .

Redrawn practice topology: router R1 in the centre with four interfaces G0/0 to G0/3, each to one switch with two PCs. Subnet 192.168.1.0/26: gateway .1 on G0/0, PCs .2 – .62, broadcast .63. Subnet 192.168.1.64/26: gateway .65 on G0/1, PCs .66 – .126, broadcast .127. Subnet 192.168.1.128/26: gateway .129 on G0/2, PCs .130 – .190, broadcast .191. Subnet 192.168.1.192/26: gateway .193 on G0/3, PCs .194 – .254, broadcast .255. Note: every PC uses the mask 255.255.255.192 and its own subnet's gateway; pings between subnets go through R1.تۆپۆلۆجیای ڕاهێنان بە کێشانەوەی نوێ: ڕێدۆز R1 لە ناوەڕاست بە چوار نێوبەستە G0/0 تا G0/3، هەریەکە بۆ سویچێک بە دوو PCـەوە. 192.168.1.0/26: دەروازە .1 لەسەر G0/0، PCـەکان .2 تا .62، ناسەپەخش .63. 192.168.1.64/26: دەروازە .65 لەسەر G0/1، PCـەکان .66 تا .126، ناسەپەخش .127. 192.168.1.128/26: دەروازە .129 لەسەر G0/2، PCـەکان .130 تا .190، ناسەپەخش .191. 192.168.1.192/26: دەروازە .193 لەسەر G0/3، PCـەکان .194 تا .254، ناسەپەخش .255. تێبینی: هەموو PCـێک ماسکی ژێرڕایەڵەی 255.255.255.192 و دەروازەی ژێرڕایەڵەکەی خۆی بەکار دەهێنێت؛ پینگەکانی نێوان ژێرڕایەڵەکان بە ناو R1ـدا دەڕۆن.
One switch per subnet, one router interface per switch.بۆ هەر ، بۆ هەر .CêIT

What you will see: a ping inside one subnet works at once. A ping to another subnet works only through the router, so it fails when a PC has no gateway, the wrong gateway or the wrong mask. The very first ping may lose a reply while ARP finds the MAC address. You can try the same idea in the CêIT network lab: two subnets joined by a router.

ئەوەی دەیبینیت: لە ناو یەک یەکسەر کار دەکات. بۆ تر تەنیا بە ناو کار دەکات، بۆیە سەرناکەوێت ئەگەر PCـێک نەبێت، دەروازەی هەڵەی هەبێت یان هەڵەی هەبێت. لەوانەیە یەکەم وەڵامێکی لێ ون بێت تا دەدۆزێتەوە. دەتوانیت هەمان بیرۆکە لە تاقیگەی ڕایەڵەی CêIT تاقی بکەیتەوە: دوو کە پێکیانەوە دەبەستێت.

How many bits must you borrow?دەبێت چەند بیت قەرز بکەیت؟

Turn the question round: you know how many subnets you need. Borrow the smallest S with 2S≥subnets2^S \ge \text{subnets} (Borrowing host bits). For hosts it works the same way: keep the smallest H with 2H−2≥hosts2^H - 2 \ge \text{hosts}.

پرسیارەکە پێچەوانە بکەرەوە: دەزانیت چەند پێویستە. بچووکترین S قەرز بکە کە 2S≥N2^S \ge N بێت، N ژمارەی (قەرزکردنی بیتەکانی میوانگر). بۆ هەروایە: بچووکترین H بهێڵەرەوە کە 2H−22^H - 2 لە ژمارەی کەمتر نەبێت.

  • 172.16.0.0 needs 7 subnets. 22=42^2 = 4 is too few; 23=82^3 = 8 is enough → borrow 3 bits → /19, mask 255.255.224.0, block 32 in the third octet: 172.16.0.0, 172.16.32.0, 172.16.64.0 … 172.16.224.0 (eight subnets, one spare), 8,190 hosts each.
  • 10.0.0.0 needs 10 subnets. 23=82^3 = 8 is too few; 24=162^4 = 16 → borrow 4 bits → /12, mask 255.240.0.0, block 16 in the second octet: 10.0.0.0, 10.16.0.0, 10.32.0.0 … 10.240.0.0, 1,048,574 hosts each.
  • ⁦172.16.0.0⁩ پێویستی بە 7 هەیە. 22=42^2 = 4 کەمە؛ 23=82^3 = 8 بەسە ← 3 قەرز بکە ← /19، ⁦255.255.224.0⁩، بلۆکی ⁦32⁩ لە سێیەمدا: ⁦172.16.0.0⁩، ⁦172.16.32.0⁩، ⁦172.16.64.0 … 172.16.224.0⁩ (هەشت ، یەکێکیان زیادە)، هەریەکە ⁦8,190⁩ .
  • ⁦10.0.0.0⁩ پێویستی بە ⁦10⁩ هەیە. 23=82^3 = 8 کەمە؛ 24=162^4 = 16 ← 4 قەرز بکە ← /12، ⁦255.240.0.0⁩، بلۆکی ⁦16⁩ لە دووەمدا: ⁦10.0.0.0⁩، ⁦10.16.0.0⁩، ⁦10.32.0.0 … 10.240.0.0⁩، هەریەکە ⁦1,048,574⁩ .
A row of eight boxes S = 1 to S = 8 with 2¹ = 2, 2² = 4, 2³ = 8, 2⁴ = 16, 2⁵ = 32, 2⁶ = 64, 2⁷ = 128, 2⁸ = 256. Arrows: 7 subnets → the box 2³ = 8 (3 bits: 172.16.0.0/19, 255.255.224.0); 10 subnets → 2⁴ = 16 (4 bits: 10.0.0.0/12, 255.240.0.0); 100 subnets → 2⁷ = 128 (7 bits: class B → /23, 255.255.254.0). Note: 2² = 4 is too few for 7; 2³ = 8 is enough, with one spare.ڕیزێک لە هەشت سندووق، S = 1 تا S = 8، بە 2¹ = 2، 2² = 4، 2³ = 8، 2⁴ = 16، 2⁵ = 32، 2⁶ = 64، 2⁷ = 128، 2⁸ = 256. تیرەکان: 7 ژێرڕایەڵە بۆ سندووقی 2³ = 8 (3 بیت: 172.16.0.0/19، 255.255.224.0)؛ 10 ژێرڕایەڵە بۆ 2⁴ = 16 (4 بیت: 10.0.0.0/12، 255.240.0.0)؛ 100 ژێرڕایەڵە بۆ 2⁷ = 128 (7 بیت: پۆلی B ← /23، 255.255.254.0). تێبینی: 2² = 4 بۆ 7 کەمە؛ 2³ = 8 بەسە و یەکێکی زیادە.
Climb the powers of two until you reach the number you need.بە توانەکانی 2دا سەر بکەوە تا دەگەیتە ئەو ژمارەیەی پێویستتە.CêIT

Exam questions: network, subnet and host bitsپرسیاری تاقیکردنەوە: بیتەکانی ڕایەڵە، ژێرڕایەڵە و میوانگر

Some questions ask for N, S and H: network bits (from the old class), subnet bits (borrowed) and host bits. They always add up to 32. N is 8 for class A, 16 for class B and 24 for class C — the old default masks (classes). Then S = prefix length − N and H = 32 − prefix length.

هەندێک پرسیار N، S و H دەپرسن: (لە پۆلە کۆنەکەوە)، (قەرزکراو) و . کۆیان هەمیشە ⁦32⁩ـە. N بۆ پۆلی A هەشتە، بۆ پۆلی B شانزە و بۆ پۆلی C بیست و چوار — بنەڕەتیی کۆن (پۆلەکان). پاشان S=prefix−NS = \text{prefix} - N و H=32−prefixH = 32 - \text{prefix}.

Worked: 10.55.66.77 with the mask 255.255.0.0, using classful logic. 10 is class A, so N = 8. The mask has 16 ones, so S = 16 − 8 = 8 and H = 32 − 16 = 16.

نموونەی کارپێکراو: ⁦10.55.66.77⁩ لەگەڵ ⁦255.255.0.0⁩، بە لۆجیکی پۆل. ⁦10⁩ پۆلی Aـیە، بۆیە N=8N = 8. ⁦16⁩ یەکی تێدایە، بۆیە S=16−8=8S = 16 - 8 = 8 و H=32−16=16H = 32 - 16 = 16.

Four 32-bit bars split into N (network), S (subnet) and H (host) bits. 10.55.66.77 with mask 255.255.0.0 (classful): N = 8, S = 8, H = 16 — tick, H = 16. Class B with 100 subnets × 100 hosts: N = 16, S = 8, H = 8 gives 256 subnets and 254 hosts — works. N = 16, S = 9, H = 7 gives 512 subnets and 126 hosts — works. N = 16, S = 7, H = 7 leaves two bits empty — only 30 bits, cross. Note: class A N = 8, class B N = 16, class C N = 24; then S = prefix − N and H = 32 − prefix.چوار هێڵی 32 بیتی کە دابەش کراون بۆ N (ڕایەڵە)، S (ژێرڕایەڵە) و H (میوانگر). 10.55.66.77 بە ماسکی ژێرڕایەڵەی 255.255.0.0 (بە لۆجیکی پۆل): N = 8، S = 8، H = 16 — دروستە. پۆلی B بە 100 ژێرڕایەڵە × 100 میوانگر: N = 16، S = 8، H = 8 دەکاتە 256 ژێرڕایەڵە و 254 میوانگر — دەگونجێت. N = 16، S = 9، H = 7 دەکاتە 512 ژێرڕایەڵە و 126 میوانگر — دەگونجێت. N = 16، S = 7، H = 7 دوو بیت بەتاڵ دەهێڵێتەوە — تەنیا 30 بیت، هەڵەیە. تێبینی: پۆلی A N = 8، پۆلی B N = 16، پۆلی C N = 24.
N + S + H = 32, every time.N+S+H=32N + S + H = 32، هەمیشە.CêIT
ExerciseڕاهێنانExam question: 100 subnets and 100 hosts (choose two)پرسیاری تاقیکردنەوە: ⁦100⁩ ژێرڕایەڵە و ⁦100⁩ میوانگر (دوو وەڵام هەڵبژێرە)

A class B network must be subnetted to give 100 subnets and 100 hosts per subnet. Which two combinations work? (a) N = 16, S = 7, H = 7; (b) N = 16, S = 8, H = 8; (c) N = 16, S = 9, H = 7; (d) N = 8, S = 7, H = 17.

پۆلی B دەبێت بکرێت بە بۆ ئەوەی ⁦100⁩ و بۆ هەر ⁦100⁩ بدات. کام دوو ئەگەر دەگونجێن؟ ⁦(a)⁩ N=16,S=7,H=7N = 16, S = 7, H = 7؛ ⁦(b)⁩ N=16,S=8,H=8N = 16, S = 8, H = 8؛ ⁦(c)⁩ N=16,S=9,H=7N = 16, S = 9, H = 7؛ ⁦(d)⁩ N=8,S=7,H=17N = 8, S = 7, H = 17.

Hintئاماژە

Check three things: N for class B, 2S≥1002^S \ge 100, 2H−2≥1002^H - 2 \ge 100 — and the total of 32.

سێ شت بپشکنە: N بۆ پۆلی B، 2S≥1002^S \ge 100، 2H−2≥1002^H - 2 \ge 100 — و کۆی ⁦32⁩.

Show answerوەڵامەکە پیشان بدە

(b) and (c). Class B fixes N = 16. You need 2S≥1002^S \ge 100, so S ≥ 7, and 2H−2≥1002^H - 2 \ge 100, so H ≥ 7; and N + S + H = 32 means S + H = 16. (b) gives 256 subnets of 254 hosts and (c) 512 subnets of 126 hosts. (a) adds up to only 30 bits, and (d) has N = 8, which is class A.

⁦(b)⁩ و ⁦(c)⁩. پۆلی B N=16N = 16 دیاری دەکات. پێویستت بە 2S≥1002^S \ge 100ـە، بۆیە S≥7S \ge 7؛ هەروەها 2H−2≥1002^H - 2 \ge 100، بۆیە H≥7H \ge 7؛ N+S+H=32N + S + H = 32 واتە S+H=16S + H = 16. ⁦(b) 256⁩ ⁦254⁩ و ⁦(c) 512⁩ ⁦126⁩ دەدەن. کۆی ⁦(a)⁩ تەنیا ⁦30⁩ ، ⁦(d)⁩یش N=8N = 8ـی هەیە کە هی پۆلی Aـیە.

Which subnet is the address in? /30, /20 and /15ناونیشانەکە لە کام ژێرڕایەڵەدایە؟ /30، /20 و /15

A frequent exam task: find the subnet that an address 'resides' in, and its broadcast. The method is the one in Which subnet is this address in? — in the interesting octet, take the largest multiple of the block size that is not bigger than the address's value. Here it is used in the fourth, third and second octets:

ئەرکێکی باوی تاقیکردنەوە: ئەو بدۆزەرەوە کە ناونیشانێک تێیدا «دەژی»، لەگەڵ . ڕێگەکە هەمان ڕێگەی ئەم ناونیشانە لە کام ژێرڕایەڵەدایە؟ـە — لە گەورەترین چەندجارەی قەبارەی بلۆک وەربگرە کە لە بەهای ناونیشانەکە گەورەتر نەبێت. لێرەدا لە چوارەم، سێیەم و دووەمدا بەکار دێت:

  • 192.168.44.97/30 — 4th octet, block 4. 96 is the largest multiple of 4 that is ≤ 97 → subnet 192.168.44.96, hosts 192.168.44.97–192.168.44.98, broadcast 192.168.44.99.
  • 172.31.77.201/20 — 3rd octet, block 16. 64 ≤ 77 < 80 → subnet 172.31.64.0, broadcast 172.31.79.255.
  • 100.100.77.20/15 — 2nd octet, block 2. 100 is a multiple of 2 → subnet 100.100.0.0, broadcast 100.101.255.255. (100.100.x.x lies in 100.64.0.0/10, the shared address space of ISPs — not a public address.)
  • ⁦192.168.44.97/30⁩ — چوارەم، بلۆکی ⁦4. 96⁩ گەورەترین چەندجارەی 4ـە کە لە ⁦97⁩ گەورەتر نییە ← ⁦192.168.44.96⁩، ⁦192.168.44.97⁩ و ⁦192.168.44.98⁩، ⁦192.168.44.99⁩.
  • ⁦172.31.77.201/20⁩ — سێیەم، بلۆکی ⁦16⁩. 64≤77<8064 \le 77 < 80 ← ⁦172.31.64.0⁩، ⁦172.31.79.255⁩.
  • ⁦100.100.77.20/15⁩ — دووەم، بلۆکی ⁦2. 100⁩ چەندجارەی 2ـە ← ⁦100.100.0.0⁩، ⁦100.101.255.255⁩. ناونیشانەکانی ⁦100.100.x.x⁩ لە ⁦100.64.0.0/10⁩ـدان، مەودای ناونیشانی هاوبەشـی — ناونیشانی گشتی نین.
Three worked cards with a short number line each. 192.168.44.97/30: 4th octet, block 4; ticks 88, 92, 96, 100, 104 with the block 96–99 shaded and 97 marked; subnet 192.168.44.96, broadcast 192.168.44.99. 172.31.77.201/20: 3rd octet, block 16; ticks 32, 48, 64, 80, 96 with 64–79 shaded and 77 marked; subnet 172.31.64.0, broadcast 172.31.79.255. 100.100.77.20/15: 2nd octet, block 2; ticks 96 to 104 with 100–101 shaded and 100 marked; subnet 100.100.0.0, broadcast 100.101.255.255. Rule at the bottom: the largest multiple of the block size not above the value is the subnet start; add the block and subtract 1 for the broadcast.سێ کارتی کارپێکراو، هەریەکە بە هێڵێکی ژمارەی کورت. 192.168.44.97/30: هەشتەی چوارەم، بلۆکی 4؛ نیشانەکانی 88، 92، 96، 100، 104، بلۆکی 96 تا 99 ڕەنگ کراوە و 97 نیشانە کراوە؛ ژێرڕایەڵە 192.168.44.96، ناسەپەخش 192.168.44.99. 172.31.77.201/20: هەشتەی سێیەم، بلۆکی 16؛ 64 تا 79 ڕەنگ کراوە و 77 نیشانە کراوە؛ ژێرڕایەڵە 172.31.64.0، ناسەپەخش 172.31.79.255. 100.100.77.20/15: هەشتەی دووەم، بلۆکی 2؛ 100 تا 101 ڕەنگ کراوە و 100 نیشانە کراوە؛ ژێرڕایەڵە 100.100.0.0، ناسەپەخش 100.101.255.255. یاسای خوارەوە: گەورەترین چەندجارەی بلۆک کە لە بەهاکە زیاتر نەبێت سەرەتای ژێرڕایەڵەکەیە؛ بلۆکێک زیاد بکە و 1 کەم بکەرەوە بۆ ناسەپەخش.
Same rule, three different octets.هەمان یاسا، سێ جیاواز.CêIT

When no option is rightکاتێک هیچ وەڵامێک ڕاست نییە

Now a real exam-style question: Which is the broadcast address of the subnet in which 172.31.77.201/20 resides? The options were 172.31.201.255, 172.31.255.255, 172.32.77.255 and 172.15.255.255. Compute first: /20 → third octet, block 16; 77 lies in 64–79; the broadcast is 172.31.79.255. It is not among the options: the question is broken.

ئێستا پرسیارێکی ڕاستەقینەی شێوە تاقیکردنەوە: ئەو ⁦172.31.77.201/20⁩ـی تێدایە کامەیە؟ وەڵامەکان ⁦172.31.201.255⁩، ⁦172.31.255.255⁩، ⁦172.32.77.255⁩ و ⁦172.15.255.255⁩ بوون. سەرەتا بژمێرە: /20 ← سێیەم، بلۆکی ⁦16⁩؛ ⁦77⁩ لە ⁦64⁩ تا ⁦79⁩ـدایە؛ ⁦172.31.79.255⁩ـە. لە ناو وەڵامەکاندا نییە: پرسیارەکە هەڵەیە.

  • A /20 keeps the first 16 bits, so the answer must start with 172.31 — that rules out 172.32.77.255 and 172.15.255.255.
  • A /20 broadcast has a third octet of 15, 31, 47, 63, 79 … 255 (one less than a multiple of 16) — that rules out 172.31.201.255.
  • 172.31.255.255 is the broadcast of another /20 (172.31.240.0/20) — or of 172.16.0.0/12, the answer you get if you wrongly use the block of 16 in the second octet.
  • /20 یەکەم ⁦16⁩ وەک خۆی دەهێڵێتەوە، بۆیە وەڵامەکە دەبێت بە ⁦172.31⁩ دەست پێ بکات — ئەمە ⁦172.32.77.255⁩ و ⁦172.15.255.255⁩ لادەبات.
  • سێیەمی /20 یەکێکە لە ⁦15⁩، ⁦31⁩، ⁦47⁩، ⁦63⁩، ⁦79 … 255⁩ (یەک کەمتر لە چەندجارەیەکی ⁦16⁩) — ئەمە ⁦172.31.201.255⁩ لادەبات.
  • ⁦172.31.255.255⁩ /20ـێکی ترە ⁦(172.31.240.0/20)⁩ — یان هی ⁦172.16.0.0/12⁩، ئەو وەڵامەی دەستت دەکەوێت ئەگەر بە هەڵە بلۆکی ⁦16⁩ لە دووەمدا بەکار بهێنیت.
The question 'Broadcast of the subnet that holds 172.31.77.201/20?' with the working: /20 → third octet, block 16 → 77 is in 64–79; correct broadcast 172.31.79.255. Four option cards, each crossed out: a. 172.31.201.255 — the third octet must be 15, 31 … 79 … 255, not 201; b. 172.31.255.255 — the broadcast of 172.31.240.0/20, or of a /12; c. 172.32.77.255 — changes the second octet (31 → 32); d. 172.15.255.255 — changes the second octet (31 → 15). Bottom: none of the four options is right; compute first, then compare. Quick checks: the first two octets must stay 172.31; a /20 broadcast has a third octet of 16k + 15.پرسیاری «ناسەپەخشی ئەو ژێرڕایەڵەیەی 172.31.77.201/20 لەخۆ دەگرێت؟» لەگەڵ کارکردنەکەی: /20 ← هەشتەی سێیەم، بلۆکی 16 ← 77 لە 64 تا 79ـدایە؛ ناسەپەخشی دروست 172.31.79.255. چوار کارتی وەڵام، هەموویان خەتیان بەسەردا هاتووە: a. 172.31.201.255 — هەشتەی سێیەم دەبێت 15، 31 … 79 … 255 بێت، نەک 201؛ b. 172.31.255.255 — ناسەپەخشی 172.31.240.0/20، یان هی /12؛ c. 172.32.77.255 — هەشتەی دووەم دەگۆڕێت (31 بۆ 32)؛ d. 172.15.255.255 — هەشتەی دووەم دەگۆڕێت (31 بۆ 15). خوارەوە: هیچ کام لە چوار وەڵامەکە ڕاست نین؛ سەرەتا بژمێرە، پاشان بەراوردیان بکە.
Compute first; then a broken question is easy to spot.سەرەتا بژمێرە؛ ئەو کاتە پرسیاری هەڵە ئاسان دەناسرێتەوە.CêIT

Drill: ten addresses, every numberڕاهێنان: دە ناونیشان، هەموو ژمارەکان

A classroom drill gives ten addresses. For each one find: the old class (from the first octet), the mask of its prefix, the network address, the broadcast address, the first and last usable addresses and the number of usable hosts. The class is only the old name of the first octet — the prefix decides the subnet.

ڕاهێنانێکی پۆل دە ناونیشان دەدات. بۆ هەریەکەیان ئەمانە بدۆزەرەوە: پۆلە کۆنەکەی (لە یەکەمەوە)، ، ، ، یەکەم و دوایین ناونیشانی بەکارهاتوو و ژمارەی بەکارهاتوو. پۆل تەنیا ناوە کۆنەکەی یەکەمە — دیاری دەکات.

ExerciseڕاهێنانTen addressesدە ناونیشان

Work out all six numbers for: (1) 192.168.1.50/27, (2) 10.200.120.100/15, (3) 172.20.70.155/20, (4) 10.120.11.90/10, (5) 10.10.10.130/12, (6) 10.20.250.254/13, (7) 203.0.113.200/30, (8) 10.80.10.11/16, (9) 172.17.10.10/24, (10) 198.51.100.220/28.

هەر شەش ژمارەکە بدۆزەرەوە بۆ: ⁦(1) 192.168.1.50/27⁩، ⁦(2) 10.200.120.100/15⁩، ⁦(3) 172.20.70.155/20⁩، ⁦(4) 10.120.11.90/10⁩، ⁦(5) 10.10.10.130/12⁩، ⁦(6) 10.20.250.254/13⁩، ⁦(7) 203.0.113.200/30⁩، ⁦(8) 10.80.10.11/16⁩، ⁦(9) 172.17.10.10/24⁩، ⁦(10) 198.51.100.220/28⁩.

Hintئاماژە

Find the interesting octet first: /27, /30 and /28 → 4th; /20 and /24 → 3rd; /15, /10, /12, /13 and /16 → 2nd.

سەرەتا بدۆزەرەوە: /27، /30 و /28 ← چوارەم؛ /20 و /24 ← سێیەم؛ /15، /10، /12، /13 و /16 ← دووەم.

Show answerوەڵامەکە پیشان بدە
AddressناونیشانClassپۆلMaskNetworkBroadcastUsable rangeمەودای بەکارهاتووHosts
192.168.1.50/27C255.255.255.224192.168.1.32192.168.1.63.33 – .6230
10.200.120.100/15A255.254.0.010.200.0.010.201.255.25510.200.0.1 – 10.201.255.254131,070
172.20.70.155/20B255.255.240.0172.20.64.0172.20.79.255172.20.64.1 – 172.20.79.2544,094
10.120.11.90/10A255.192.0.010.64.0.010.127.255.25510.64.0.1 – 10.127.255.2544,194,302
10.10.10.130/12A255.240.0.010.0.0.010.15.255.25510.0.0.1 – 10.15.255.2541,048,574
10.20.250.254/13A255.248.0.010.16.0.010.23.255.25510.16.0.1 – 10.23.255.254524,286
203.0.113.200/30C255.255.255.252203.0.113.200203.0.113.203.201 – .2022
10.80.10.11/16A255.255.0.010.80.0.010.80.255.25510.80.0.1 – 10.80.255.25465,534
172.17.10.10/24B255.255.255.0172.17.10.0172.17.10.255.1 – .254254
198.51.100.220/28C255.255.255.240198.51.100.208198.51.100.223.209 – .22214

Drill: ten addresses, every numberڕاهێنان: دە ناونیشان، هەموو ژمارەکان

Check every answer with Pythonهەموو وەڵامێک بە Python بپشکنە

Python's ipaddress module, part of every Python 3, does the same arithmetic. This short program prints the mask, the network and broadcast addresses, the usable range and the number of hosts for each address:

مۆدیولی ipaddressـی ، کە بەشێکە لە هەموو ⁦Python 3⁩ـێک، هەمان ژمێرکاری دەکات. ئەم کورتە بۆ هەر ناونیشانێک ، و ، مەودای بەکارهاتوو و ژمارەی چاپ دەکات:

subnet_check.pyفایلی ⁦subnet_check.py⁩PYTHONType in a terminalلە تێرمیناڵدا بینووسە
import ipaddress

def describe(text):
    iface = ipaddress.ip_interface(text)    # address + prefix
    net = iface.network                      # the subnet it lives in
    first = net.network_address + 1
    last = net.broadcast_address - 1
    hosts = net.num_addresses - 2
    print(f"{text:18} {str(net.netmask):15} {str(net.network_address):14}"
          f" {str(net.broadcast_address):16} {str(first)}-{str(last)}  {hosts:,}")

for a in ["192.168.1.50/27", "172.20.70.155/20", "10.10.10.130/12",
          "172.31.77.201/20", "100.100.77.20/15"]:
    describe(a)
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 4

ip_interface keeps the address and its prefix together; .network is the subnet it lives in.

ip_interface ناونیشانەکە و پێکەوە هەڵدەگرێت؛ .network ئەو کە تێیدایە.

Lineدێڕی 8

num_addresses − 2 = usable hosts (the network and broadcast addresses are not hosts).

num_addresses − 2 = بەکارهاتوو ( و نین).

Use it to check your own answers, not instead of the method: in an exam, and when you type addresses into a router, you must do it in your head.

بۆ پشکنینی وەڵامەکانی خۆت بەکاری بهێنە، نەک لە جیاتی ڕێگەکە: لە تاقیکردنەوەدا و کاتێک ناونیشان لە دەنووسیت، دەبێت لە مێشکی خۆتدا بیکەیت.

VLSM: subnets of different sizesVLSM: ژێرڕایەڵەکانی قەبارە جیاواز

With one mask for every subnet, every subnet has the size of the largest one you need. A company in Sulaymaniyah has Sales (100 hosts), Engineering (50), Accounts (25), Management (10) and two links between its routers, and only 192.168.10.0/24. A /26 for everything gives four subnets of 62 hosts: Sales does not fit, Management wastes 52 addresses, and nothing is left for the links.

بە یەک بۆ هەموو ، هەموو قەبارەی گەورەترین پێویستی هەیە. کۆمپانیایەک لە سلێمانی بەشی فرۆشتن (⁦100⁩ )، ئەندازیاری ⁦(50)⁩، ژمێریاری ⁦(25)⁩، بەڕێوەبردن ⁦(10)⁩ و دوو بەستەری نێوان هەیە، تەنیا ⁦192.168.10.0/24⁩ـیشی هەیە. /26 بۆ هەمووان چوار ⁦62⁩ دەدات: فرۆشتن جێی نابێتەوە، بەڕێوەبردن ⁦52⁩ ناونیشان بەفیڕۆ دەدات و هیچ بۆ بەستەرەکان نامێنێتەوە.

VLSM (variable-length subnet masking) cuts a network into subnets of different sizes — you subnet a subnet. It belongs to classless addressing (CIDR): every route carries its own prefix length, so routing protocols must send the mask with each route (RIPv2, OSPF and EIGRP do; RIPv1 did not — see classful and classless routing protocols). The opposite job — joining many subnets into one shorter prefix — is route summarization.

⁦(Variable-Length Subnet Masking)⁩ دەبڕێت بە قەبارە جیاواز — دەکەیتە . بەشێکە لە ناونیشانکردنی بێ‌پۆل (CIDR): هەموو ڕێگەیەک خۆی هەڵدەگرێت، بۆیە دەبێت لەگەڵ هەر ڕێگەیەک بنێرن (⁦RIPv2⁩، و دەینێرن؛ ⁦RIPv1⁩ نەیدەنارد — بڕوانە پرۆتۆکۆڵەکانی ڕێدۆزیی پۆلدار و بێ‌پۆل). کاری پێچەوانەکەی — کۆکردنەوەی چەندین لە یەک کورتتردا — ڕاپوختکردنـە.

Two bars of the block 192.168.10.0/24. Top, every subnet /26 with 62 usable hosts: Sales needs 100 and does not fit; Engineering 50 fits; Accounts 25 leaves 37 unused; Management 10 leaves 52 unused; no subnets are left for the two router links. Bottom, VLSM: /25 for Sales (100), /26 for Engineering (50), /27 for Accounts, /28 for Management, two small /30 links and a spare /29. Everything fits: 248 of 256 addresses planned, 8 kept for later.دوو هێڵ بۆ بلۆکی 192.168.10.0/24. سەرەوە، هەموو ژێرڕایەڵەیەک /26 بە 62 میوانگری بەکارهاتوو: فرۆشتن 100ـی پێویستە و جێی نابێتەوە؛ ئەندازیاری 50 جێی دەبێتەوە؛ ژمێریاری 25 دەیەوێت و 37 بەتاڵ دەمێنێتەوە؛ بەڕێوەبردن 10 و 52 بەتاڵ؛ هیچ ژێرڕایەڵەیەک بۆ دوو بەستەرەکەی ڕێدۆزەکان نامێنێت. خوارەوە، VLSM: /25 بۆ فرۆشتن (100)، /26 بۆ ئەندازیاری (50)، /27 بۆ ژمێریاری، /28 بۆ بەڕێوەبردن، دوو بەستەری بچووکی /30 و /29ـێکی یەدەگ. هەمووی جێی دەبێتەوە: 248 لە 256 ناونیشان پلان کراون و 8 بۆ دواتر دەمێننەوە.
One size for all wastes addresses; VLSM fits each need.یەک قەبارە بۆ هەمووان ناونیشان بەفیڕۆ دەدات؛ بەقەد هەر پێویستییەک دەبڕێت.CêIT

The VLSM method: biggest firstڕێگەی VLSM: گەورەترین یەکەم

VLSM in five stepsVLSM بە پێنج هەنگاو
  1. List every subnet you need — the router-to-router links too — with its number of hosts.

    هەموو ئەو پێویستتن بنووسە — بەستەرەکانی نێوان — لەگەڵ ژمارەی .

  2. Give each one the smallest block that fits: hosts + 2, rounded up to a power of 2 (100 → 128 = /25, 50 → 64 = /26, 25 → 32 = /27, 10 → 16 = /28; a router link → /30, or /31).

    بە هەریەکەیان بچووکترین بلۆک بدە کە جێی دەبێتەوە: + 2، بەرەو سەرەوە بۆ توانێکی 2 (بۆ نموونە ⁦100⁩ ← ⁦128⁩ = /25، ⁦50⁩ ← ⁦64⁩ = /26، ⁦25⁩ ← ⁦32⁩ = /27، ⁦10⁩ ← ⁦16⁩ = /28؛ بەستەرێکی ← /30 یان /31).

  3. Sort them from the largest block to the smallest.

    ڕیزیان بکە لە گەورەترین بلۆکەوە بۆ بچووکترین.

  4. Hand out the blocks in that order, each starting where the last one ended.

    بلۆکەکان بەو ڕیزە دابەش بکە، هەریەکە لەو شوێنەوە دەست پێ دەکات کە پێشووەکە کۆتایی هات.

  5. Write down each network address, mask, usable range and broadcast address, and keep the rest as spare.

    بۆ هەریەکەیان ، ، مەودای بەکارهاتوو و بنووسە و ئەوەی دەمێنێتەوە بۆ یەدەگ ڕابگرە.

Why biggest first? A block of 2n2^n addresses must start at a multiple of 2n2^n: a /26 can start only at .0, .64, .128 or .192. Going from large to small, every block ends exactly where the next, smaller block may start, so nothing is wasted and nothing overlaps. In another order you leave holes — or you write an impossible subnet such as 192.168.10.32/26, which is really part of 192.168.10.0/26.

بۆچی گەورەترین یەکەم؟ بلۆکێکی 2n2^n ناونیشان دەبێت لە چەندجارەیەکی 2n2^n دەست پێ بکات: /26 تەنیا لە .0، .64، .128 یان .192 دەست پێ دەکات. ئەگەر لە گەورەوە بۆ بچووک بڕۆیت، هەموو بلۆکێک ڕێک لەو شوێنە کۆتایی دێت کە بلۆکی دواتر و بچووکتر دەتوانێت دەستی پێ بکات، بۆیە هیچ شتێک بەفیڕۆ ناچێت و هیچ شتێک یەکتر نابڕن. بە ڕیزێکی تر کەلێن بەجێ دەهێڵیت — یان مەحاڵ دەنووسیت وەک ⁦192.168.10.32/26⁩، کە لە ڕاستیدا بەشێکە لە ⁦192.168.10.0/26⁩.

Two bars of 192.168.10.0/24. Small first: Accounts .0/27, then a dashed hole from .32 to .63, Engineering .64/26 and Sales .128/25; a note says 192.168.10.32/26 is not a subnet because a /26 starts only at .0, .64, .128 or .192. Biggest first: .0/25, .128/26, .192/27, .224/28, two small links at .240 and .244, and .248/29 still free — no holes and no overlaps. Rule: a block of 2ⁿ addresses always starts at a multiple of 2ⁿ.دوو هێڵی 192.168.10.0/24. بچووک یەکەم: ژمێریاری .0/27، پاشان کەلێنێکی پچڕپچڕ لە .32 تا .63، ئەندازیاری .64/26 و فرۆشتن .128/25؛ تێبینییەک دەڵێت 192.168.10.32/26 ژێرڕایەڵە نییە، چونکە /26 تەنیا لە .0، .64، .128 یان .192 دەست پێ دەکات. گەورەترین یەکەم: .0/25، .128/26، .192/27، .224/28، دوو بەستەری بچووک لە .240 و .244 و .248/29 هێشتا بەتاڵە — نە کەلێن، نە یەکتربڕین. یاسا: بلۆکێکی 2ⁿ ناونیشان هەمیشە لە چەندجارەیەکی 2ⁿ دەست پێ دەکات.
Large blocks first keep every block on its border.بلۆکە گەورەکان یەکەم، هەموو بلۆکێک لەسەر سنووری خۆی دەهێڵنەوە.CêIT
Video Tutorial VLSMAndrea Schauer · Englishئینگلیزی · 278K viewsبینین · 5.8K likesلایک

A full VLSM design worked by hand: sort the subnets from biggest to smallest, give each the smallest block that fits, and write down every range, in decimal only.

دیزاینێکی تەواوی بە دەست: لە گەورەترینەوە بۆ بچووکترین ڕیز بکە، بچووکترین بلۆکی گونجاو بدە بە هەر یەکێکیان و هەموو مەوداکان بنووسە، تەنیا بە ژمارەی دەیی.

Whole video (30 min): the biggest-first method on a worked example.

هەموو ڤیدیۆکە (⁦30⁩ خولەک): ڕێگای «گەورەترین یەکەم» لەسەر نموونەیەکی چارەسەرکراو.

Worked design: a company in Sulaymaniyahدیزاینی کارپێکراو: کۆمپانیایەک لە سلێمانی

The company has three buildings. Building A (router R1) holds Sales, 100 hosts, and Engineering, 50 hosts; building B (R2) holds Accounts, 25 hosts; building C (R3) holds Management, 10 hosts. R1 is linked to R2 and to R3. The block is 192.168.10.0/24. Biggest first:

کۆمپانیاکە سێ بینای هەیە. بینای A ( ⁦R1⁩) فرۆشتن (⁦100⁩ ) و ئەندازیاری (⁦50⁩ ) لەخۆ دەگرێت؛ بینای ⁦B (R2)⁩ ژمێریاری (⁦25⁩ )؛ بینای ⁦C (R3)⁩ بەڕێوەبردن (⁦10⁩ ). ⁦R1⁩ بە ⁦R2⁩ و بە ⁦R3⁩ بەستراوە. بلۆکەکە ⁦192.168.10.0/24⁩ـە. گەورەترین یەکەم:

SubnetHosts needed پێویستPrefix (block) (بلۆک)Network addressUsable rangeمەودای بەکارهاتووBroadcast
Salesفرۆشتن100/25 (128)192.168.10.0192.168.10.1 – 192.168.10.126192.168.10.127
Engineeringئەندازیاری50/26 (64)192.168.10.128192.168.10.129 – 192.168.10.190192.168.10.191
Accountsژمێریاری25/27 (32)192.168.10.192192.168.10.193 – 192.168.10.222192.168.10.223
Managementبەڕێوەبردن10/28 (16)192.168.10.224192.168.10.225 – 192.168.10.238192.168.10.239
Link R1–R2بەستەری ⁦R1–R2⁩2/30 (4)192.168.10.240192.168.10.241 – 192.168.10.242192.168.10.243
Link R1–R3بەستەری ⁦R1–R3⁩2/30 (4)192.168.10.244192.168.10.245 – 192.168.10.246192.168.10.247
VLSM tree for 192.168.10.0/24, splitting one half at each level. The /24 splits into .0/25, a leaf for Sales (100 hosts, 126 usable), and .128/25. .128/25 splits into .128/26, Engineering (50, 62 usable), and .192/26. .192/26 splits into .192/27, Accounts (25, 30 usable), and .224/27. .224/27 splits into .224/28, Management (10, 14 usable), and .240/28. .240/28 splits into .240/29 and a spare .248/29 (6 usable). .240/29 splits into two /30 links: R1–R2 .240/30 and R1–R3 .244/30, 2 usable each.داری VLSM بۆ 192.168.10.0/24، لە هەر ئاستێکدا نیوەیەک دەبڕدرێتەوە. /24 دەبێتە .0/25 (گەڵای فرۆشتن: 100 میوانگر، 126 بەکارهاتوو) و .128/25. .128/25 دەبێتە .128/26 (ئەندازیاری: 50، 62 بەکارهاتوو) و .192/26. .192/26 دەبێتە .192/27 (ژمێریاری: 25، 30 بەکارهاتوو) و .224/27. .224/27 دەبێتە .224/28 (بەڕێوەبردن: 10، 14 بەکارهاتوو) و .240/28. .240/28 دەبێتە .240/29 و .248/29ـی یەدەگ (6 بەکارهاتوو). .240/29 دەبێتە دوو بەستەری /30: R1–R2 .240/30 و R1–R3 .244/30، هەریەکە 2 بەکارهاتوو.
Subnetting a subnet, again and again. دەکەیتە ، دووپاتە و دووپاتە.CêIT

Common mistakesهەڵە باوەکان

MistakeهەڵەWhat is trueڕاستییەکە
Working out the block size in the wrong octet.دۆزینەوەی قەبارەی بلۆک لە هەڵەدا.Find the interesting octet first: /25–/32 the 4th, /17–/24 the 3rd, /9–/16 the 2nd.سەرەتا بدۆزەرەوە: /25 تا /32 چوارەم، /17 تا /24 سێیەم، /9 تا /16 دووەم.
'Every address that ends in .255 is a broadcast.'«هەموو ناونیشانێک کە بە .255 کۆتایی بێت .»Only when all host bits are 1. 172.16.15.255/17 is an ordinary host.تەنیا کاتێک هەموو 1 بن. ⁦172.16.15.255/17⁩ ئاساییە.
Copy slips such as 192.160.1.4 for 192.168.1.4 when listing subnets.هەڵەی نووسینەوە وەک ⁦192.160.1.4⁩ لە جیاتی ⁦192.168.1.4⁩ لە کاتی ڕیزکردنی .Octets to the left of the interesting octet never change: check them in every row. لای چەپی هەرگیز ناگۆڕێن: لە هەموو دێڕێکدا بیانپشکنە.
Forgetting the −2: 27=1282^7 = 128 hosts in a /25.لەبیرکردنی ⁦−2⁩: 27=1282^7 = 128 لە /25ـێکدا.Usable hosts = 2H−22^H - 2 = 126; the network and broadcast addresses are not hosts (a /31 link is the exception). بەکارهاتوو = 2H−22^H - 2 = ⁦126⁩؛ و نین (بەستەری /31 جیاوازە).
Borrowing too few bits: 2 bits for 7 subnets.قەرزکردنی کەم: 2 بۆ 7 .Take the smallest S with 2S≥72^S \ge 7: S = 3.بچووکترین S وەربگرە کە 2S≥72^S \ge 7: S=3S = 3.
VLSM in any order, or subnets that start anywhere. بە هەر ڕیزێک، یان کە لە هەر شوێنێک دەست پێ بکەن.Biggest first; a block of 2n2^n starts at a multiple of 2n2^n.گەورەترین یەکەم؛ بلۆکی 2n2^n لە چەندجارەیەکی 2n2^n دەست پێ دەکات.
Picking the nearest option when none is right.هەڵبژاردنی نزیکترین وەڵام کاتێک هیچیان ڕاست نین.Compute first. If no option matches, write the correct answer and say so.سەرەتا بژمێرە. ئەگەر هیچ وەڵامێک یەک نەگرتەوە، وەڵامی دروست بنووسە و بیڵێ.
'A /31 is not valid.'«/31 دروست نییە.»It is valid on point-to-point links (RFC 3021, 2000): both addresses are hosts.لە بەستەری دروستە (⁦RFC 3021⁩، ساڵی ⁦2000⁩): هەردوو ناونیشانەکە .
Using a router's built-in switch ports for different subnets.بەکارهێنانی سویچی ناو بۆ جیاواز.Give every subnet its own router interface (or use VLANs).بە هەر تایبەتی بدە (یان بەکار بهێنە).

Exercisesڕاهێنانەکان

ExerciseڕاهێنانQuestion 2: the mask is givenپرسیاری دووەم: ماسکی ژێرڕایەڵە دراوە

Make subnets from 192.168.1.0 with the mask 255.255.255.224. Give the prefix length, the number of subnets, the block size, the hosts per subnet and every subnet.

⁦192.168.1.0⁩ لەگەڵ ⁦255.255.255.224⁩ بکە بە . ، ژمارەی ، قەبارەی بلۆک، هەر و هەموو بنووسە.

Show answerوەڵامەکە پیشان بدە

224 = 11100000, so the prefix is /27: S = 3 → 8 subnets, block 256 − 224 = 32, H = 5 → 25−2=302^5 - 2 = 30 hosts each.

⁦224 = 11100000⁩، بۆیە /27ـە: S=3S = 3 ← 8 ، بلۆک 256−224=32256 - 224 = 32، H=5H = 5 ← هەریەکە 25−2=302^5 - 2 = 30 .

Network addressUsable rangeمەودای بەکارهاتووBroadcast
192.168.1.0192.168.1.1 – 192.168.1.30192.168.1.31
192.168.1.32192.168.1.33 – 192.168.1.62192.168.1.63
192.168.1.64192.168.1.65 – 192.168.1.94192.168.1.95
192.168.1.96192.168.1.97 – 192.168.1.126192.168.1.127
192.168.1.128192.168.1.129 – 192.168.1.158192.168.1.159
192.168.1.160192.168.1.161 – 192.168.1.190192.168.1.191
192.168.1.192192.168.1.193 – 192.168.1.222192.168.1.223
192.168.1.224192.168.1.225 – 192.168.1.254192.168.1.255
ExerciseڕاهێنانCheck your working like a homework sheetکارەکەت وەک پەڕەی ئەرکی ماڵەوە بپشکنە

For the mask 255.255.255.240: count its ones and write its prefix, and write the octet 240 as a sum of place values. Then list the first three and the last subnet of 192.168.1.0/24 with it. Do the same for 255.255.255.252.

بۆ ⁦255.255.255.240⁩: یەکەکانی بژمێرە و بنووسە، ⁦240⁩یش وەک کۆی بەهای شوێنەکان بنووسە. پاشان یەکەم سێ و دوایین ⁦192.168.1.0/24⁩ بەو بنووسە. هەمان کار بۆ ⁦255.255.255.252⁩ بکە.

Show answerوەڵامەکە پیشان بدە
  • 255.255.255.240 = 11111111.11111111.11111111.11110000: 8 + 8 + 8 + 4 = /28; 240 = 128 + 64 + 32 + 16 (4 bits borrowed). 16 subnets of 16: 192.168.1.0–.15, .16–.31, .32–.47 … the last is 192.168.1.240–192.168.1.255.
  • 255.255.255.252 = …11111100: /30, 6 bits borrowed, 64 subnets of 4: 192.168.1.0–.3, 192.168.1.4–.7 … the last is 192.168.1.252–192.168.1.255. Every row keeps 192.168.1 — a row that reads 192.160.1.4 is a copying slip.
  • ⁦255.255.255.240 = 11111111.11111111.11111111.11110000⁩: 8+8+8+4=288 + 8 + 8 + 4 = 28، واتە /28؛ 240=128+64+32+16240 = 128 + 64 + 32 + 16 (⁦4⁩ قەرز کراوە). ⁦16⁩ ⁦16⁩ ناونیشانی: ⁦192.168.1.0⁩ تا ⁦192.168.1.15⁩، ⁦192.168.1.16⁩ تا ⁦192.168.1.31⁩، ⁦192.168.1.32⁩ تا ⁦192.168.1.47⁩ … دوایینیان ⁦192.168.1.240⁩ تا ⁦192.168.1.255⁩.
  • ⁦255.255.255.252 = …11111100⁩: /30، 6 قەرز کراوە، ⁦64⁩ 4 ناونیشانی: ⁦192.168.1.0⁩ تا ⁦192.168.1.3⁩، ⁦192.168.1.4⁩ تا ⁦192.168.1.7⁩ … دوایینیان ⁦192.168.1.252⁩ تا ⁦192.168.1.255⁩. هەموو دێڕێک ⁦192.168.1⁩ دەهێڵێتەوە — دێڕێک کە ⁦192.160.1.4⁩ بێت هەڵەی نووسینەوەیە.
ExerciseڕاهێنانFind the subnet: 172.16.77.130/21ژێرڕایەڵەکە بدۆزەرەوە: ⁦172.16.77.130/21⁩

Give the mask, the network address, the broadcast address and the number of usable hosts of 172.16.77.130/21.

، ، و ژمارەی بەکارهاتووی ⁦172.16.77.130/21⁩ بنووسە.

Show answerوەڵامەکە پیشان بدە

/21 = 255.255.248.0: third octet, block 8. 72 ≤ 77 < 80 → network 172.16.72.0, broadcast 172.16.79.255, 211−2=2,0462^{11} - 2 = 2{,}046 hosts.

/21 = ⁦255.255.248.0⁩: سێیەم، بلۆکی 8. 72≤77<8072 \le 77 < 80 ← ⁦172.16.72.0⁩، ⁦172.16.79.255⁩، 211−2=2,0462^{11} - 2 = 2{,}046 .

ExerciseڕاهێنانDesign with VLSMدیزاین بە VLSM

Plan 172.16.32.0/23 for four LANs of 200, 100, 50 and 25 hosts and three router-to-router links. Use biggest first and /30 links.

⁦172.16.32.0/23⁩ پلان بکە بۆ چوار ⁦200⁩، ⁦100⁩، ⁦50⁩ و ⁦25⁩ و سێ بەستەری نێوان . گەورەترین یەکەم و بەستەری /30 بەکار بهێنە.

Hintئاماژە

200 → 256 (/24), 100 → 128 (/25), 50 → 64 (/26), 25 → 32 (/27), links → 4 (/30).

⁦200⁩ ← ⁦256⁩ (/24)، ⁦100⁩ ← ⁦128⁩ (/25)، ⁦50⁩ ← ⁦64⁩ (/26)، ⁦25⁩ ← ⁦32⁩ (/27)، بەستەرەکان ← 4 (/30).

Show answerوەڵامەکە پیشان بدە
SubnetPrefixNetwork addressUsable rangeمەودای بەکارهاتووBroadcast
LAN A (200)/24172.16.32.0172.16.32.1 – 172.16.32.254172.16.32.255
LAN B (100)/25172.16.33.0172.16.33.1 – 172.16.33.126172.16.33.127
LAN C (50)/26172.16.33.128172.16.33.129 – 172.16.33.190172.16.33.191
LAN D (25)/27172.16.33.192172.16.33.193 – 172.16.33.222172.16.33.223
Link 1/30172.16.33.224172.16.33.225 – 172.16.33.226172.16.33.227
Link 2/30172.16.33.228172.16.33.229 – 172.16.33.230172.16.33.231
Link 3/30172.16.33.232172.16.33.233 – 172.16.33.234172.16.33.235

Spare: 172.16.33.236/30 and 172.16.33.240/28. The /24 for LAN A uses the whole third octet 32; everything else fits in 172.16.33.0/24.

یەدەگ: ⁦172.16.33.236/30⁩ و ⁦172.16.33.240/28⁩. /24ـی A هەموو سێیەمی ⁦32⁩ دەگرێت؛ هەموو ئەوانی تر لە ⁦172.16.33.0/24⁩ـدا جێیان دەبێتەوە.

Review questionsپرسیارەکانی پێداچوونەوە
Why does 192.168.1.0/24 not need the 'class' step any more?بۆچی ⁦192.168.1.0/24⁩ ئیتر پێویستی بە هەنگاوی «پۆل» نییە؟

Since CIDR (1993) the prefix length alone gives the mask. Exam questions still say 'class C' as a short name for the old default /24.

لە ⁦(1993)⁩ بەتەنیا دەدات. پرسیاری تاقیکردنەوە هێشتا «پۆلی C» وەک ناوێکی کورت بۆ /24ـی بنەڕەتیی کۆن بەکار دەهێنن.

In 10.0.0.0/16 subnets, what are the last two octets of every network address?لە ژێرڕایەڵەکانی ⁦10.0.0.0/16⁩ـدا دوو هەشتەی کۆتایی هەموو ناسەڕایەڵەیەک چین؟

0.0 — the interesting octet is the second, and everything to its right is 0 in a network address (255.255 in a broadcast).

0.0 — دووەمە و هەرچی لای ڕاستی بێت لە 0ـە (لە 255.255).

Summaryپوختە

  • Read the question first: what is given (address/prefix or mask) and what is asked.
  • The block size (256 − the mask octet) lives in the interesting octet: 4th for /25–/32, 3rd for /17–/24, 2nd for /9–/16.
  • Octets to its left are copied; octets to its right are 0 in a network address and 255 in a broadcast — so x.x.15.255/17 can be a host.
  • Bits to borrow: the smallest S with 2S2^S ≥ the subnets you need; hosts: 2H−22^H - 2; N+S+H=32N + S + H = 32.
  • Compute first, then compare with the options; a question can be broken (172.31.77.201/20 → 172.31.79.255).
  • VLSM gives each subnet the size it needs: biggest first, links as /30 or /31.
  • Check answers with Python's ipaddress — but learn to do it in your head.
  • سەرەتا پرسیارەکە بخوێنەوە: چی زانراوە (ناونیشان و یان ) و چی داواکراوە.
  • قەبارەی بلۆک (256256 لابردنی ) لە : چوارەم بۆ /25 تا /32، سێیەم بۆ /17 تا /24، دووەم بۆ /9 تا /16.
  • لای چەپی وەک خۆیانن؛ ئەوانەی لای ڕاستی لە 0ـن و لە ⁦255⁩ — بۆیە x.x.15.255/17 دەکرێت بێت.
  • قەرزکردن: بچووکترین S کە 2S2^S لە ژمارەی کەمتر نەبێت؛ : 2H−22^H - 2؛ N+S+H=32N + S + H = 32.
  • سەرەتا بژمێرە، پاشان بەراوردی وەڵامەکان بکە؛ دەکرێت پرسیارێک هەڵە بێت (⁦172.31.77.201/20⁩ ← ⁦172.31.79.255⁩).
  • بە هەر ئەو قەبارەیە دەدات کە پێویستیەتی: گەورەترین یەکەم، بەستەرەکان وەک /30 یان /31.
  • وەڵامەکان بە ipaddressـی بپشکنە — بەڵام فێر ببە لە مێشکتدا بیکەیت.
The six-step subnetting card again: prefix → mask, borrowed and host bits, subnets and hosts, interesting octet → block size, network addresses, broadcasts.کارتی شەش هەنگاوی ژێرڕایەڵەسازی دووپاتە: درێژیی پێشگر ← ماسکی ژێرڕایەڵە، بیتی قەرزکراو و بیتی بەشی میوانگر، ژێرڕایەڵەکان و میوانگرەکان، هەشتەی گۆڕاو ← قەبارەی بلۆک، ناسەڕایەڵەکان، ناسەپەخشەکان.
Six steps for every class.شەش هەنگاو بۆ هەموو پۆلێک.CêIT

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

IPv6 Addresses: Format and Typesناونیشانەکانی IPv6: شێوە و جۆرەکان

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.

Appearanceڕووکار

Modeدۆخ
Styleشێواز
Coloursڕەنگەکان

Saved on this device only.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.