diff --git a/15. Subnetting (Part 3 - VLSM).md b/15. Subnetting (Part 3 - VLSM).md index 5a5ba51..23234a1 100644 --- a/15. Subnetting (Part 3 - VLSM).md +++ b/15. Subnetting (Part 3 - VLSM).md @@ -7,11 +7,10 @@ tags: [] # Subnetting (Part 3 - VLSM) - -class B Refference table +## Class B Reference Table | Prefix | Subnets | Hosts | -| ------ | ------- | ----- | +|--------|---------|-------| | /17 | 2 | 32766 | | /18 | 4 | 16382 | | /19 | 8 | 8190 | @@ -23,10 +22,10 @@ class B Refference table --- -class C Refference table +## Class C Reference Table | Prefix | Subnets | Hosts | -| ------ | ------- | ----- | +|--------|---------|-------| | /25 | 2 | 126 | | /26 | 4 | 62 | | /27 | 8 | 30 | @@ -34,196 +33,202 @@ class C Refference table | /29 | 32 | 6 | | /30 | 64 | 2 | | /31 | | (0) | -| /32 | | (0)-2 | +| /32 | | (0–2) | -## QUIZ Question 1 +--- -You have been given the 172.30.0.0/16. your company requires -100 subnets with at least 500 hosts per subnet. What prefix -length should you use? +## Quiz Question 1 -I should use 172.168.0.0/23 -because it compatible with 100 subnet and 500 hosts +You have been given the network **172.30.0.0/16**. Your company requires +**100 subnets with at least 500 hosts per subnet**. -subnet mask -> 255.255.254.0 +**Answer:** +- Prefix: `/23` +- Network: `172.30.0.0/23` +- Subnet mask: `255.255.254.0` + +--- ## Quiz Question 2 -What subnet does host 172.21.111.201/20 belong to ? +What subnet does host **172.21.111.201/20** belong to? -10101100.00010101.*0110*1111.11001001 -172.21.111.201 -10101100.00010101.*0110*0000.00000000 -172.21.96.0 +``` -## Quiz question 3 +10101100.00010101.01101111.11001001 (IP) +10101100.00010101.01100000.00000000 (Network) -What is the broadcast address of the network 192.168.91.78/26 +``` -11000000.10101000.10110011.*01*001110 -192.168.91.78 -11000000.10101000.10110011.*01*111111 -192.168.91.127 +**Answer:** `172.21.96.0/20` -## Quiz question 4 +--- -You divide the 172.16.0.0/16 network into 4 subnets of equal size. -Identify the network and broadcast addresses of the second subnet +## Quiz Question 3 -Subnet 1 : -Network address -172.16.0.0/18 -10101100.00011010.*00*000000.00000000 -broadcast: -172.16.0.0/18 -10101100.00011010.*00*111111.00000000 -172.16.63.255/18 +What is the broadcast address of the network **192.168.91.78/26**? -Subnet 2 : -Network address -172.16.64.0/18 -10101100.00011010.*01*000000.00000000 -broadcast: -172.16.65.0/18 -10101100.00011010.*01*111111.00000000 -172.16.127.255/18 +``` -Subnet 3 : -Network address -172.16.128.0/18 -10101100.00011010.*10*000000.00000000 -broadcast: -172.16.128.0/18 -10101100.00011010.*10*111111.00000000 -172.16.191.255/18 +11000000.10101000.10110011.01001110 (IP) +11000000.10101000.10110011.01111111 (Broadcast) -Subnet 4 : -Network address -172.16.192.0/18 -10101100.00011010.*11*000000.00000000 -broadcast: -172.16.192.0 -10101100.00011010.*11*111111.00000000 -172.16.255.255/18 +``` -## Quiz question 5 +**Answer:** `192.168.91.127` -You divide the 172.30.0.0/16 network into subnets of 1000 hosts each. How many subnets -are you able to make +--- -I'm able to make 64 subnets +## Quiz Question 4 -## Subentting class A Networks +You divide the **172.16.0.0/16** network into 4 equal subnets. +Identify the network and broadcast addresses. -The process of subnetting Class A, Class B and Class C networks is Exactly the same ! +### Subnet 1 +- Network: `172.16.0.0/18` +- Broadcast: `172.16.63.255` -### Example 2 +### Subnet 2 +- Network: `172.16.64.0/18` +- Broadcast: `172.16.127.255` -You hace been given the 10.0.0.0/8 network. You must create 2000 subnets which -will be distributed to various enterprises. -What prefix length must you use ? -How many host addresses usable addresses will be in each subnet? +### Subnet 3 +- Network: `172.16.128.0/18` +- Broadcast: `172.16.191.255` -10.0.0.0 -00001010.00000000.0000000.0000000 -2, 4, 8, 16,32, 64,128,256, 512, 1024, 2048 -00001010.*00000000.000*00000.0000000 +### Subnet 4 +- Network: `172.16.192.0/18` +- Broadcast: `172.16.255.255` - Answer: - 10.0.0.0/19 - 8192 - 2 = 8190 hosts +--- -### Example 2 +## Quiz Question 5 -PC1 has an IP address of 10.217.182.223/11. +You divide the **172.30.0.0/16** network into subnets of **1000 hosts each**. -Identify the following for PC1's subnet: -1) Network address:10.192.0.0/11 -2) Broadcast address: 10.223.255.255 -3) First usable address: 10.192.0.1 -3) Last usable address:10.223.255.254 -3) Nuber of host (usable) address: 2,097,150 +**Answer:** 64 subnets -10.217.182.223 -00001010.*110*11001.10110110.11011111 +--- -## [[VLSM]] +## Subnetting Class A Networks -Variable-Length Subnet Masks +The process of subnetting Class A, B, and C networks is exactly the same. -- Until now, we have practiced subentting used FLSM (Fixed-Length Subnet Masks). -- This means that all of the subents use the same prefix length (ie. subnetting a class C -into 4 subenets using /26). -- VLSM (Variable-Length Subnet Masks) is the process of creating subnets of different sizes -to make your use of network addresses more eficient -- VLSM is more complicated than FLSM, but it's easy if you folow the steps correctly. +--- -### Exaple 1 +## Example 1 -We must divide 192.168.1.0/24 must divided between 5 subnets +You are given the network **10.0.0.0/8**. +You must create **2000 subnets**. - Tokyo Lan A = 110 Hosts --- Tokyo Lan B = 8 Hosts - | - Router - | - Router - | - Toronto Lan A = 29 Hosts --- Toronto Lan B = 45 Hosts +### Solution -#### VLSM Steps -1) Assign the largest subnet at the start of the address space. -2) Assign the second- largest subnet after it. -3) Repeat the process until all subnets have been assigned +**Answer:** +- Prefix: `/19` +- Usable hosts: `8192 - 2 = 8190` -we will do this in this order +--- -Tokyo LAN A -> Toronto LAN B -> Toronto LAN A -> Tokyo LAN B -> Point to point +## Example 2 -##### Tokyo LAN A +PC1 has IP address **10.217.182.223/11** -Network address: 192.168.1.0/25 -Broadcast address: 192.168.1.127/25 -First usable address: 192.168.1.1/25 -Last usable address: 192.168.1.126/25 -Total Number of usable host address: 126 +### Subnet Details -##### Toronto LAN B -if we add 1 to the Tokyo Broadcast address we get the next Network address +- Network: `10.192.0.0/11` +- Broadcast: `10.223.255.255` +- First usable: `10.192.0.1` +- Last usable: `10.223.255.254` +- Usable hosts: `2,097,150` -Network address: 192.168.1.128/26 -Broadcast address: 192.168.1.191/26 -First usable address: 192.168.1.129/26 -Last usable address: 192.168.1.190/26 -Total Number of usable host address: 62 +--- -##### Toronto LAN B +## VLSM (Variable-Length Subnet Masks) -Network address: 192.168.1.192/27 -Broadcast address: 192.168.1.223/27 -First usable address:192.168.1.193/27 -Last usable address:192.168.1.222/27 -Total Number of usable host address:30 +- Previously, we used **FLSM (Fixed-Length Subnet Masks)** +- All subnets had the same prefix length +- VLSM allows **different subnet sizes** for better efficiency +- More flexible, slightly more complex -##### Tokyo LAN A +--- -Network address: 192.168.1.224/28 -Broadcast address: 192.168.1.239/28 -First usable address: 192.168.1.225 -Last usable address: 192.168.1.239 -Total Number of usable host address: 14 +## Example (VLSM Design) -##### Point to Point +``` +Tokyo Lan A = 110 Hosts --- Tokyo Lan B = 8 Hosts + | + Router + | + Router + | +Toronto Lan A = 29 Hosts --- Toronto Lan B = 45 Hosts +``` -Network address: 192.168.1.240/30 -Broadcast address: 192.168.1.243/30 -First usable address: 192.168.1.241/30 -Last usable address: 192.168.1.242/3 -Total Number of usable host address: 2 +We must divide **192.168.1.0/24** into 5 subnets: + +- Tokyo LAN A → 110 hosts +- Tokyo LAN B → 8 hosts +- Toronto LAN A → 29 hosts +- Toronto LAN B → 45 hosts +- Point-to-point link + +### Steps + +1. Assign largest subnet first +2. Continue in descending order +3. Repeat until done + +### Allocation Order + +Tokyo A → Toronto B → Toronto A → Tokyo B → Point-to-point + +--- + +### Tokyo LAN A +- Network: `192.168.1.0/25` +- Broadcast: `192.168.1.127` +- Usable: `192.168.1.1 – 192.168.1.126` +- Hosts: 126 + +--- + +### Toronto LAN B +- Network: `192.168.1.128/26` +- Broadcast: `192.168.1.191` +- Usable: `192.168.1.129 – 192.168.1.190` +- Hosts: 62 + +--- + +### Toronto LAN A +- Network: `192.168.1.192/27` +- Broadcast: `192.168.1.223` +- Usable: `192.168.1.193 – 192.168.1.222` +- Hosts: 30 + +--- + +### Tokyo LAN B +- Network: `192.168.1.224/28` +- Broadcast: `192.168.1.239` +- Usable: `192.168.1.225 – 192.168.1.238` +- Hosts: 14 + +--- + +### Point-to-Point +- Network: `192.168.1.240/30` +- Broadcast: `192.168.1.243` +- Usable: `192.168.1.241 – 192.168.1.242` +- Hosts: 2 + +--- ## Additional Practice -- https://www.subnettingquestions.com -- https://www.subnetting.org -- https://www.subnettingpractice.com +- https://www.subnettingquestions.com +- https://www.subnetting.org +- https://www.subnettingpractice.com +```